diff options
Diffstat (limited to 'src')
911 files changed, 57162 insertions, 74940 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index e38f4f0d02..14ff8b2c2d 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -3,8 +3,34 @@ package gregtech; import static gregtech.api.GregTech_API.registerCircuitProgrammer; import static gregtech.api.enums.GT_Values.MOD_ID_FR; +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; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraft.world.World; +import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.oredict.OreDictionary; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + import appeng.api.AEApi; + import com.google.common.base.Stopwatch; + import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; @@ -71,27 +97,6 @@ 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; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraft.world.World; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.oredict.OreDictionary; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; @Mod( modid = "gregtech", @@ -162,8 +167,7 @@ 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) + if ((509 != GregTech_API.VERSION) || (509 != GT_ModHandler.VERSION) || (509 != GT_OreDictUnificator.VERSION) || (509 != GT_Recipe.VERSION) || (509 != GT_Utility.VERSION) @@ -189,12 +193,12 @@ public class GT_Mod implements IGT_Mod { GregTech_API.registerTileEntityConstructor(i, i2 -> new BaseMetaPipeEntity()); } - //noinspection deprecation// Need run-time initialization + // noinspection deprecation// Need run-time initialization GregTech_API.sRecipeAdder = GT_Values.RA; - //noinspection ResultOfMethodCallIgnored// Suspicious likely pointless + // noinspection ResultOfMethodCallIgnored// Suspicious likely pointless Textures.BlockIcons.VOID.name(); - //noinspection ResultOfMethodCallIgnored// Suspicious likely pointless + // noinspection ResultOfMethodCallIgnored// Suspicious likely pointless Textures.ItemIcons.VOID.name(); } @@ -246,7 +250,13 @@ public class GT_Mod implements IGT_Mod { 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); + GT_Entity_Arrow_Potion.class, + "GT_Entity_Arrow_Potion", + 2, + GT_Values.GT, + 160, + 1, + true); GT_PreLoad.runMineTweakerCompat(); @@ -293,7 +303,7 @@ public class GT_Mod implements IGT_Mod { } if (Loader.isModLoaded(MOD_ID_FR)) - //noinspection InstantiationOfUtilityClass//TODO: Refactor GT_Bees with proper state handling + // noinspection InstantiationOfUtilityClass//TODO: Refactor GT_Bees with proper state handling new GT_Bees(); // Disable Low Grav regardless of config if Cleanroom is disabled. @@ -303,17 +313,16 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.onLoad(); - registerCircuitProgrammer( - new Predicate<ItemStack>() { - private final int screwdriverOreId = OreDictionary.getOreID("craftingToolScrewdriver"); + registerCircuitProgrammer(new Predicate<ItemStack>() { - @Override - public boolean test(ItemStack stack) { - for (int i : OreDictionary.getOreIDs(stack)) if (i == screwdriverOreId) return true; - return false; - } - }, - true); + 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(); @@ -412,7 +421,7 @@ public class GT_Mod implements IGT_Mod { 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)}); + 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(); @@ -436,8 +445,8 @@ public class GT_Mod implements IGT_Mod { aThermalCentrifugeRecipeList); if (GT_Values.D1) { - GT_ModHandler.sSingleNonBlockDamagableRecipeList.forEach(iRecipe -> - GT_Log.out.println("=> " + iRecipe.getRecipeOutput().getDisplayName())); + GT_ModHandler.sSingleNonBlockDamagableRecipeList + .forEach(iRecipe -> GT_Log.out.println("=> " + iRecipe.getRecipeOutput().getDisplayName())); } new GT_CraftingRecipeLoader().run(); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2forgehammer", true)) { @@ -446,10 +455,9 @@ public class GT_Mod implements IGT_Mod { 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.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] {"RRR", "RwR", "RRR", 'R', OrePrefixes.plate.get(Materials.Iron)}); + new Object[] { "RRR", "RwR", "RRR", 'R', OrePrefixes.plate.get(Materials.Iron) }); GT_PostLoad.registerFluidCannerRecipes(); @@ -459,58 +467,37 @@ public class GT_Mod implements IGT_Mod { } if (GregTech_API.mAE2) { GT_MetaTileEntity_DigitalChestBase.registerAEIntegration(); - ItemStack facade = AEApi.instance() - .definitions() - .items() - .facade() - .maybeItem() - .transform(i -> new ItemStack(i, 1, GT_Values.W)) - .orNull(); + ItemStack facade = AEApi.instance().definitions().items().facade().maybeItem() + .transform(i -> new ItemStack(i, 1, GT_Values.W)).orNull(); if (facade != null) { GregTech_API.registerCover(facade, null, new GT_Cover_FacadeAE()); } } - 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(); GT_TooltipHandler.init(); /* - * Until this point most crafting recipe additions, and removals, have been buffered. - * Go through, execute the removals in bulk, and then any deferred additions. The bulk removals in particular significantly speed up the recipe list - * modifications. + * Until this point most crafting recipe additions, and removals, have been buffered. Go through, execute the + * removals in bulk, and then any deferred additions. The bulk removals in particular significantly speed up the + * recipe list modifications. */ @SuppressWarnings("UnstableApiUsage") // Stable enough for this project Stopwatch stopwatch = Stopwatch.createStarted(); GT_Log.out.println("GT_Mod: Adding buffered Recipes."); GT_ModHandler.stopBufferingCraftingRecipes(); - //noinspection UnstableApiUsage// Stable enough for this project + // noinspection UnstableApiUsage// Stable enough for this project GT_FML_LOGGER.info("Executed delayed Crafting Recipes (" + stopwatch.stop() + "). Have a Cake."); GT_Log.out.println("GT_Mod: Saving Lang File."); @@ -579,13 +566,29 @@ 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.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.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.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.getOreWashingRecipeList(), + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + false, + true, + true); GT_ModHandler.addIC2RecipesToGT( GT_ModHandler.getThermalCentrifugeRecipeList(), GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, @@ -596,81 +599,56 @@ public class GT_Mod implements IGT_Mod { ArrayList<ItemStack> tStacks = new ArrayList<>(10000); GT_Log.out.println("GT_Mod: IC2 Machines"); - ic2.api.recipe.Recipes.cannerBottle.getRecipes().values().stream() - .map(t -> t.items) + 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.centrifuge.getRecipes().values().stream() - .map(t -> t.items) + ic2.api.recipe.Recipes.metalformerExtruding.getRecipes().values().stream().map(t -> t.items) .forEach(tStacks::addAll); - ic2.api.recipe.Recipes.compressor.getRecipes().values().stream() - .map(t -> t.items) + ic2.api.recipe.Recipes.metalformerRolling.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) + 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"); - //noinspection unchecked// Deal with legacy Minecraft raw types + // noinspection unchecked// Deal with legacy Minecraft raw types FurnaceRecipes.smelting().getSmeltingList().values().forEach(k -> tStacks.add((ItemStack) k)); if (gregtechproxy.mCraftingUnification) { @@ -688,8 +666,8 @@ public class GT_Mod implements IGT_Mod { "A Recipe used an OreDict Item as Output directly, without copying it before!!! This is a typical CallByReference/CallByValue Error"); GT_FML_LOGGER.error( "Said Item will be renamed to make the invalid Recipe visible, so that you can report it properly."); - GT_FML_LOGGER.error( - "Please check all Recipes outputting this Item, and report the Recipes to their Owner."); + GT_FML_LOGGER + .error("Please check all Recipes outputting this Item, and report the Recipes to their Owner."); GT_FML_LOGGER.error( "The Owner of the ==>RECIPE<==, NOT the Owner of the Item, which has been mentioned above!!!"); GT_FML_LOGGER.error( @@ -701,8 +679,8 @@ public class GT_Mod implements IGT_Mod { GT_FML_LOGGER.error("And speaking of failed Reports:"); GT_FML_LOGGER.error( "Both IC2 and GregTech CANNOT be the CAUSE of this Problem, so don't report it to either of them."); - GT_FML_LOGGER.error( - "I REPEAT, BOTH, IC2 and GregTech CANNOT be the source of THIS BUG. NO MATTER WHAT."); + GT_FML_LOGGER + .error("I REPEAT, BOTH, IC2 and GregTech CANNOT be the source of THIS BUG. NO MATTER WHAT."); GT_FML_LOGGER.error( "Asking in the IC2 Forums, which Mod is causing that, won't help anyone, since it is not possible to determine, which Mod it is."); GT_FML_LOGGER.error( diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 0deb239d4b..41a0885a84 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -5,8 +5,37 @@ 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 java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.TreeMap; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.BiFunction; +import java.util.function.IntFunction; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +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.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; +import net.minecraftforge.fluids.Fluid; + import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -42,46 +71,20 @@ 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 java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.TreeMap; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.BiFunction; -import java.util.function.IntFunction; -import java.util.function.Predicate; -import java.util.stream.Collectors; -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.tileentity.TileEntity; -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 - * You may just copy those Functions into your Code, or better call them via reflection. + * Please do not include this File in your Mod-download as it ruins compatibility, like with the IC2-API You may just + * copy those Functions into your Code, or better call them via reflection. * <p/> - * The whole API is the basic construct of my Mod. Everything is dependent on it. - * I change things quite often so please don't include any File inside your Mod, even if it is an Interface. - * Since some Authors were stupid enough to break this simple Rule, I added Version checks to enforce it. + * The whole API is the basic construct of my Mod. Everything is dependent on it. I change things quite often so please + * don't include any File inside your Mod, even if it is an Interface. Since some Authors were stupid enough to break + * this simple Rule, I added Version checks to enforce it. * <p/> - * In these Folders are many useful Functions. You can use them via reflection if you want. - * I know not everything is compilable due to APIs of other Mods, but these are easy to fix in your Setup. + * In these Folders are many useful Functions. You can use them via reflection if you want. I know not everything is + * compilable due to APIs of other Mods, but these are easy to fix in your Setup. * <p/> - * You can use this to learn about Modding, but I would recommend simpler Mods. - * You may even copy-paste Code from these API-Files into your Mod, as I have nothing against that, but you should look exactly at what you are copying. + * You can use this to learn about Modding, but I would recommend simpler Mods. You may even copy-paste Code from these + * API-Files into your Mod, as I have nothing against that, but you should look exactly at what you are copying. * * @author Gregorius Techneticies */ @@ -117,39 +120,20 @@ public class GregTech_API { /** * A List of all registered MetaTileEntities * <p/> - * 0 - 749 are used by GregTech. - * 750 - 999 are reserved for Alkalus. - * 1000 - 2047 are used by GregTech. - * 2048 - 2559 are reserved for OvermindDL. - * 2560 - 3071 are reserved for Immibis. - * 3072 - 3583 are reserved for LinusPhoenix. - * 3584 - 4095 are reserved for BloodyAsp. - * 4096 - 5095 are used for GregTech Frames. - * 5096 - 6099 are used for GregTech Pipes. - * 6100 - 8191 are used for GregTech Decoration Blocks. - * 8192 - 8703 are reserved for ZL123. - * 8704 - 9215 are reserved for Mr10Movie. - * 9216 - 9727 are used for GregTech Automation Machines. - * 9728 - 10239 are reserved for 28Smiles. - * 10240 - 10751 are reserved for VirMan. - * 10752 - 11263 are reserved for Briareos81. - * 11264 - 12000 are reserved for Quantum64. - * 12001 - 12500 are reserved for RedMage17. - * 12501 - 13000 are reserved for bartimaeusnek. - * 13001 - 13100 are reserved for Techlone - * 13101 - 13500 are reserved for kekzdealer - * 13501 - 14000 are reserved for glee8e. - * 14001 - 14100 are reserved for glowredman - * 14101 - 14200 are reserved for MuXiu1997. - * 14201 - 14300 are reserved for kuba6000. - * 14301 - 14999 are currently free. - * 15000 - 16999 are reserved for TecTech. - * 17000 - 29999 are currently free. - * 30000 - 31999 are reserved for Alkalus. - * 32001 - 32766 are reserved for Glod. + * 0 - 749 are used by GregTech. 750 - 999 are reserved for Alkalus. 1000 - 2047 are used by GregTech. 2048 - 2559 + * are reserved for OvermindDL. 2560 - 3071 are reserved for Immibis. 3072 - 3583 are reserved for LinusPhoenix. + * 3584 - 4095 are reserved for BloodyAsp. 4096 - 5095 are used for GregTech Frames. 5096 - 6099 are used for + * GregTech Pipes. 6100 - 8191 are used for GregTech Decoration Blocks. 8192 - 8703 are reserved for ZL123. 8704 - + * 9215 are reserved for Mr10Movie. 9216 - 9727 are used for GregTech Automation Machines. 9728 - 10239 are reserved + * for 28Smiles. 10240 - 10751 are reserved for VirMan. 10752 - 11263 are reserved for Briareos81. 11264 - 12000 are + * reserved for Quantum64. 12001 - 12500 are reserved for RedMage17. 12501 - 13000 are reserved for bartimaeusnek. + * 13001 - 13100 are reserved for Techlone 13101 - 13500 are reserved for kekzdealer 13501 - 14000 are reserved for + * glee8e. 14001 - 14100 are reserved for glowredman 14101 - 14200 are reserved for MuXiu1997. 14201 - 14300 are + * reserved for kuba6000. 14301 - 14999 are currently free. 15000 - 16999 are reserved for TecTech. 17000 - 29999 + * are currently free. 30000 - 31999 are reserved for Alkalus. 32001 - 32766 are reserved for Glod. * <p/> - * Contact me if you need a free ID-Range, which doesn't conflict with other Addons. - * You could make an ID-Config, but we all know what "stupid" customers think about conflicting ID's + * Contact me if you need a free ID-Range, which doesn't conflict with other Addons. You could make an ID-Config, + * but we all know what "stupid" customers think about conflicting ID's */ public static final IMetaTileEntity[] METATILEENTITIES = new IMetaTileEntity[MAXIMUM_METATILE_IDS]; /** @@ -175,8 +159,7 @@ public class GregTech_API { /** * The Advanced Redstone Frequencies */ - public static final Map<String, Map<Integer, Map<Long, Byte>>> sAdvancedWirelessRedstone = - new ConcurrentHashMap<>(); + public static final Map<String, Map<Integer, Map<Long, Byte>>> sAdvancedWirelessRedstone = new ConcurrentHashMap<>(); /** * The IDSU Frequencies @@ -188,6 +171,7 @@ public class GregTech_API { public static final Map<String, ItemStack> sBookList = new ConcurrentHashMap<>(); /** * The List of all Sounds used in GT, indices are in the static Block at the bottom + * * @deprecated Use {@link SoundResource} */ @Deprecated @@ -195,37 +179,30 @@ 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<>(), - sCrowbarList = new GT_HashSet<>(), - sScrewdriverList = new GT_HashSet<>(), - sWrenchList = new GT_HashSet<>(), - sSoftHammerList = new GT_HashSet<>(), - sHardHammerList = new GT_HashSet<>(), - sWireCutterList = new GT_HashSet<>(), - sSolderingToolList = 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<>(), + sSoftHammerList = new GT_HashSet<>(), sHardHammerList = new GT_HashSet<>(), + sWireCutterList = new GT_HashSet<>(), sSolderingToolList = new GT_HashSet<>(), sSolderingMetalList = new GT_HashSet<>(); /** * The List of Hazmat Armors */ 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<>(), + 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. - * Mystcraft Dimensions and other Dimensional Things should be allowed. - * Mystcraft and Twilight Forest are automatically considered a Dimension, without being in this List. + * Mystcraft Dimensions and other Dimensional Things should be allowed. Mystcraft and Twilight Forest are + * automatically considered a Dimension, without being in this List. */ public static final Collection<Integer> sDimensionalList = new HashSet<>(); /** @@ -256,38 +233,28 @@ public class GregTech_API { */ public static IThaumcraftCompat sThaumcraftCompat; /** - * 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 + * 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<>(), - sAfterGTPreload = new ArrayList<>(), - sBeforeGTLoad = new ArrayList<>(), - sAfterGTLoad = new ArrayList<>(), - sBeforeGTPostload = new ArrayList<>(), - sAfterGTPostload = new ArrayList<>(), - sFirstWorldTick = new ArrayList<>(), - sBeforeGTServerstart = new ArrayList<>(), - sAfterGTServerstart = new ArrayList<>(), - sBeforeGTServerstop = new ArrayList<>(), - sAfterGTServerstop = new ArrayList<>(), - sGTBlockIconload = new ArrayList<>(), - sGTItemIconload = new ArrayList<>(); + public static List<Runnable> sBeforeGTPreload = new ArrayList<>(), sAfterGTPreload = new ArrayList<>(), + sBeforeGTLoad = new ArrayList<>(), sAfterGTLoad = new ArrayList<>(), sBeforeGTPostload = new ArrayList<>(), + sAfterGTPostload = new ArrayList<>(), sFirstWorldTick = new ArrayList<>(), + sBeforeGTServerstart = new ArrayList<>(), sAfterGTServerstart = new ArrayList<>(), + sBeforeGTServerstop = new ArrayList<>(), sAfterGTServerstop = new ArrayList<>(), + sGTBlockIconload = new ArrayList<>(), sGTItemIconload = new ArrayList<>(); /** - * 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. + * 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; /** * The Configuration Objects */ - public static GT_Config sRecipeFile = null, - sMachineFile = null, - sWorldgenFile = null, - sMaterialProperties = null, - sMaterialComponents = null, - sUnification = null, - sSpecialFile = null, - sClientDataFile, - sOPStuff = null; + public static GT_Config sRecipeFile = null, sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, + sMaterialComponents = null, sUnification = null, sSpecialFile = null, sClientDataFile, sOPStuff = null; public static int TICKS_FOR_LAG_AVERAGING = 25, MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100; /** @@ -295,65 +262,24 @@ public class GregTech_API { */ public static Block sBlockMachines; - public static Block sBlockOres1, - sBlockOresUb1, - sBlockOresUb2, - sBlockOresUb3, - /*sBlockGem,*/ - sBlockMetal1, - sBlockMetal2, - sBlockMetal3, - sBlockMetal4, - sBlockMetal5, - sBlockMetal6, - sBlockMetal7, - sBlockMetal8, - sBlockMetal9, - sBlockGem1, - sBlockGem2, - sBlockGem3, - sBlockReinforced; + public static Block sBlockOres1, sBlockOresUb1, sBlockOresUb2, sBlockOresUb3, + /* sBlockGem, */ + sBlockMetal1, sBlockMetal2, sBlockMetal3, sBlockMetal4, sBlockMetal5, sBlockMetal6, sBlockMetal7, + sBlockMetal8, sBlockMetal9, sBlockGem1, sBlockGem2, sBlockGem3, sBlockReinforced; public static Block sBlockGranites, sBlockConcretes, sBlockStones; - public static Block sBlockCasings1, - sBlockCasings2, - sBlockCasings3, - sBlockCasings4, - sBlockCasings5, - sBlockCasings6, - sBlockCasings8, - sBlockCasings9, - sSolenoidCoilCasings; + public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4, sBlockCasings5, sBlockCasings6, + sBlockCasings8, sBlockCasings9, sSolenoidCoilCasings; public static Block sBlockLongDistancePipes; /** * Getting assigned by the Config */ - public static boolean sTimber = true, - sDrinksAlwaysDrinkable = false, - sMultiThreadedSounds = false, - sDoShowAllItemsInCreative = false, - sColoredGUI = true, - sMachineMetalGUI = false, - sConstantEnergy = true, - sMachineExplosions = true, - sMachineFlammable = true, - sMachineNonWrenchExplosions = true, - sMachineRainExplosions = true, - sMachineThunderExplosions = true, - sMachineFireExplosions = true, - sMachineWireFire = true, - mOutputRF = false, - mInputRF = false, - meIOLoaded = false, - mRFExplosions = false, - mServerStarted = false, - mIC2Classic = false, - mMagneticraft = false, - mImmersiveEngineering = false, - mGTPlusPlus = false, - mTranslocator = false, - mTConstruct = false, - mGalacticraft = false, - mAE2 = false; + public static boolean sTimber = true, sDrinksAlwaysDrinkable = false, sMultiThreadedSounds = false, + sDoShowAllItemsInCreative = false, sColoredGUI = true, sMachineMetalGUI = false, sConstantEnergy = true, + sMachineExplosions = true, sMachineFlammable = true, sMachineNonWrenchExplosions = true, + sMachineRainExplosions = true, sMachineThunderExplosions = true, sMachineFireExplosions = true, + sMachineWireFire = true, mOutputRF = false, mInputRF = false, meIOLoaded = false, mRFExplosions = false, + mServerStarted = false, mIC2Classic = false, mMagneticraft = false, mImmersiveEngineering = false, + mGTPlusPlus = false, mTranslocator = false, mTConstruct = false, mGalacticraft = false, mAE2 = false; public static int mEUtoRF = 360, mRFtoEU = 20; @@ -368,13 +294,8 @@ public class GregTech_API { /** * Getting assigned by the Mod loading */ - public static boolean sUnificationEntriesRegistered = false, - sPreloadStarted = false, - sPreloadFinished = false, - sLoadStarted = false, - sLoadFinished = false, - sPostloadStarted = false, - sPostloadFinished = false; + public static boolean sUnificationEntriesRegistered = false, sPreloadStarted = false, sPreloadFinished = false, + sLoadStarted = false, sLoadFinished = false, sPostloadStarted = false, sPostloadFinished = false; private static Class<BaseMetaTileEntity> sBaseMetaTileEntityClass = null; @@ -388,31 +309,36 @@ public class GregTech_API { /** * You want OreDict-Unification for YOUR Mod/Addon, when GregTech is installed? This Function is especially for YOU. - * Call this Function after the load-Phase, as I register the most of the Unification at that Phase (Redpowers Storageblocks are registered at postload). - * A recommended use of this Function is inside your Recipe-System itself (if you have one), as the unification then makes 100% sure, that every added non-unificated Output gets automatically unificated. + * Call this Function after the load-Phase, as I register the most of the Unification at that Phase (Redpowers + * Storageblocks are registered at postload). A recommended use of this Function is inside your Recipe-System itself + * (if you have one), as the unification then makes 100% sure, that every added non-unificated Output gets + * automatically unificated. * <p/> - * I will personally make sure, that only common prefixes of Ores get registered at the Unificator, as of now there are: - * pulp, dust, dustSmall, ingot, nugget, gem, ore and block - * If another Mod-Author messes these up, then it's not my fault, and it's especially not your fault. As these are commonly used prefixes. + * I will personally make sure, that only common prefixes of Ores get registered at the Unificator, as of now there + * are: pulp, dust, dustSmall, ingot, nugget, gem, ore and block If another Mod-Author messes these up, then it's + * not my fault, and it's especially not your fault. As these are commonly used prefixes. * <p/> - * This Unificator-API-Function uses the same Functions I use, for unificating Items. So if there is something messed up (very unlikely), then everything is messed up. + * This Unificator-API-Function uses the same Functions I use, for unificating Items. So if there is something + * messed up (very unlikely), then everything is messed up. * <p/> * You shouldn't use this to unificate the Inputs of your Recipes, this is only meant for the Outputs. * * @param aOreStack the Stack you want to get unificated. It is stackSize Sensitive. - * @return Either an unificated Stack or the stack you toss in, but it should never be null, unless you throw a Null-Pointer into it. + * @return Either an unificated Stack or the stack you toss in, but it should never be null, unless you throw a + * Null-Pointer into it. */ 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."); + 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."); return GT_OreDictUnificator.get(true, aOreStack); } /** - * Causes a Machineblock Update - * This update will cause surrounding MultiBlock Machines to update their Configuration. - * You should call this Function in @Block.breakBlock and in @Block.onBlockAdded of your Machine. + * Causes a Machineblock Update This update will cause surrounding MultiBlock Machines to update their + * Configuration. You should call this Function in @Block.breakBlock and in @Block.onBlockAdded of your Machine. * * @param aWorld is being the World * @param aX is the X-Coord of the update causing Block @@ -437,12 +363,12 @@ public class GregTech_API { } /** - * Adds a Multi-Machine Block, like my Machine Casings for example. - * You should call @causeMachineUpdate in @Block.breakBlock and in {@link Block#onBlockAdded} of your registered Block. - * You don't need to register TileEntities which implement {@link IMachineBlockUpdateable} + * Adds a Multi-Machine Block, like my Machine Casings for example. You should call @causeMachineUpdate + * in @Block.breakBlock and in {@link Block#onBlockAdded} of your registered Block. You don't need to register + * TileEntities which implement {@link IMachineBlockUpdateable} * - * @param aBlock the Block - * @param aMeta the Metadata of the Blocks as Bitmask! -1 or ~0 for all Meta-values + * @param aBlock the Block + * @param aMeta the Metadata of the Blocks as Bitmask! -1 or ~0 for all Meta-values */ @SuppressWarnings("UnusedReturnValue") // Retains API method signature public static boolean registerMachineBlock(Block aBlock, int aMeta) { @@ -483,233 +409,238 @@ 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); + // return + // (Item)Class.forName("gregtech.api.items.GT_CoolantCellIC_Item").getConstructors()[0].newInstance(aUnlocalized, + // aEnglish, aMaxStore); } catch (Throwable e) { - /*Do nothing*/ + /* 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); + // return + // (Item)Class.forName("gregtech.api.items.GT_CoolantCell_Item").getConstructors()[0].newInstance(aUnlocalized, + // aEnglish, aMaxStore); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return new gregtech.api.items.GT_Generic_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); + 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); + 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*/ + /* 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); + 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*/ + /* Do nothing */ } return new gregtech.api.items.GT_Generic_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); + 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] + 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*/ + /* Do nothing */ } try { - return (Item) Class.forName("gregtechmod.api.items.GT_EnergyStore_Item") - .getConstructors()[0] + 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*/ + /* Do nothing */ } return new gregtech.api.items.GT_Generic_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); + 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] + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_HardHammer_Item").getConstructors()[0] .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + 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] + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_CrowbarRC_Item").getConstructors()[0] .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_Crowbar_Item") - .getConstructors()[0] + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_Crowbar_Item").getConstructors()[0] .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + 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] + 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*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + 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] + 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*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + 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] + 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*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + 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, + 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); + 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*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + 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, + 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] + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_DrillIC_Item").getConstructors()[0] .newInstance( aUnlocalized, aEnglish, @@ -720,53 +651,67 @@ public class GregTech_API { aEnergyConsumptionPerBlockBreak, aDisChargedGTID); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + 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] + 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*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + 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] + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_EmptyToolIC_Item").getConstructors()[0] .newInstance(aUnlocalized, aEnglish, aMaxDamage, aChargedGTID); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return new gregtech.api.items.GT_Tool_Item( - aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, 0, false); + aUnlocalized, + aEnglish, + "Doesn't work as intended, this is a Bug", + aMaxDamage, + 0, + false); } /** - * This gives you a new BaseMetaTileEntity. As some Interfaces are not always loaded (Buildcraft, Universal Electricity) I have to use Invocation at the Constructor of the BaseMetaTileEntity + * This gives you a new BaseMetaTileEntity. As some Interfaces are not always loaded (Buildcraft, Universal + * Electricity) I have to use Invocation at the Constructor of the BaseMetaTileEntity */ public static BaseMetaTileEntity constructBaseMetaTileEntity() { if (sBaseMetaTileEntityClass == null) { try { return (sBaseMetaTileEntityClass = BaseMetaTileEntity.class).newInstance(); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } } @@ -780,18 +725,17 @@ public class GregTech_API { } /** - * Register a new ItemStack as configuration circuits. - * Duplicates or invalid stacks will be silently ignored. + * Register a new ItemStack as configuration circuits. Duplicates or invalid stacks will be silently ignored. */ public static void registerConfigurationCircuit(ItemStack aStack) { registerConfigurationCircuit(aStack, 0); } /** - * Register a new ItemStack as configuration circuits. - * Duplicates or invalid stacks will be silently ignored. - * @param minTier the minimal tier this circuit can be offered for free, e.g. normal configuration circuit is available - * in LV+ single blocks, GT++ breakthrough circuit is offered in HV+ single blocks + * Register a new ItemStack as configuration circuits. Duplicates or invalid stacks will be silently ignored. + * + * @param minTier the minimal tier this circuit can be offered for free, e.g. normal configuration circuit is + * available 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; @@ -799,41 +743,36 @@ public class GregTech_API { if (GT_Utility.areStacksEqual(tRegistered, aStack)) return; ItemStack stack = GT_Utility.copyAmount(0, aStack); sRealConfigurationList.put(minTier, stack); - sConfigurationLists.entrySet().stream() - .filter(e -> e.getKey() >= minTier) + sConfigurationLists.entrySet().stream().filter(e -> e.getKey() >= minTier) .forEach(e -> e.getValue().add(stack)); } /** - * Get a list of Configuration circuits. These stacks will have a stack size of 0. - * Use {@link #registerConfigurationCircuit(ItemStack, int)} or its overload to add to this list. + * Get a list of Configuration circuits. These stacks will have a stack size of 0. Use + * {@link #registerConfigurationCircuit(ItemStack, int)} or its overload to add to this list. * * @param machineTier The voltage tier where this list will be used. use Integer.MAX_VALUE to get all circuits - * @return An unmodifiable view of actual list. - * DO NOT MODIFY THE ItemStacks! + * @return An unmodifiable view of actual list. 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())) - .stream() - .sorted(getConfigurationCircuitsComparator()) - .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())); } 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); + // 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) { @@ -841,12 +780,12 @@ public class GregTech_API { } 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); } @@ -855,10 +794,9 @@ 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 (!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); } @@ -884,8 +822,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)); } @@ -903,6 +841,7 @@ public class GregTech_API { /** * returns a Cover behavior, guaranteed to not return null after preload + * * @return The Cover behavior */ public static GT_CoverBehaviorBase<?> getCoverBehaviorNew(ItemStack aStack) { @@ -932,41 +871,43 @@ public class GregTech_API { } /** - * Register a Wrench to be usable on GregTech Machines. - * The Wrench MUST have some kind of Durability unlike certain Buildcraft Wrenches. + * Register a Wrench to be usable on GregTech Machines. The Wrench MUST have some kind of Durability unlike certain + * Buildcraft Wrenches. * <p/> - * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in + * certain Cases during postload (When IToolWrench or similar Interfaces are implemented). * <p/> * ----- * <p/> - * Returning true at isDamageable was a great Idea, KingLemming. Well played. - * Since the OmniWrench is just a Single-Item-Mod, people can choose if they want your infinite durability or not. So that's not really a Problem. + * Returning true at isDamageable was a great Idea, KingLemming. Well played. Since the OmniWrench is just a + * Single-Item-Mod, people can choose if they want your infinite durability or not. So that's not really a Problem. * I even have a new Config to auto-disable most infinite BC Wrenches (but that one is turned off). * <p/> - * One last Bug for you to fix: - * My Auto-registration detects Railcraft's Crowbars, Buildcraft's Wrenches and alike, due to their Interfaces. - * Guess what now became a Crowbar by accident. Try registering the Wrench at the load phase to prevent things like that from happening. - * Yes, I know that "You need to register Tools in the Load Phase"-Part wasn't there before this. Sorry about that. + * One last Bug for you to fix: My Auto-registration detects Railcraft's Crowbars, Buildcraft's Wrenches and alike, + * due to their Interfaces. Guess what now became a Crowbar by accident. Try registering the Wrench at the load + * phase to prevent things like that from happening. Yes, I know that "You need to register Tools in the Load + * Phase"-Part wasn't there before this. Sorry about that. */ public static boolean registerWrench(ItemStack aTool) { return registerTool(aTool, sWrenchList); } /** - * Register a Crowbar to extract Covers from Machines - * Crowbars are NOT Wrenches btw. + * Register a Crowbar to extract Covers from Machines Crowbars are NOT Wrenches btw. * <p/> - * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in + * certain Cases during postload (When IToolWrench or similar Interfaces are implemented). */ public static boolean registerCrowbar(ItemStack aTool) { return registerTool(aTool, sCrowbarList); } /** - * Register a Screwdriver to interact directly with Machines and Covers - * Did I mention, that it is intentionally not possible to make a Multi-tool, which doesn't switch ItemID (like a Mode) all the time? + * Register a Screwdriver to interact directly with Machines and Covers Did I mention, that it is intentionally not + * possible to make a Multi-tool, which doesn't switch ItemID (like a Mode) all the time? * <p/> - * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in + * certain Cases during postload (When IToolWrench or similar Interfaces are implemented). */ @SuppressWarnings("UnusedReturnValue") // Retains API method signature public static boolean registerScrewdriver(ItemStack aTool) { @@ -976,7 +917,8 @@ public class GregTech_API { /** * Register a Soft Hammer to interact with Machines * <p/> - * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in + * certain Cases during postload (When IToolWrench or similar Interfaces are implemented). */ public static boolean registerSoftHammer(ItemStack aTool) { return registerTool(aTool, sSoftHammerList); @@ -985,7 +927,8 @@ public class GregTech_API { /** * Register a Hard Hammer to interact with Machines * <p/> - * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in + * certain Cases during postload (When IToolWrench or similar Interfaces are implemented). */ public static boolean registerHardHammer(ItemStack aTool) { return registerTool(aTool, sHardHammerList); @@ -994,7 +937,8 @@ public class GregTech_API { /** * Register a Wire Cutter to interact with Machines * <p/> - * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in + * certain Cases during postload (When IToolWrench or similar Interfaces are implemented). */ public static boolean registerWireCutter(ItemStack aTool) { return registerTool(aTool, sWireCutterList); @@ -1003,7 +947,8 @@ public class GregTech_API { /** * Register a Soldering Tool to interact with Machines * <p/> - * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in + * certain Cases during postload (When IToolWrench or similar Interfaces are implemented). */ @SuppressWarnings("UnusedReturnValue") // Retains API method signature public static boolean registerSolderingTool(ItemStack aTool) { @@ -1013,7 +958,8 @@ public class GregTech_API { /** * Register a Soldering Tin to interact with Soldering Tools * <p/> - * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + * You need to register Tools in the Load Phase, because otherwise the Auto-detection will assign a Tool Type in + * certain Cases during postload (When IToolWrench or similar Interfaces are implemented). */ @SuppressWarnings("UnusedReturnValue") // Retains API method signature public static boolean registerSolderingMetal(ItemStack aTool) { @@ -1021,15 +967,14 @@ public class GregTech_API { } /** - * Generic Function to add Tools to the Lists. - * Contains all sanity Checks for Tools, like preventing one Tool from being registered for multiple purposes as controls would override each other. + * Generic Function to add Tools to the Lists. 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; @@ -1037,6 +982,7 @@ public class GregTech_API { /** * Sets the {@link IIconRegister} for Block Icons + * * @param aIconRegister The {@link IIconRegister} Icon Register */ @SideOnly(Side.CLIENT) @@ -1046,6 +992,7 @@ public class GregTech_API { /** * Sets the {@link IIconRegister} for Items Icons + * * @param aIconRegister The {@link IIconRegister} Icon Register */ @SideOnly(Side.CLIENT) @@ -1055,9 +1002,8 @@ public class GregTech_API { public static void registerTileEntityConstructor(int meta, IntFunction<TileEntity> constructor) { if (meta < 0 || meta > 15 || constructor == null) throw new IllegalArgumentException(); - if (teCreators[meta] != null) - throw new IllegalStateException( - "previous constructor: " + teCreators[meta] + " new constructor: " + constructor + " meta:" + meta); + if (teCreators[meta] != null) throw new IllegalStateException( + "previous constructor: " + teCreators[meta] + " new constructor: " + constructor + " meta:" + meta); teCreators[meta] = constructor; } diff --git a/src/main/java/gregtech/api/damagesources/GT_DamageSources.java b/src/main/java/gregtech/api/damagesources/GT_DamageSources.java index a012f030c5..fca4d7fe9f 100644 --- a/src/main/java/gregtech/api/damagesources/GT_DamageSources.java +++ b/src/main/java/gregtech/api/damagesources/GT_DamageSources.java @@ -1,11 +1,13 @@ package gregtech.api.damagesources; import javax.annotation.Nullable; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.util.*; public class GT_DamageSources { + public static DamageSource getElectricDamage() { return ic2.api.info.Info.DMG_ELECTRIC; } @@ -35,6 +37,7 @@ public class GT_DamageSources { } private static class DamageSourceCombat extends EntityDamageSource { + private final IChatComponent mDeathMessage; public DamageSourceCombat(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) { @@ -49,6 +52,7 @@ public class GT_DamageSources { } private static class DamageSourceFrost extends DamageSource { + public DamageSourceFrost() { super("frost"); setDifficultyScaled(); @@ -62,6 +66,7 @@ public class GT_DamageSources { } private static class DamageSourceHeat extends DamageSource { + public DamageSourceHeat() { super("steam"); setDifficultyScaled(); @@ -69,12 +74,15 @@ 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"); } } public static class DamageSourceHotItem extends DamageSourceHeat { + @Nullable private final ItemStack stack; @@ -89,6 +97,7 @@ public class GT_DamageSources { } public static class DamageSourceExploding extends DamageSource { + public DamageSourceExploding() { super("exploded"); setDamageAllowedInCreativeMode(); diff --git a/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java b/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java index a31b802219..52fd3b1134 100644 --- a/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java +++ b/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java @@ -1,9 +1,5 @@ package gregtech.api.enchants; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Config; -import gregtech.api.util.GT_LanguageManager; import net.minecraft.enchantment.EnchantmentDamage; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -12,7 +8,13 @@ import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Config; +import gregtech.api.util.GT_LanguageManager; + public class Enchantment_EnderDamage extends EnchantmentDamage { + public static Enchantment_EnderDamage INSTANCE; public Enchantment_EnderDamage() { @@ -43,20 +45,15 @@ 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/enchants/Enchantment_Hazmat.java b/src/main/java/gregtech/api/enchants/Enchantment_Hazmat.java index 136b5c61a6..ecbe654698 100644 --- a/src/main/java/gregtech/api/enchants/Enchantment_Hazmat.java +++ b/src/main/java/gregtech/api/enchants/Enchantment_Hazmat.java @@ -1,14 +1,16 @@ package gregtech.api.enchants; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.util.GT_Config; -import gregtech.api.util.GT_LanguageManager; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnumEnchantmentType; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.util.GT_Config; +import gregtech.api.util.GT_LanguageManager; + public class Enchantment_Hazmat extends Enchantment { + public static Enchantment_Hazmat INSTANCE; public Enchantment_Hazmat() { diff --git a/src/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java b/src/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java index f6088caab3..34035c9457 100644 --- a/src/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java +++ b/src/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java @@ -1,16 +1,18 @@ package gregtech.api.enchants; +import net.minecraft.enchantment.EnchantmentDamage; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Materials; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; -import net.minecraft.enchantment.EnchantmentDamage; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; public class Enchantment_Radioactivity extends EnchantmentDamage { + public static Enchantment_Radioactivity INSTANCE; public Enchantment_Radioactivity() { diff --git a/src/main/java/gregtech/api/enums/ConfigCategories.java b/src/main/java/gregtech/api/enums/ConfigCategories.java index ae4b425e5e..e4a647db22 100644 --- a/src/main/java/gregtech/api/enums/ConfigCategories.java +++ b/src/main/java/gregtech/api/enums/ConfigCategories.java @@ -1,6 +1,7 @@ package gregtech.api.enums; public enum ConfigCategories { + news, general, machineconfig, @@ -15,8 +16,7 @@ public enum ConfigCategories { heatdamage, oreprocessingoutputmultiplier, blastfurnacerequirements, - blastinductionsmelter, - ; + blastinductionsmelter,; } public enum Recipes { diff --git a/src/main/java/gregtech/api/enums/Dyes.java b/src/main/java/gregtech/api/enums/Dyes.java index 2a546e6138..a0b9f87593 100644 --- a/src/main/java/gregtech/api/enums/Dyes.java +++ b/src/main/java/gregtech/api/enums/Dyes.java @@ -1,13 +1,16 @@ 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 gregtech.api.interfaces.IColorModulationContainer; +import gregtech.api.objects.GT_ArrayList; +import gregtech.api.util.GT_Utility; + public enum Dyes implements IColorModulationContainer { + /** * The valid Colors, see VALUES Array below */ @@ -38,24 +41,8 @@ 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; @@ -66,7 +53,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 450a85d3d6..c66b9630a3 100644 --- a/src/main/java/gregtech/api/enums/Element.java +++ b/src/main/java/gregtech/api/enums/Element.java @@ -8,6 +8,7 @@ import java.util.Map; * This is some kind of Periodic Table, which I use to determine Properties of the Materials. */ public enum Element { + _NULL(0, 0, 0, -1, null, "", false), H(1, 0, 0, -1, null, "Hydrogen", false), D(1, 1, 0, -1, "H", "Deuterium", true), @@ -288,18 +289,13 @@ public enum Element { /** * @param aProtons Amount of Protons. Antiprotons if negative. - * @param aNeutrons Amount of Neutrons. Antineutrons if negative. (I could have made mistakes with the Neutron amount calculation, please tell me if I did something wrong) + * @param aNeutrons Amount of Neutrons. Antineutrons if negative. (I could have made mistakes with the + * Neutron amount calculation, please tell me if I did something wrong) * @param aHalfLifeSeconds Amount of Half Life this Material has in Seconds. -1 for stable Materials. * @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, + Element(long aProtons, long aNeutrons, long aAdditionalMass, long aHalfLifeSeconds, String aDecayTo, String aName, boolean aIsIsotope) { mProtons = aProtons; mNeutrons = aNeutrons; @@ -331,6 +327,7 @@ public enum Element { * A companion object to workaround java limitations */ private static final class Companion { + /** * Why is this a separate map and populated by enum constructor instead of a Map prepoluated with values()? * Because apparently there are people hacking into this enum via EnumHelper. diff --git a/src/main/java/gregtech/api/enums/FluidState.java b/src/main/java/gregtech/api/enums/FluidState.java index a6e81ab43d..e84657cc6a 100644 --- a/src/main/java/gregtech/api/enums/FluidState.java +++ b/src/main/java/gregtech/api/enums/FluidState.java @@ -1,17 +1,17 @@ package gregtech.api.enums; public enum FluidState { + GAS, LIQUID, MOLTEN, PLASMA, SLURRY; - public static final FluidState[] VALID_STATES = new FluidState[] {SLURRY, LIQUID, GAS, PLASMA, MOLTEN}; + public static final FluidState[] VALID_STATES = new FluidState[] { SLURRY, LIQUID, GAS, PLASMA, MOLTEN }; public static FluidState fromValue(int stateValue) { - return stateValue >= 0 && stateValue < FluidState.VALID_STATES.length - ? FluidState.VALID_STATES[stateValue] + return stateValue >= 0 && stateValue < FluidState.VALID_STATES.length ? FluidState.VALID_STATES[stateValue] : FluidState.LIQUID; } } diff --git a/src/main/java/gregtech/api/enums/GT_HatchElement.java b/src/main/java/gregtech/api/enums/GT_HatchElement.java index 68702f5eb5..8d8603a10e 100644 --- a/src/main/java/gregtech/api/enums/GT_HatchElement.java +++ b/src/main/java/gregtech/api/enums/GT_HatchElement.java @@ -1,5 +1,9 @@ package gregtech.api.enums; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; @@ -13,61 +17,68 @@ 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; public enum GT_HatchElement implements IHatchElement<GT_MetaTileEntity_MultiBlockBase> { + Muffler(GT_MetaTileEntity_MultiBlockBase::addMufflerToMachineList, GT_MetaTileEntity_Hatch_Muffler.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { 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(); } }, InputHatch(GT_MetaTileEntity_MultiBlockBase::addInputHatchToMachineList, GT_MetaTileEntity_Hatch_Input.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mInputHatches.size(); } }, InputBus(GT_MetaTileEntity_MultiBlockBase::addInputBusToMachineList, GT_MetaTileEntity_Hatch_InputBus.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mInputBusses.size(); } }, OutputHatch(GT_MetaTileEntity_MultiBlockBase::addOutputHatchToMachineList, GT_MetaTileEntity_Hatch_Output.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mOutputHatches.size(); } }, OutputBus(GT_MetaTileEntity_MultiBlockBase::addOutputBusToMachineList, GT_MetaTileEntity_Hatch_OutputBus.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mOutputBusses.size(); } }, Energy(GT_MetaTileEntity_MultiBlockBase::addEnergyInputToMachineList, GT_MetaTileEntity_Hatch_Energy.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mEnergyHatches.size(); } }, Dynamo(GT_MetaTileEntity_MultiBlockBase::addDynamoToMachineList, GT_MetaTileEntity_Hatch_Dynamo.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mDynamoHatches.size(); } }, ExoticEnergy(GT_MetaTileEntity_MultiBlockBase::addExoticEnergyInputToMachineList) { + @Override public List<? extends Class<? extends IMetaTileEntity>> mteClasses() { return GT_ExoticEnergyInputHelper.getAllClasses(); @@ -77,14 +88,14 @@ public enum GT_HatchElement implements IHatchElement<GT_MetaTileEntity_MultiBloc public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.getExoticEnergyHatches().size(); } - }, - ; + },; + private final List<Class<? extends IMetaTileEntity>> mteClasses; 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 8cadd17246..ef921a0339 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -1,12 +1,8 @@ package gregtech.api.enums; -import gregtech.api.fluid.FluidTankGT; -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.math.BigInteger; import java.util.*; + import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; @@ -15,12 +11,20 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.oredict.OreDictionary; +import gregtech.api.fluid.FluidTankGT; +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; + /** * Made for static imports, this Class is just a Helper. * <p/> - * I am doing this to have a better Table alike view on my Code, so I can change things faster using the Block Selection Mode of eclipse. + * I am doing this to have a better Table alike view on my Code, so I can change things faster using the Block Selection + * Mode of eclipse. * <p/> - * Go to "Window > Preferences > Java > Editor > Content Assist > Favorites" to set static importable Constant Classes such as this one as AutoCompleteable. + * Go to "Window > Preferences > Java > Editor > Content Assist > Favorites" to set static importable Constant Classes + * such as this one as AutoCompleteable. */ @SuppressWarnings("unused") // API Legitimately has unused fields and methods public class GT_Values { @@ -39,31 +43,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" * <p/> - * This is worth exactly one normal Item. - * This Constant can be divided by many commonly used Numbers such as - * 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, ... 64 or 81 - * without losing precision and is for that reason used as Unit of Amount. - * But it is also small enough to be multiplied with larger Numbers. + * This is worth exactly one normal Item. This Constant can be divided by many commonly used Numbers such as 1, 2, + * 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, ... 64 or 81 without losing precision and is for that + * reason used as Unit of Amount. But it is also small enough to be multiplied with larger Numbers. * <p/> - * This is used to determine the amount of Material contained inside a prefixed Ore. - * For example Nugget = M / 9 as it contains out of 1/9 of an Ingot. + * This is used to determine the amount of Material contained inside a prefixed Ore. For example Nugget = M / 9 as + * it contains out of 1/9 of an Ingot. */ public static final long M = 3628800; @@ -82,26 +74,18 @@ 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 - }; + 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 }; /** - * The Voltage Practical. These are recipe voltage you should use if you expect the recipe to use a full amp of - * that tier. These leave a bit of headroom for cable and transformer losses, but not enough to make it a great gain. + * The Voltage Practical. These are recipe voltage you should use if you expect the recipe to use a full amp of that + * tier. These leave a bit of headroom for cable and transformer losses, but not enough to make it a great gain. */ // this will correctly map ULV to 7. - public static final long[] VP = Arrays.stream(V) - .map(i -> BigInteger.valueOf(i) - .multiply(BigInteger.valueOf(30)) - .divide(BigInteger.valueOf(32)) - .longValueExact()) + public static final long[] VP = Arrays.stream(V).map( + i -> BigInteger.valueOf(i).multiply(BigInteger.valueOf(30)).divide(BigInteger.valueOf(32)).longValueExact()) .toArray(); // Why -7? Mystery of the universe. Something may break if you change this so please do not without extensive // testing. @@ -109,7 +93,7 @@ public class GT_Values { // 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: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 @@ -118,140 +102,110 @@ public class GT_Values { /** * 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 - }; + * <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 }; /** * 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 }; /** - * This way it is possible to have a Call Hierarchy of NullPointers in ItemStack based Functions, and also because most of the time I don't know what kind of Data Type the "null" stands for + * This way it is possible to have a Call Hierarchy of NullPointers in ItemStack based Functions, and also because + * most of the time I don't know what kind of Data Type the "null" stands for */ public static final ItemStack NI = null; /** - * This way it is possible to have a Call Hierarchy of NullPointers in FluidStack based Functions, and also because most of the time I don't know what kind of Data Type the "null" stands for + * This way it is possible to have a Call Hierarchy of NullPointers in FluidStack based Functions, and also because + * most of the time I don't know what kind of Data Type the "null" stands for */ public static final FluidStack NF = null; /** * MOD ID Strings, since they are very common Parameters. */ - public static final String MOD_ID = "gregtech", - MOD_ID_IC2 = "IC2", - MOD_ID_NC = "IC2NuclearControl", - MOD_ID_TC = "Thaumcraft", - MOD_ID_TF = "TwilightForest", - MOD_ID_RC = "Railcraft", - MOD_ID_TE = "ThermalExpansion", - MOD_ID_AE = "appliedenergistics2", - MOD_ID_TFC = "terrafirmacraft", - MOD_ID_PFAA = "PFAAGeologica", - MOD_ID_FR = "Forestry", - MOD_ID_HaC = "harvestcraft", - MOD_ID_APC = "AppleCore", - MOD_ID_MaCr = "magicalcrops", - MOD_ID_GaEn = "ganysend", - MOD_ID_GaSu = "ganyssurface", - MOD_ID_GaNe = "ganysnether", - MOD_ID_BC_SILICON = "BuildCraft|Silicon", - MOD_ID_BC_TRANSPORT = "BuildCraft|Transport", - MOD_ID_BC_FACTORY = "BuildCraft|Factory", - MOD_ID_BC_ENERGY = "BuildCraft|Energy", - MOD_ID_BC_BUILDERS = "BuildCraft|Builders", - MOD_ID_BC_CORE = "BuildCraft|Core", - MOD_ID_GC_CORE = "GalacticraftCore", - MOD_ID_GC_MARS = "GalacticraftMars", - MOD_ID_GC_PLANETS = "GalacticraftPlanets", - MOD_ID_DC = "dreamcraft", + public static final String MOD_ID = "gregtech", MOD_ID_IC2 = "IC2", MOD_ID_NC = "IC2NuclearControl", + MOD_ID_TC = "Thaumcraft", MOD_ID_TF = "TwilightForest", MOD_ID_RC = "Railcraft", + MOD_ID_TE = "ThermalExpansion", MOD_ID_AE = "appliedenergistics2", MOD_ID_TFC = "terrafirmacraft", + MOD_ID_PFAA = "PFAAGeologica", MOD_ID_FR = "Forestry", MOD_ID_HaC = "harvestcraft", + MOD_ID_APC = "AppleCore", MOD_ID_MaCr = "magicalcrops", MOD_ID_GaEn = "ganysend", + MOD_ID_GaSu = "ganyssurface", MOD_ID_GaNe = "ganysnether", MOD_ID_BC_SILICON = "BuildCraft|Silicon", + MOD_ID_BC_TRANSPORT = "BuildCraft|Transport", MOD_ID_BC_FACTORY = "BuildCraft|Factory", + MOD_ID_BC_ENERGY = "BuildCraft|Energy", MOD_ID_BC_BUILDERS = "BuildCraft|Builders", + MOD_ID_BC_CORE = "BuildCraft|Core", MOD_ID_GC_CORE = "GalacticraftCore", + MOD_ID_GC_MARS = "GalacticraftMars", MOD_ID_GC_PLANETS = "GalacticraftPlanets", MOD_ID_DC = "dreamcraft", MOD_ID_GTPP = "miscutils"; /** * File Paths and Resource Paths */ - 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/", - TEX_DIR_ENTITY = TEX_DIR + "entity/", - TEX_DIR_ASPECTS = TEX_DIR + "aspects/", - RES_PATH = MOD_ID + ":" + TEX_DIR, - RES_PATH_GUI = MOD_ID + ":" + TEX_DIR_GUI, - RES_PATH_ITEM = MOD_ID + ":", - RES_PATH_BLOCK = MOD_ID + ":", - RES_PATH_ENTITY = MOD_ID + ":" + TEX_DIR_ENTITY, - RES_PATH_ASPECTS = MOD_ID + ":" + TEX_DIR_ASPECTS, + 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/", TEX_DIR_ENTITY = TEX_DIR + "entity/", + TEX_DIR_ASPECTS = TEX_DIR + "aspects/", RES_PATH = MOD_ID + ":" + TEX_DIR, + RES_PATH_GUI = MOD_ID + ":" + TEX_DIR_GUI, RES_PATH_ITEM = MOD_ID + ":", RES_PATH_BLOCK = MOD_ID + ":", + RES_PATH_ENTITY = MOD_ID + ":" + TEX_DIR_ENTITY, RES_PATH_ASPECTS = MOD_ID + ":" + TEX_DIR_ASPECTS, RES_PATH_IC2 = MOD_ID_IC2.toLowerCase(Locale.ENGLISH) + ":", RES_PATH_MODEL = MOD_ID + ":" + TEX_DIR + "models/"; @@ -259,6 +213,7 @@ public class GT_Values { * NBT String Keys */ public static final class NBT { + public static final String COLOR = "gt.color", // Integer COVERS = "gt.covers", // String CUSTOM_NAME = "name", // String @@ -287,10 +242,7 @@ public class GT_Values { INV_OUTPUT_LIST = "gt.invlist.out", // NBT List // MultiBlock - STRUCTURE_OK = "gt.structure.ok", - ROTATION = "gt.eRotation", - FLIP = "gt.eFlip", - TARGET = "gt.target", // Boolean + 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 @@ -300,66 +252,53 @@ public class GT_Values { } /** The Color White as RGB Short Array. */ - public static final short[] UNCOLORED_RBGA = {255, 255, 255, 255}; + public static final short[] UNCOLORED_RBGA = { 255, 255, 255, 255 }; /** The Color White as simple Integer (0x00ffffff). */ public static final int UNCOLORED = 0x00ffffff; /** * 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}; + 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. + * 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. + * 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. + * [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} - }; + 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 } }; /** * The Mod Object itself. That is the GT_Mod-Object. It's needed to open GUI's and similar. @@ -378,13 +317,15 @@ public class GT_Values { */ public static int oreveinPercentage; /** - * Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is cheap + * Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is + * cheap */ public static int oreveinAttempts; /** * Control number of attempts to place a valid ore vein. - * <p>If a vein wasn't placed due to height restrictions, - * completely in the water, etc, another attempt is tried.</p> + * <p> + * If a vein wasn't placed due to height restrictions, completely in the water, etc, another attempt is tried. + * </p> */ public static int oreveinMaxPlacementAttempts; /** @@ -396,7 +337,8 @@ public class GT_Values { */ public static int oreveinPlacerOresMultiplier; /** - * Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug Mode) + * Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug + * Mode) */ public static boolean D1 = false, D2 = false; /** @@ -440,7 +382,8 @@ public class GT_Values { */ public static boolean debugWorldData = false; /** - * Number of ticks between sending sound packets to clients for electric machines. Default is 1.5 seconds. Trying to mitigate lag and FPS drops. + * Number of ticks between sending sound packets to clients for electric machines. Default is 1.5 seconds. Trying to + * mitigate lag and FPS drops. */ public static int ticksBetweenSounds = 30; /** @@ -473,7 +416,7 @@ public class GT_Values { public static boolean updateFluidDisplayItems = true; public static final int STEAM_PER_WATER = 160; /** - * If true, then digital chest with AE2 storage bus will be accessible only through AE2 + * If true, then digital chest with AE2 storage bus will be accessible only through AE2 */ public static boolean disableDigitalChestsExternalAccess = false; @@ -490,29 +433,66 @@ public class GT_Values { public static final IIconContainer[] emptyIconContainerArray = new IIconContainer[3]; /** - * Pretty formatting for author names. + * Pretty formatting for author names. */ public static final String Colen = "" + EnumChatFormatting.DARK_RED - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "C" + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "C" + EnumChatFormatting.GOLD - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "o" + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "o" + EnumChatFormatting.GREEN - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "l" + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "l" + EnumChatFormatting.DARK_AQUA - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "e" + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "e" + EnumChatFormatting.DARK_PURPLE - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "n"; + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "n"; public static final String AuthorColen = "Author: " + Colen; - public static final String AuthorKuba = "Author: " + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + "k" - + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "u" - + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + "b" + EnumChatFormatting.YELLOW - + EnumChatFormatting.BOLD + "a" + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + "6" - + EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + "0" + EnumChatFormatting.AQUA - + EnumChatFormatting.BOLD + "0" + EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + "0"; - - public static final String AuthorBlueWeabo = "Author: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + "Blue" - + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "Weabo"; + public static final String AuthorKuba = "Author: " + EnumChatFormatting.DARK_RED + + EnumChatFormatting.BOLD + + "k" + + EnumChatFormatting.RED + + EnumChatFormatting.BOLD + + "u" + + EnumChatFormatting.GOLD + + EnumChatFormatting.BOLD + + "b" + + EnumChatFormatting.YELLOW + + EnumChatFormatting.BOLD + + "a" + + EnumChatFormatting.DARK_GREEN + + EnumChatFormatting.BOLD + + "6" + + EnumChatFormatting.GREEN + + EnumChatFormatting.BOLD + + "0" + + EnumChatFormatting.AQUA + + EnumChatFormatting.BOLD + + "0" + + EnumChatFormatting.DARK_AQUA + + EnumChatFormatting.BOLD + + "0"; + + public static final String AuthorBlueWeabo = "Author: " + EnumChatFormatting.BLUE + + EnumChatFormatting.BOLD + + "Blue" + + EnumChatFormatting.AQUA + + EnumChatFormatting.BOLD + + "Weabo"; // 7.5F comes from GT_Tool_Turbine_Large#getBaseDamage() given huge turbines are the most efficient now. public static double getMaxPlasmaTurbineEfficiencyFromMaterial(Materials material) { diff --git a/src/main/java/gregtech/api/enums/HeatingCoilLevel.java b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java index 62a4663bb4..f80f8139c6 100644 --- a/src/main/java/gregtech/api/enums/HeatingCoilLevel.java +++ b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java @@ -3,22 +3,23 @@ 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, // TPVALLOY 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, // TPVALLOY 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(); diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 4453d16653..e260b03936 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -3,22 +3,25 @@ package gregtech.api.enums; import static gregtech.api.enums.GT_Values.NI; import static gregtech.api.enums.GT_Values.W; +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 gregtech.api.interfaces.IItemContainer; import gregtech.api.util.GT_LanguageManager; 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.Locale; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; /** * Class containing all non-OreDict Items of GregTech. */ public enum ItemList implements IItemContainer { + Display_ITS_FREE, Display_Fluid, TE_Slag, @@ -2010,167 +2013,40 @@ public enum ItemList implements IItemContainer { ReinforcedPhotolithographicFrameworkCasing, RadiationProofPhotolithographicFrameworkCasing, InfinityCooledCasing; - 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 - }; - public static Fluid sOilExtraHeavy, - sEpichlorhydrin, - sDrillingFluid, - sBlueVitriol, - sNickelSulfate, - sGreenVitriol, - sToluene, - sNitrationMixture, - sRocketFuel, - sHydricSulfur, - sIndiumConcentrate, - sLeadZincSolution, + + 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 }; + public static Fluid sOilExtraHeavy, sEpichlorhydrin, sDrillingFluid, sBlueVitriol, sNickelSulfate, sGreenVitriol, + sToluene, sNitrationMixture, sRocketFuel, sHydricSulfur, sIndiumConcentrate, sLeadZincSolution, sHydrochloricAcid; private ItemStack mStack; private boolean mHasNotBeenSet; @@ -2275,10 +2151,8 @@ public enum ItemList implements IItemContainer { 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)); + 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 @@ -2322,9 +2196,8 @@ public enum ItemList implements IItemContainer { } /** - * Returns the internal stack. - * This method is unsafe. It's here only for quick operations. - * DON'T CHANGE THE RETURNED VALUE! + * Returns the internal stack. This method is unsafe. It's here only for quick operations. DON'T CHANGE THE RETURNED + * VALUE! */ public ItemStack getInternalStack_unsafe() { return mStack; diff --git a/src/main/java/gregtech/api/enums/MaterialBuilder.java b/src/main/java/gregtech/api/enums/MaterialBuilder.java index 5514b9382e..d265faae8e 100644 --- a/src/main/java/gregtech/api/enums/MaterialBuilder.java +++ b/src/main/java/gregtech/api/enums/MaterialBuilder.java @@ -1,11 +1,13 @@ package gregtech.api.enums; -import gregtech.api.objects.MaterialStack; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import gregtech.api.objects.MaterialStack; + public class MaterialBuilder { + public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5; private int metaItemSubID; @@ -46,34 +48,32 @@ public class MaterialBuilder { 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); + 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) { diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index fd30bfd231..86e4e3f1ca 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -4,6 +4,15 @@ import static gregtech.api.enums.FluidState.GAS; import static gregtech.api.enums.GT_Values.M; import static gregtech.api.enums.GT_Values.MOD_ID_DC; +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 cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -20,13 +29,6 @@ import gregtech.common.render.items.*; import gregtech.common.render.items.UniversiumRenderer; 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; @SuppressWarnings("unused") // API Legitimately has unused Members and Methods public class Materials implements IColorModulationContainer, ISubTagContainer { @@ -38,12 +40,14 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static volatile int VERSION = 509; /** - * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old materials enum + * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old + * materials enum */ @Deprecated public static Collection<Materials> VALUES = new LinkedHashSet<>(); /** - * 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. + * 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. */ // Spotless breaks the table below into many, many lines @@ -927,14 +931,18 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { /** * Superconductor re-routed for mod compatibility. Circuits are re-routed into SuperconductorUHV as well. - * <p>Internal name is now Superconductor while translated name is SuperconductorUHV.</p> + * <p> + * Internal name is now Superconductor while translated name is SuperconductorUHV. + * </p> + * * @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 + 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 @@ -962,7 +970,7 @@ 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<>(); @@ -971,16 +979,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public ArrayList<ItemStack> mMaterialItems = new ArrayList<>(); public Collection<SubTag> mSubTags = new LinkedHashSet<>(); public Enchantment mEnchantmentTools = null, mEnchantmentArmors = null; - public boolean mUnificatable, - mBlastFurnaceRequired = false, - mAutoGenerateBlastFurnaceRecipes = true, - mAutoGenerateVacuumFreezerRecipes = true, - mAutoGenerateRecycleRecipes = true, - mTransparent = false, - mHasParentMod = true, - mHasPlasma = false, - mHasGas = false, - mCustomOre = false; + public boolean mUnificatable, mBlastFurnaceRequired = false, mAutoGenerateBlastFurnaceRecipes = true, + mAutoGenerateVacuumFreezerRecipes = true, mAutoGenerateRecycleRecipes = true, mTransparent = false, + mHasParentMod = true, mHasPlasma = false, mHasGas = false, mCustomOre = false; public byte mEnchantmentToolsLevel = 0, mEnchantmentArmorsLevel = 0, mToolQuality = 0; public short mBlastFurnaceTemp = 0; public int mMeltingPoint = 0; @@ -1009,44 +1010,26 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public int processingMaterialTierEU = 0; public long mDensity = M; - public float mToolSpeed = 1.0F, - mHeatDamage = 0.0F, - mSteamMultiplier = 1.0F, - mGasMultiplier = 1.0F, + public float mToolSpeed = 1.0F, mHeatDamage = 0.0F, mSteamMultiplier = 1.0F, mGasMultiplier = 1.0F, mPlasmaMultiplier = 1.0F; - public String mChemicalFormula = "?", - mName, - mDefaultLocalName, - mCustomID = "null", - mConfigSection = "null", + public String mChemicalFormula = "?", mName, mDefaultLocalName, mCustomID = "null", mConfigSection = "null", mLocalizedName = "null"; public Dyes mColor = Dyes._NULL; public Element mElement = null; - public Materials mDirectSmelting = this, - mOreReplacement = this, - mMacerateInto = this, - mSmeltInto = this, - mArcSmeltInto = this, - mHandleMaterial = this, - mMaterialInto; + 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; /** - * 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. + * 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) { + public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, + boolean aUnificatable, String aName, String aDefaultLocalName) { this( aMetaItemSubID, aIconSet, @@ -1061,17 +1044,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { "null"); } - public Materials( - int aMetaItemSubID, - TextureSet aIconSet, - float aToolSpeed, - int aDurability, - int aToolQuality, - boolean aUnificatable, - String aName, - String aDefaultLocalName, - String aConfigSection, - boolean aCustomOre, + 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; @@ -1099,29 +1073,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { 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) { + 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, @@ -1150,29 +1105,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { "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, + 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, @@ -1204,52 +1140,29 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { /** * @param aMetaItemSubID the Sub-ID used in my own MetaItems. Range 0-1000. -1 for no Material - * @param aTypes which kind of Items should be generated. Bitmask as follows: - * 1 = Dusts of all kinds. - * 2 = Dusts, Ingots, Plates, Rods/Sticks, Machine Components and other Metal specific things. - * 4 = Dusts, Gems, Plates, Lenses (if transparent). - * 8 = Dusts, Impure Dusts, crushed Ores, purified Ores, centrifuged Ores etc. - * 16 = Cells - * 32 = Plasma Cells - * 64 = Tool Heads - * 128 = Gears - * 256 = Designates something as empty (only used for the Empty material) + * @param aTypes which kind of Items should be generated. Bitmask as follows: 1 = Dusts of all kinds. + * 2 = Dusts, Ingots, Plates, Rods/Sticks, Machine Components and other Metal specific + * things. 4 = Dusts, Gems, Plates, Lenses (if transparent). 8 = Dusts, Impure Dusts, + * crushed Ores, purified Ores, centrifuged Ores etc. 16 = Cells 32 = Plasma Cells 64 = + * Tool Heads 128 = Gears 256 = Designates something as empty (only used for the Empty + * material) * @param aR, aG, aB Color of the Material 0-255 each. * @param aA transparency of the Material Texture. 0 = fully visible, 255 = Invisible. * @param aName The Name used as Default for localization. * @param aFuelType Type of Generator to get Energy from this Material. - * @param aFuelPower EU generated. Will be multiplied by 1000, also additionally multiplied by 2 for Gems. - * @param aMeltingPoint Used to determine the smelting Costs in furnace. >>>>**ADD 20000 to remove EBF recipes to add them MANUALLY ! :D**<<<< + * @param aFuelPower EU generated. Will be multiplied by 1000, also additionally multiplied by 2 for + * Gems. + * @param aMeltingPoint Used to determine the smelting Costs in furnace. >>>>**ADD 20000 to remove EBF + * recipes to add them MANUALLY ! :D**<<<< * @param aBlastFurnaceTemp Used to determine the needed Heat capacity Costs in Blast Furnace. * @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) { + 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, @@ -1283,29 +1196,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { 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, + 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, @@ -1333,31 +1227,11 @@ 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, - Element aElement, - List<TC_Aspects.TC_AspectStack> 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, @@ -1392,31 +1266,11 @@ 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) { + 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, @@ -1445,32 +1299,11 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { 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) { + 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, @@ -1497,37 +1330,30 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { mExtraData = aExtraData; mMaterialList.addAll(aMaterialList); if (mMaterialList.size() == 1) mChemicalFormula = mMaterialList.get(0).toString(true); - else - mChemicalFormula = mMaterialList.stream() - .map(MaterialStack::toString) - .collect(Collectors.joining()) - .replaceAll("_", "-"); + else mChemicalFormula = mMaterialList.stream().map(MaterialStack::toString).collect(Collectors.joining()) + .replaceAll("_", "-"); int tAmountOfComponents = 0, tMeltingPoint = 0; for (MaterialStack tMaterial : mMaterialList) { tAmountOfComponents += tMaterial.mAmount; if (tMaterial.mMaterial.mMeltingPoint > 0) tMeltingPoint += tMaterial.mMaterial.mMeltingPoint * tMaterial.mAmount; - if (aAspects == null) - for (TC_Aspects.TC_AspectStack tAspect : tMaterial.mMaterial.mAspects) - tAspect.addToAspectList(mAspects); + if (aAspects == null) for (TC_Aspects.TC_AspectStack tAspect : tMaterial.mMaterial.mAspects) + tAspect.addToAspectList(mAspects); } if (mMeltingPoint < 0) mMeltingPoint = (short) (tMeltingPoint / tAmountOfComponents); tAmountOfComponents *= aDensityMultiplier; tAmountOfComponents /= aDensityDivider; - if (aAspects == null) - for (TC_Aspects.TC_AspectStack tAspect : mAspects) - tAspect.mAmount = Math.max(1, tAspect.mAmount / Math.max(1, tAmountOfComponents)); + if (aAspects == null) for (TC_Aspects.TC_AspectStack tAspect : mAspects) + tAspect.mAmount = Math.max(1, tAspect.mAmount / Math.max(1, tAmountOfComponents)); else mAspects.addAll(aAspects); } 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); @@ -1536,8 +1362,7 @@ 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) + AnnealedCopper.setSmeltingInto(AnnealedCopper).setMaceratingInto(AnnealedCopper) .setArcSmeltingInto(AnnealedCopper); Netherrack.setSmeltingInto(NetherBrick); MeatRaw.setSmeltingInto(MeatCooked); @@ -1553,14 +1378,10 @@ 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) + 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) + 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); @@ -1703,8 +1524,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } /** - * DO NOT ADD MORE THAN 1 TOOL AND ARMOR ENCHANTMENT PER MATERIAL! - * It will get overwritten! + * DO NOT ADD MORE THAN 1 TOOL AND ARMOR ENCHANTMENT PER MATERIAL! It will get overwritten! */ private static void setEnchantments() { setToolEnchantments(); @@ -2001,10 +1821,8 @@ 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)"; EnrichedHolmium.mChemicalFormula = "Nq+\u2088Ho\u2082"; Grade1PurifiedWater.mChemicalFormula = "H₂O"; @@ -2020,8 +1838,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { private static void initSubTags() { SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM.addTo(Bastnasite, Monazite, Forcicium, Forcillium); - SubTag.ELECTROMAGNETIC_SEPERATION_GOLD.addTo( - Magnetite, VanadiumMagnetite, BasalticMineralSand, GraniticMineralSand); + SubTag.ELECTROMAGNETIC_SEPERATION_GOLD + .addTo(Magnetite, VanadiumMagnetite, BasalticMineralSand, GraniticMineralSand); SubTag.NO_RECIPES.addTo(MagnetohydrodynamicallyConstrainedStarMatter); @@ -2043,8 +1861,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Chromite, Andradite); - SubTag.BLASTFURNACE_CALCITE_DOUBLE.addTo( - Pyrite, BrownLimonite, YellowLimonite, BasalticMineralSand, GraniticMineralSand, Magnetite); + SubTag.BLASTFURNACE_CALCITE_DOUBLE + .addTo(Pyrite, BrownLimonite, YellowLimonite, BasalticMineralSand, GraniticMineralSand, Magnetite); SubTag.BLASTFURNACE_CALCITE_TRIPLE.addTo(Iron, PigIron, DeepIron, ShadowIron, WroughtIron, MeteoricIron); @@ -2420,14 +2238,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); @@ -2471,7 +2289,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); @@ -2490,21 +2308,19 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { 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 + 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. + 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); @@ -2545,13 +2361,17 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { if (aMaterial.mHasParentMod) { 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!"); + } else 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"); + } else throw new IllegalArgumentException( + "The Material Index " + aMaterial.mMetaItemSubID + + " for " + + aMaterial.mName + + " is/over the maximum of 1000"); } } } @@ -2562,22 +2382,22 @@ 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)); } 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.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", @@ -2586,17 +2406,21 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } 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] + ",") + 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]); @@ -2605,26 +2429,20 @@ 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); if (aMaterial == Materials.SpaceTime) { aMaterial.mHandleMaterial = Materials.Infinity; @@ -2636,8 +2454,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void addEnchantmentValues(Materials aMaterial, String aConfigPath) { - aMaterial.mEnchantmentToolsLevel = (byte) - GregTech_API.sMaterialProperties.get(aConfigPath, "EnchantmentLevel", aMaterial.mEnchantmentToolsLevel); + aMaterial.mEnchantmentToolsLevel = (byte) GregTech_API.sMaterialProperties + .get(aConfigPath, "EnchantmentLevel", aMaterial.mEnchantmentToolsLevel); String aEnchantmentName = GregTech_API.sMaterialProperties.get( aConfigPath, "Enchantment", @@ -2651,24 +2469,29 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { 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.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.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) { @@ -2681,22 +2504,26 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { aMaterial.mHasGas = GregTech_API.sMaterialProperties.get(aConfigPath, "AddGas", aMaterial.mHasGas); if (aMaterial.mHasGas) { GT_FluidFactory.of( - aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName, aMaterial, GAS, aMaterial.mGasTemp); + aMaterial.mName.toLowerCase(), + aMaterial.mDefaultLocalName, + aMaterial, + GAS, + aMaterial.mGasTemp); } } } private static void addInternalStuff(Materials aMaterial, String aConfigPath) { - aMaterial.mMetaItemSubID = GregTech_API.sMaterialProperties.get( - aConfigPath, "MaterialID", aMaterial.mCustomOre ? -1 : aMaterial.mMetaItemSubID); + 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.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) { @@ -2704,8 +2531,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { aConfigPath, "MaterialName", aMaterial.mCustomOre ? "CustomOre" + aMaterial.mCustomID : aMaterial.mDefaultLocalName); - aMaterial.mChemicalFormula = - GregTech_API.sMaterialProperties.get(aConfigPath, "ChemicalFormula", aMaterial.mChemicalFormula); + aMaterial.mChemicalFormula = GregTech_API.sMaterialProperties + .get(aConfigPath, "ChemicalFormula", aMaterial.mChemicalFormula); } private static String getConfigPath(Materials aMaterial) { @@ -2715,22 +2542,21 @@ 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 + 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); + 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() { @@ -2762,17 +2588,15 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { private static void aspectCalculation(Materials aMaterial, String aConfigPath) { - String aDefaultAspectString = aMaterial.mAspects.stream() - .map(aAspectStack -> aAspectStack.mAspect.toString()) + 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(",", ",", "")); + .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)) { @@ -2791,60 +2615,55 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void OreReRegistrationsCalculation(Materials aMaterial, String aConfigPath) { - String aDefaultMatReRegString = aMaterial.mOreReRegistrations.stream() - .map(aTag -> aTag.mName) + String aDefaultMatReRegString = aMaterial.mOreReRegistrations.stream().map(aTag -> aTag.mName) .collect(Collectors.joining(",", ",", "")); - String aConfigMatMatReRegString = GregTech_API.sMaterialProperties.get( - aConfigPath, "ListMaterialReRegistrations", aDefaultMatReRegString); + 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) + 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) + Arrays.stream(aConfigMatByProString.split(",")).map(MATERIALS_MAP::get).filter(Objects::nonNull) .forEach(aMat -> aMaterial.mOreByProducts.add(aMat)); } } } /** - * Converts the pre-defined list of SubTags from a material into a list of SubTag names for setting/getting to/from the config. - * It is then converted to a String[] and finally to a singular String for insertion into the config - * 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. + * Converts the pre-defined list of SubTags from a material into a list of SubTag names for setting/getting to/from + * the config. It is then converted to a String[] and finally to a singular String for insertion into the config 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) + Arrays.stream(aConfigTagString.split(",")).map(SubTag.sSubTags::get).filter(Objects::nonNull) .forEach(aTag -> aMaterial.mSubTags.add(aTag)); } } } /** - * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old materials enum + * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old + * materials enum */ @Deprecated public static Materials valueOf(String aMaterialName) { @@ -2852,7 +2671,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } /** - * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old materials enum + * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old + * materials enum */ public static Materials[] values() { return MATERIALS_ARRAY; @@ -2918,7 +2738,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } /** - * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old materials enum + * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old + * materials enum */ @Deprecated public String name() { @@ -2984,9 +2805,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { 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; + ? mChemicalFormula + : "(" + mChemicalFormula + ")") + aMultiplier; } return mChemicalFormula; } @@ -3004,8 +2824,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ 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()))); + return mMaterialItems.stream().anyMatch( + tStack -> Arrays.stream(aStacks) + .anyMatch(aStack -> GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound()))); } /** @@ -3015,11 +2836,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { if (aStack == null) return false; boolean temp = false; int mMaterialItems_sS = mMaterialItems.size(); - for (int i = 0; i < mMaterialItems_sS; i++) - if (GT_Utility.areStacksEqual(aStack, mMaterialItems.get(i))) { - mMaterialItems.remove(i--); - temp = true; - } + for (int i = 0; i < mMaterialItems_sS; i++) if (GT_Utility.areStacksEqual(aStack, mMaterialItems.get(i))) { + mMaterialItems.remove(i--); + temp = true; + } return temp; } @@ -3028,12 +2848,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ @Override public ISubTagContainer add(SubTag... aTags) { - if (aTags != null) - for (SubTag aTag : aTags) - if (aTag != null && !contains(aTag)) { - aTag.addContainerToList(this); - mSubTags.add(aTag); - } + if (aTags != null) for (SubTag aTag : aTags) if (aTag != null && !contains(aTag)) { + aTag.addContainerToList(this); + mSubTags.add(aTag); + } return this; } @@ -3063,8 +2881,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } /** - * Adds a Material to the List of Byproducts when grinding this Ore. - * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials. + * Adds a Material to the List of Byproducts when grinding this Ore. Is used for more precise Ore grinding, so that + * it is possible to choose between certain kinds of Materials. */ @SuppressWarnings("UnusedReturnValue") // Maintains signature public Materials addOreByProduct(Materials aMaterial) { @@ -3073,8 +2891,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } /** - * Adds multiple Materials to the List of Byproducts when grinding this Ore. - * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials. + * Adds multiple Materials to the List of Byproducts when grinding this Ore. 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); @@ -3082,8 +2900,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } /** - * If this Ore gives multiple drops of its Main Material. - * Lapis Ore for example gives about 6 drops. + * If this Ore gives multiple drops of its Main Material. Lapis Ore for example gives about 6 drops. */ public Materials setOreMultiplier(int aOreMultiplier) { if (aOreMultiplier > 0) mOreMultiplier = aOreMultiplier; @@ -3100,8 +2917,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } /** - * If this Ore gives multiple drops of its Main Material. - * Lapis Ore for example gives about 6 drops. + * If this Ore gives multiple drops of its Main Material. Lapis Ore for example gives about 6 drops. */ public Materials setSmeltingMultiplier(int aSmeltingMultiplier) { if (aSmeltingMultiplier > 0) mSmeltingMultiplier = aSmeltingMultiplier; @@ -3117,8 +2933,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } /** - * This Material should be the Main Material this Ore gets ground into. - * Example, Chromite giving Chrome or Tungstate giving Tungsten. + * This Material should be the Main Material this Ore gets ground into. Example, Chromite giving Chrome or Tungstate + * giving Tungsten. */ @SuppressWarnings("UnusedReturnValue") // Maintains signature public Materials setOreReplacement(Materials aMaterial) { @@ -3306,12 +3122,13 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { return new FluidStack(steamCrackedFluids[2], amount); } - /** Check that the material is a proper soldering fluid - ** @return true if Materials is a proper soldering fluid + /** + * Check that the material is a proper soldering fluid + ** + * @return true if Materials is a proper soldering fluid */ public boolean isProperSolderingFluid() { - return mStandardMoltenFluid != null - && contains(SubTag.SOLDERING_MATERIAL) + return mStandardMoltenFluid != null && contains(SubTag.SOLDERING_MATERIAL) && !(GregTech_API.mUseOnlyGoodSolderingMaterials && !contains(SubTag.SOLDERING_MATERIAL_GOOD)); } diff --git a/src/main/java/gregtech/api/enums/MaterialsBotania.java b/src/main/java/gregtech/api/enums/MaterialsBotania.java index ef07ec4297..f6ae06408e 100644 --- a/src/main/java/gregtech/api/enums/MaterialsBotania.java +++ b/src/main/java/gregtech/api/enums/MaterialsBotania.java @@ -2,75 +2,45 @@ package gregtech.api.enums; import static gregtech.api.enums.OrePrefixes.*; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; import java.util.Arrays; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; + 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))) + .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))) + .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))) + .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) + .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(); @@ -103,36 +73,19 @@ public class MaterialsBotania { 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) + .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))) + .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, diff --git a/src/main/java/gregtech/api/enums/MaterialsKevlar.java b/src/main/java/gregtech/api/enums/MaterialsKevlar.java index be1ef3b0f1..1c23f17698 100644 --- a/src/main/java/gregtech/api/enums/MaterialsKevlar.java +++ b/src/main/java/gregtech/api/enums/MaterialsKevlar.java @@ -1,271 +1,221 @@ package gregtech.api.enums; -import gregtech.api.objects.MaterialStack; import java.util.Arrays; +import gregtech.api.objects.MaterialStack; + 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 + 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 + 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 + 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) + .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))) + .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) + .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))) + .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) + .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))) + .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) + .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))) + .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) + .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))) + .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) + .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))) + .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) + .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))) + .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) + .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))) + .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) + .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))) + .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) + .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 + 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) + 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) + .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))) + .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 + 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) + .setName("Methylamine").addCell().addGas().setRGB(65, 68, 105).setColor(Dyes.dyeGray).setMeltingPoint(180) .setExtraData(1) .setMaterialList( new MaterialStack(Materials.Carbon, 1), @@ -273,24 +223,15 @@ public class MaterialsKevlar { 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) + .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) + .setName("GammaButyrolactone").addCell().addFluid().setRGB(255, 255, 151).setColor(Dyes.dyeYellow) .setMeltingPoint(229) .setMaterialList( new MaterialStack(Materials.Carbon, 4), @@ -298,101 +239,56 @@ public class MaterialsKevlar { 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) + .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 + 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) + .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) + .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 + .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) + .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) + .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) + .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) + .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) + 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) + .setName("TerephthalicAcid").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite) .setMeltingPoint(480) .setMaterialList( new MaterialStack(Materials.Carbon, 8L), @@ -400,28 +296,15 @@ public class MaterialsKevlar { 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) + .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 + .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) + .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 + .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) + .setName("Cobalt(II)Naphthenate").addDustItems().setRGB(143, 95, 39).setColor(Dyes.dyeBrown) .setMeltingPoint(413) .setMaterialList( new MaterialStack(Materials.Cobalt, 1), @@ -430,19 +313,10 @@ public class MaterialsKevlar { 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) - .setFuelType(MaterialBuilder.SEMIFLUID) - .setFuelPower(80) - .constructMaterial(); + .setName("NaphthenicAcid").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite) + .setFuelType(MaterialBuilder.SEMIFLUID).setFuelPower(80).constructMaterial(); public static Materials CobaltIIHydroxide = new MaterialBuilder(759, TextureSet.SET_POWDER, "Cobalt II Hydroxide") - .setName("CobaltIIHydroxide") - .addDustItems() - .setRGB(229, 140, 239) - .setColor(Dyes.dyePurple) + .setName("CobaltIIHydroxide").addDustItems().setRGB(229, 140, 239).setColor(Dyes.dyePurple) .setMeltingPoint(441) .setMaterialList( new MaterialStack(Materials.Cobalt, 1), @@ -450,10 +324,7 @@ public class MaterialsKevlar { 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) + .setName("Cobalt(II)Acetate").addDustItems().setRGB(219, 162, 229).setColor(Dyes.dyePurple) .setMeltingPoint(413) .setMaterialList( new MaterialStack(Materials.Carbon, 4L), @@ -462,30 +333,21 @@ public class MaterialsKevlar { 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) + .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 + 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) + .setName("SodiumBorohydride").addDustItems().setRGB(255, 255, 255).setColor(Dyes.dyeWhite) .setMeltingPoint(673) .setMaterialList( new MaterialStack(Materials.Sodium, 1), @@ -493,17 +355,10 @@ public class MaterialsKevlar { 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) + .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) + .setName("Triphenylphosphene").addDustItems().setRGB(255, 255, 255).setColor(Dyes.dyeWhite) .setMeltingPoint(353) .setMaterialList( new MaterialStack(Materials.Carbon, 18L), @@ -511,29 +366,21 @@ public class MaterialsKevlar { 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 + 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) + .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) + .setName("TrimethylBorate").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite) .setMeltingPoint(239) .setMaterialList( new MaterialStack(Materials.Carbon, 3L), @@ -542,10 +389,7 @@ public class MaterialsKevlar { 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) + .setName("SodiumMethoxide").addDustItems().setRGB(255, 255, 255).setColor(Dyes.dyeWhite) .setMeltingPoint(400) .setMaterialList( new MaterialStack(Materials.Carbon, 1L), @@ -557,7 +401,8 @@ public class MaterialsKevlar { // H3RhCl6 /** - * called by Materials. Can be safely called multiple times. exists to allow Materials ensure this class is initialized + * called by Materials. Can be safely called multiple times. exists to allow Materials ensure this class is + * initialized */ public static void init() { // no-op. all work is done by <clinit> diff --git a/src/main/java/gregtech/api/enums/MaterialsOreAlum.java b/src/main/java/gregtech/api/enums/MaterialsOreAlum.java index 14e75b3efa..f90e39e493 100644 --- a/src/main/java/gregtech/api/enums/MaterialsOreAlum.java +++ b/src/main/java/gregtech/api/enums/MaterialsOreAlum.java @@ -3,74 +3,34 @@ package gregtech.api.enums; public class MaterialsOreAlum { public static Materials BauxiteSlurry = new MaterialBuilder(409, TextureSet.SET_FLUID, "Bauxite Slurry") - .setName("BauxiteSlurry") - .addCell() - .addFluid() - .setRGB(37, 67, 168) - .setMeltingPoint(295) - .setColor(Dyes.dyeBlue) - .constructMaterial(); + .setName("BauxiteSlurry").addCell().addFluid().setRGB(37, 67, 168).setMeltingPoint(295) + .setColor(Dyes.dyeBlue).constructMaterial(); public static Materials HeatedBauxiteSlurry = new MaterialBuilder( - 410, TextureSet.SET_FLUID, "Heated Bauxite Slurry") - .setName("HeadedBauxiteSlurry") - .addCell() - .addFluid() - .setRGB(55, 92, 212) - .setLiquidTemperature(533) - .setMeltingPoint(295) - .setColor(Dyes.dyeBlue) - .constructMaterial(); + 410, + TextureSet.SET_FLUID, + "Heated Bauxite Slurry").setName("HeadedBauxiteSlurry").addCell().addFluid().setRGB(55, 92, 212) + .setLiquidTemperature(533).setMeltingPoint(295).setColor(Dyes.dyeBlue).constructMaterial(); public static Materials SluiceJuice = new MaterialBuilder(411, TextureSet.SET_FLUID, "Sluice Juice") - .setName("SluiceJuice") - .addCell() - .addFluid() - .setRGB(92, 60, 36) - .setLiquidTemperature(295) - .setMeltingPoint(295) - .setColor(Dyes.dyeGray) - .constructMaterial(); + .setName("SluiceJuice").addCell().addFluid().setRGB(92, 60, 36).setLiquidTemperature(295) + .setMeltingPoint(295).setColor(Dyes.dyeGray).constructMaterial(); public static Materials SluiceSand = new MaterialBuilder(412, TextureSet.SET_FINE, "Sluice Sand") - .setName("SluiceSand") - .addDustItems() - .setRGB(165, 165, 120) - .setColor(Dyes.dyeGray) - .constructMaterial(); + .setName("SluiceSand").addDustItems().setRGB(165, 165, 120).setColor(Dyes.dyeGray).constructMaterial(); public static Materials BauxiteSlag = new MaterialBuilder(413, TextureSet.SET_FINE, "Bauxite Slag") - .setName("BauxiteSlag") - .addDustItems() - .setRGB(110, 31, 31) - .setColor(Dyes.dyeRed) - .constructMaterial(); + .setName("BauxiteSlag").addDustItems().setRGB(110, 31, 31).setColor(Dyes.dyeRed).constructMaterial(); public static Materials IlmeniteSlag = new MaterialBuilder(414, TextureSet.SET_FINE, "Ilmenite Slag") - .setName("IlmeniteSlag") - .addDustItems() - .setRGB(163, 38, 38) - .setColor(Dyes.dyeBrown) - .constructMaterial(); + .setName("IlmeniteSlag").addDustItems().setRGB(163, 38, 38).setColor(Dyes.dyeBrown).constructMaterial(); public static Materials GreenSapphireJuice = new MaterialBuilder(415, TextureSet.SET_FLUID, "Green Sapphire Juice") - .setName("GreenSapphireJuice") - .addCell() - .addFluid() - .setRGB(100, 200, 130) - .setColor(Dyes.dyeGreen) + .setName("GreenSapphireJuice").addCell().addFluid().setRGB(100, 200, 130).setColor(Dyes.dyeGreen) .constructMaterial(); public static Materials SapphireJuice = new MaterialBuilder(416, TextureSet.SET_FLUID, "Sapphire Juice") - .setName("SapphireJuice") - .addCell() - .addFluid() - .setRGB(100, 100, 200) - .setColor(Dyes.dyeBlue) + .setName("SapphireJuice").addCell().addFluid().setRGB(100, 100, 200).setColor(Dyes.dyeBlue) .constructMaterial(); public static Materials RubyJuice = new MaterialBuilder(417, TextureSet.SET_FLUID, "Ruby Juice") - .setName("RubyJuice") - .addCell() - .addFluid() - .setRGB(255, 100, 100) - .setColor(Dyes.dyeRed) - .constructMaterial(); + .setName("RubyJuice").addCell().addFluid().setRGB(255, 100, 100).setColor(Dyes.dyeRed).constructMaterial(); /** - * called by Materials. Can be safely called multiple times. exists to allow Materials ensure this class is initialized + * called by Materials. Can be safely called multiple times. exists to allow Materials ensure this class is + * initialized */ public static void init() { // no-op. all work is done by <clinit> diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index cd78d3a560..7e102d5a2b 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -2,7 +2,12 @@ package gregtech.api.enums; import static gregtech.api.enums.GT_Values.*; +import java.util.*; + +import net.minecraft.item.ItemStack; + import com.google.common.collect.ImmutableList; + import gregtech.api.GregTech_API; import gregtech.api.enums.TC_Aspects.TC_AspectStack; import gregtech.api.interfaces.ICondition; @@ -17,2853 +22,528 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; import gregtech.loaders.materialprocessing.ProcessingModSupport; -import java.util.*; -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), + 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! + 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, + 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 + 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, + reduced("Reduced 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, - 64, - 16), // A quintuple Ingot. - ingotQuadruple( - "4x Ingots", - "Quadruple ", - " Ingot", - true, - true, - false, - false, - false, - false, - true, - true, - false, - false, - B[1], - M * 4, - 64, - 15), // A quadruple Ingot. + 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, 64, 16), // A quintuple Ingot. + ingotQuadruple("4x Ingots", "Quadruple ", " Ingot", true, true, false, false, false, false, true, true, false, + false, B[1], M * 4, 64, 15), // A quadruple Ingot. @Deprecated - ingotQuad( - "4x Ingots", - "Quadruple ", - " Ingot", - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - B[1], - -1, - 64, - 15), - ingotTriple( - "3x Ingots", - "Triple ", - " Ingot", - true, - true, - false, - false, - false, - false, - true, - false, - false, - false, - B[1], - M * 3, - 64, - 14), // A triple Ingot. - ingotDouble( - "2x Ingots", - "Double ", - " Ingot", - true, - true, - false, - false, - false, - false, - true, - true, - false, - false, - B[1], - M * 2, - 64, - 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, + ingotQuad("4x Ingots", "Quadruple ", " Ingot", false, false, false, false, false, false, false, false, false, false, + B[1], -1, 64, 15), + ingotTriple("3x Ingots", "Triple ", " Ingot", true, true, false, false, false, false, true, false, false, false, + B[1], M * 3, 64, 14), // A triple Ingot. + ingotDouble("2x Ingots", "Double ", " Ingot", true, true, false, false, false, false, true, true, false, false, + B[1], M * 2, 64, 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, - 64, - 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, - 64, - 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 + 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, 64, 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, 64, 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, + 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, - 64, - 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, - 64, - 21), - plateQuadruple( - "4x Plates", - "Quadruple ", - " Plate", - true, - true, - false, - false, - false, - false, - true, - true, - false, - false, - B[1], - M * 4, - 64, - 20), + 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, 64, 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, 64, 21), + plateQuadruple("4x Plates", "Quadruple ", " Plate", true, true, false, false, false, false, true, true, false, + false, B[1], M * 4, 64, 20), @Deprecated - plateQuad( - "4x Plates", - "", - "", - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - B[1], - -1, - 64, + plateQuad("4x Plates", "", "", false, false, false, false, false, false, false, false, false, false, B[1], -1, 64, 20), - plateTriple( - "3x Plates", - "Triple ", - " Plate", - true, - true, - false, - false, - false, - false, - true, - true, - false, - false, - B[1], - M * 3, - 64, - 19), - plateDouble( - "2x Plates", - "Double ", - " Plate", - true, - true, - false, - false, - false, - false, - true, - true, - false, - false, - B[1], - M * 2, - 64, - 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, + plateTriple("3x Plates", "Triple ", " Plate", true, true, false, false, false, false, true, true, false, false, + B[1], M * 3, 64, 19), + plateDouble("2x Plates", "Double ", " Plate", true, true, false, false, false, false, true, true, false, false, + B[1], M * 2, 64, 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, + 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, + 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, + 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, - 64, - 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, + 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, + 64, 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, + 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, - 64, - -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, - 64, - -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, - 64, - -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, - 64, - -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. + bucket("Buckets", "", " Bucket", true, true, true, true, false, false, true, false, false, false, B[4] | B[8], + M * 1, 64, -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, 64, -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, + 64, -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, 64, -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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, - 64, - 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, + 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, 64, 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, + 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, + 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 + 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, + 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. - 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, + 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, + 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, + 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, + 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. + 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, + 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, + 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, + 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 + 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), - - /* 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) + 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 + 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), @@ -2878,9 +558,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), @@ -2889,42 +569,26 @@ 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, + 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), @@ -2941,28 +605,12 @@ 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), @@ -2971,29 +619,13 @@ 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, + 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), @@ -3003,174 +635,30 @@ 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, - 64, - 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, 64, 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), - - 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, - false, - false, - 0, - -1, - 64, - -1), + 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), + + apiaryUpgrade("Industrial Apiary Upgrade", "", "", false, false, true, false, false, false, false, false, false, + false, 0, -1, 64, -1), beeComb("Bee Combs", "", "", true, false, true, false, false, false, false, false, false, false, 0, -1, 64, -1), nanite("Nanites", "", " Nanites", true, true, true, false, false, false, false, false, false, false, 0, -1, 64, 50); @@ -3228,9 +716,8 @@ public enum OrePrefixes { nugget.addFamiliarPrefix(ingot); for (OrePrefixes tPrefix1 : values()) - if (tPrefix1.name().startsWith("ore")) - for (OrePrefixes tPrefix2 : values()) - if (tPrefix2.name().startsWith("ore")) tPrefix1.addFamiliarPrefix(tPrefix2); + if (tPrefix1.name().startsWith("ore")) for (OrePrefixes tPrefix2 : values()) + if (tPrefix2.name().startsWith("ore")) tPrefix1.addFamiliarPrefix(tPrefix2); // These are only the important ones. gem.mNotGeneratedItems.add(Materials.Coal); @@ -3405,9 +892,13 @@ public enum OrePrefixes { 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)); + 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)); + SubTag.STRETCHY, + SubTag.BOUNCY, + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); gemChipped.mCondition = new ICondition.And<ISubTagContainer>( SubTag.TRANSPARENT, @@ -3435,16 +926,21 @@ public enum OrePrefixes { new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); lens.mCondition = new ICondition.Or<ISubTagContainer>( - SubTag.MAGICAL, new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.HAS_COLOR)); + 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)); + SubTag.PAPER, + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); plateTriple.mCondition = new ICondition.Or<ISubTagContainer>( - SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + SubTag.PAPER, + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); plateQuadruple.mCondition = new ICondition.Or<ISubTagContainer>( - SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + SubTag.PAPER, + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); plateQuintuple.mCondition = new ICondition.Or<ISubTagContainer>( - SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + SubTag.PAPER, + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); plateDense.mCondition = new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING); @@ -3488,10 +984,12 @@ 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); @@ -3502,29 +1000,18 @@ 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>(); /** - * Used to determine the amount of Material this Prefix contains. - * Multiply or Divide GregTech_API.MATERIAL_UNIT to get the Amounts in comparision to one Ingot. - * 0 = Null - * Negative = Undefined Amount + * Used to determine the amount of Material this Prefix contains. Multiply or Divide GregTech_API.MATERIAL_UNIT to + * get the Amounts in comparision to one Ingot. 0 = Null Negative = Undefined Amount */ public final long mMaterialAmount; public final Collection<Materials> mDisabledItems = new HashSet<Materials>(), - mNotGeneratedItems = new HashSet<Materials>(), - mIgnoredMaterials = 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; @@ -3534,84 +1021,72 @@ 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, - OrePrefixes.nanite)); + 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, + OrePrefixes.nanite)); /** * 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; @@ -3668,80 +1143,81 @@ 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 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 + 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 + if (!(aMaterial == Materials.DamascusSteel || aMaterial == Materials.Steel || aMaterial == Materials.Bronze - || aMaterial == Materials.Manganese)) crateGtIngot.mDisabledItems.add(aMaterial); + || aMaterial == Materials.Manganese)) + crateGtIngot.mDisabledItems.add(aMaterial); if (!(aMaterial == Materials.Neodymium || aMaterial == Materials.Chrome)) crateGtDust.mDisabledItems.add(aMaterial); crateGtGem.mDisabledItems.add(aMaterial); @@ -3754,10 +1230,8 @@ public enum OrePrefixes { arrowGtWood.mDisabledItems.add(aMaterial); } // Plates - if (!enableUnusedPlates - && ((aMaterial.mTypes & 0x40) == 0) - && !(aMaterial == Materials.Silicon - || aMaterial == Materials.Zinc + if (!enableUnusedPlates && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Silicon || aMaterial == Materials.Zinc || aMaterial == Materials.Europium || aMaterial == Materials.Americium || aMaterial == Materials.RedAlloy @@ -3786,7 +1260,8 @@ public enum OrePrefixes { || aMaterial == Materials.Sodalite || aMaterial == Materials.Gallium || aMaterial == Materials.GalliumArsenide - || aMaterial == Materials.IndiumGalliumPhosphide)) plate.mDisabledItems.add(aMaterial); + || aMaterial == Materials.IndiumGalliumPhosphide)) + plate.mDisabledItems.add(aMaterial); if (!enableUnusedIngotHot) { ingotHot.mDisabledItems.add(aMaterial); } @@ -3795,12 +1270,11 @@ public enum OrePrefixes { 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 + if (!enableUnusedDoublePlates && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Paper || aMaterial == Materials.Aluminium || aMaterial == Materials.Steel - || aMaterial == Materials.TungstenSteel)) plateDouble.mDisabledItems.add(aMaterial); + || aMaterial == Materials.TungstenSteel)) + plateDouble.mDisabledItems.add(aMaterial); if (!enableUnusedTriplePlates && !(aMaterial == Materials.Paper)) plateTriple.mDisabledItems.add(aMaterial); if (!enableUnusedQuadPlates && !(aMaterial == Materials.Paper)) @@ -3808,135 +1282,127 @@ public enum OrePrefixes { if (!enableUnusedQuinPlates && !(aMaterial == Materials.Paper)) plateQuintuple.mDisabledItems.add(aMaterial); if (!(enableUnusedDensePlates || GregTech_API.mGTPlusPlus) - && !(aMaterial == Materials.Iron - || aMaterial == Materials.Copper + && !(aMaterial == Materials.Iron || aMaterial == Materials.Copper || aMaterial == Materials.Lead || aMaterial == Materials.Paper || aMaterial == Materials.Thaumium - || aMaterial == Materials.Titanium)) plateDense.mDisabledItems.add(aMaterial); + || 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); + 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); + 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); + 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); + 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); + 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); + 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 + if (!enableUnusedBolts && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || aMaterial == Materials.Tin || aMaterial == Materials.Osmium @@ -3950,12 +1416,11 @@ public enum OrePrefixes { || aMaterial == Materials.TungstenSteel || aMaterial == Materials.Tungsten || aMaterial == Materials.HSSE - || aMaterial == Materials.HSSG)) bolt.mDisabledItems.add(aMaterial); + || aMaterial == Materials.HSSG)) + bolt.mDisabledItems.add(aMaterial); // Screws - if (!enableUnusedScrews - && ((aMaterial.mTypes & 0x40) == 0) - && !(aMaterial == Materials.Titanium - || aMaterial == Materials.Chrome + if (!enableUnusedScrews && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || aMaterial == Materials.Tin || aMaterial == Materials.Osmium @@ -3968,12 +1433,11 @@ public enum OrePrefixes { || aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSE - || aMaterial == Materials.HSSG)) screw.mDisabledItems.add(aMaterial); + || aMaterial == Materials.HSSG)) + screw.mDisabledItems.add(aMaterial); // Rods - if (!enableUnusedRods - && ((aMaterial.mTypes & 0x40) == 0) - && !(aMaterial == Materials.Titanium - || aMaterial == Materials.Chrome + if (!enableUnusedRods && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || aMaterial == Materials.Tin || aMaterial == Materials.Osmium @@ -4016,12 +1480,11 @@ public enum OrePrefixes { || aMaterial == Materials.Lapis || aMaterial == Materials.Lazurite || aMaterial == Materials.Sodalite - || aMaterial == Materials.PolyvinylChloride)) stick.mDisabledItems.add(aMaterial); + || aMaterial == Materials.PolyvinylChloride)) + stick.mDisabledItems.add(aMaterial); // Long Rods - if (!enableUnusedLongRods - && ((aMaterial.mTypes & 0x40) == 0) - && !(aMaterial == Materials.Titanium - || aMaterial == Materials.NeodymiumMagnetic + if (!enableUnusedLongRods && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Titanium || aMaterial == Materials.NeodymiumMagnetic || aMaterial == Materials.SamariumMagnetic || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE @@ -4029,7 +1492,8 @@ public enum OrePrefixes { || aMaterial == Materials.Americium || aMaterial == Materials.WroughtIron || aMaterial == Materials.Magnalium - || aMaterial == Materials.TungstenSteel)) stickLong.mDisabledItems.add(aMaterial); + || aMaterial == Materials.TungstenSteel)) + stickLong.mDisabledItems.add(aMaterial); if (!enableUnusedGems && ((aMaterial.mTypes & 0x04) == 0)) { gem.mDisabledItems.add(aMaterial); @@ -4052,15 +1516,12 @@ public enum OrePrefixes { } if (enablePerItemSettings) { StringBuilder aConfigPathSB = new StringBuilder(); - aConfigPathSB - .append("materialcomponents.") - .append(aMaterial.mConfigSection) - .append(".") + 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)); + 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 @@ -4082,15 +1543,14 @@ public enum OrePrefixes { } public static OrePrefixes getOrePrefix(String aOre) { - 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 == stickLong && aOre.equals("stickLongasssuperconductornameforuvwire")) return stick; - if (tPrefix == stickLong && aOre.equals("stickLongasssuperconductornameforuhvwire")) return stick; - return tPrefix; - } + 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 == stickLong && aOre.equals("stickLongasssuperconductornameforuvwire")) return stick; + if (tPrefix == stickLong && aOre.equals("stickLongasssuperconductornameforuhvwire")) return stick; + return tPrefix; + } return null; } @@ -4163,10 +1623,15 @@ public enum OrePrefixes { } public boolean doGenerateItem(Materials aMaterial) { - return aMaterial != null - && aMaterial != Materials._NULL - && ((aMaterial.mTypes & mMaterialGenerationBits) != 0 - || mGeneratedItems.contains(aMaterial) /*|| mDynamicItems.contains(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)); @@ -4206,10 +1671,14 @@ public enum OrePrefixes { && 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)); } } diff --git a/src/main/java/gregtech/api/enums/ParticleFX.java b/src/main/java/gregtech/api/enums/ParticleFX.java index 985ef3e4a8..c692598b89 100644 --- a/src/main/java/gregtech/api/enums/ParticleFX.java +++ b/src/main/java/gregtech/api/enums/ParticleFX.java @@ -4,6 +4,7 @@ package gregtech.api.enums; * Enumerates known EntityFX particles */ public enum ParticleFX { + HUGE_EXPLOSION("hugeexplosion"), LARGE_EXPLODE("largeexplode"), FIREWORKS_SPARK("fireworksSpark"), diff --git a/src/main/java/gregtech/api/enums/SoundResource.java b/src/main/java/gregtech/api/enums/SoundResource.java index 193aad3002..fe15c21deb 100644 --- a/src/main/java/gregtech/api/enums/SoundResource.java +++ b/src/main/java/gregtech/api/enums/SoundResource.java @@ -2,20 +2,25 @@ package gregtech.api.enums; 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 net.minecraft.util.ResourceLocation; +import com.google.common.collect.Maps; + /** * Enumerates known sounds with id and resource-location * - * <p>Note that the id serve no specific purpose, if for legacy compatibility of - * a plausible yet unimplemented network packet weight optimization.</p> + * <p> + * Note that the id serve no specific purpose, if for legacy compatibility of 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"), @@ -291,9 +296,7 @@ public enum SoundResource { private static final Map<String, SoundResource> RESOURCE_STR_SOUND_MAP = new ConcurrentHashMap<>(); static { - EnumSet.allOf(SoundResource.class).forEach(sound -> { - if (sound.id >= 0) ID_SOUND_MAP.put(sound.id, sound); - }); + 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)); } @@ -342,7 +345,9 @@ public enum SoundResource { * * @return The map for the deprecated {@link gregtech.api.GregTech_API#sSoundList} * @deprecated This method is planned for removal. - * <p>Use this {@link SoundResource} enum instead.</p> + * <p> + * Use this {@link SoundResource} enum instead. + * </p> */ @Deprecated public static Map<Integer, String> asSoundList() { diff --git a/src/main/java/gregtech/api/enums/SteamVariant.java b/src/main/java/gregtech/api/enums/SteamVariant.java index 333f678900..941b0d7231 100644 --- a/src/main/java/gregtech/api/enums/SteamVariant.java +++ b/src/main/java/gregtech/api/enums/SteamVariant.java @@ -3,6 +3,7 @@ package gregtech.api.enums; import java.util.Locale; public enum SteamVariant { + BRONZE, STEEL, PRIMITIVE, diff --git a/src/main/java/gregtech/api/enums/SubTag.java b/src/main/java/gregtech/api/enums/SubTag.java index 610e4a637b..1298e74f34 100644 --- a/src/main/java/gregtech/api/enums/SubTag.java +++ b/src/main/java/gregtech/api/enums/SubTag.java @@ -1,55 +1,58 @@ 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; +import gregtech.api.interfaces.ICondition; +import gregtech.api.interfaces.ISubTagContainer; + /** * Just a simple Class to be able to add special Tags for Materials. * <p/> - * The Tags should be added in preload and before I do my own preload to the Materials. - * In order to make yourself a new SubTag, just create one new instance of SubTag using getNewSubTag - * and use that one instance on all Materials you want to add those Tags to. + * The Tags should be added in preload and before I do my own preload to the Materials. In order to make yourself a new + * SubTag, just create one new instance of SubTag using getNewSubTag and use that one instance on all Materials you want + * to add those Tags to. * <p/> * You should look at this File whenever you update, maybe there are some new Tags you could use. * <p/> * ------------------------------------------------------------------------------------------------- * <p/> - * Some SubTags are used for other things than Materials too. It is useful when I need an easy way to declare Stuff in Items. + * Some SubTags are used for other things than Materials too. It is useful when I need an easy way to declare Stuff in + * Items. */ public final class SubTag implements ICondition<ISubTagContainer> { + public static final HashMap<String, SubTag> sSubTags = new HashMap<>(); private static long sSubtagID = 0; public final long mSubtagID; public final String mName; /** - * 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. + * 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"); /** - * 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 + * 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"); /** - * Materials which are outputting less in an Induction Smelter. Already listed are: - * Pyrite, Tetrahedrite, Sphalerite, Cinnabar + * Materials which are outputting less in an Induction Smelter. Already listed are: Pyrite, Tetrahedrite, + * Sphalerite, Cinnabar */ public static final SubTag INDUCTIONSMELTING_LOW_OUTPUT = getNewSubTag("INDUCTIONSMELTING_LOW_OUTPUT"); /** - * Add this to your Material if you want to have its Ore Sodium Persulfate washed. Already listed are: - * Zinc, Nickel, Copper, Cobalt, Cobaltite and Tetrahedrite. + * Add this to your Material if you want to have its Ore Sodium Persulfate washed. Already listed are: Zinc, Nickel, + * Copper, Cobalt, Cobaltite and Tetrahedrite. */ public static final SubTag WASHING_SODIUMPERSULFATE = getNewSubTag("WASHING_SODIUMPERSULFATE"); /** - * Add this to your Material if you want to have its Ore Mercury washed. Already listed are: - * Gold, Osmium, Mithril, Platinum, Midasium, Cooperite and AstralSilver. + * Add this to your Material if you want to have its Ore Mercury washed. Already listed are: Gold, Osmium, Mithril, + * Platinum, Midasium, Cooperite and AstralSilver. */ public static final SubTag WASHING_MERCURY = getNewSubTag("WASHING_MERCURY"); /** @@ -68,11 +71,11 @@ 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 + * Add this to your Material if you want to have its Ore giving Cinnabar Crystals on Pulverization. Already listed + * are: Redstone */ public static final SubTag PULVERIZING_CINNABAR = getNewSubTag("PULVERIZING_CINNABAR"); /** @@ -80,8 +83,8 @@ public final class SubTag implements ICondition<ISubTagContainer> { */ public static final SubTag NO_WORKING = getNewSubTag("NO_WORKING"); /** - * This Material cannot be used for regular Metal working techniques since it is not possible to bend it. Already listed are: - * Rubber, Plastic, Paper, Wood, Stone + * This Material cannot be used for regular Metal working techniques since it is not possible to bend it. Already + * listed are: Rubber, Plastic, Paper, Wood, Stone */ public static final SubTag NO_SMASHING = getNewSubTag("NO_SMASHING"); /** @@ -93,13 +96,11 @@ public final class SubTag implements ICondition<ISubTagContainer> { */ public static final SubTag NO_UNIFICATION = getNewSubTag("NO_UNIFICATION"); /** - * This Material cannot be used in any Recycler. Already listed are: - * Stone, Glass, Water + * This Material cannot be used in any Recycler. Already listed are: Stone, Glass, Water */ public static final SubTag NO_RECYCLING = getNewSubTag("NO_RECYCLING"); /** - * This Material cannot be used in any Furnace alike Structure. Already listed are: - * Paper, Wood, Gunpowder, Stone + * This Material cannot be used in any Furnace alike Structure. Already listed are: Paper, Wood, Gunpowder, Stone */ public static final SubTag NO_SMELTING = getNewSubTag("NO_SMELTING"); /** @@ -204,39 +205,27 @@ public final class SubTag implements ICondition<ISubTagContainer> { */ public static final SubTag SOLDERING_MATERIAL_GOOD = getNewSubTag("SOLDERING_MATERIAL_GOOD"); /** - * Energy Tag for Electricity - * Primary = Voltage - * Secondary = Amperage + * Energy Tag for Electricity Primary = Voltage Secondary = Amperage */ public static final SubTag ENERGY_ELECTRICITY = getNewSubTag("ENERGY_ELECTRICITY"); /** - * Energy Tag for Rotating Power - * Primary = Speed - * Secondary = Power + * Energy Tag for Rotating Power Primary = Speed Secondary = Power */ public static final SubTag ENERGY_ROTATIONAL = getNewSubTag("ENERGY_ROTATIONAL"); /** - * Energy Tag for Steam Power - * Primary = Steam per Tick - * Secondary = unused (always 1) + * Energy Tag for Steam Power Primary = Steam per Tick Secondary = unused (always 1) */ public static final SubTag ENERGY_STEAM = getNewSubTag("ENERGY_STEAM"); /** - * Energy Tag for Air Pressure Power - * Primary = Pressure - * Secondary = unused (always 1) + * Energy Tag for Air Pressure Power Primary = Pressure Secondary = unused (always 1) */ public static final SubTag ENERGY_AIR = getNewSubTag("ENERGY_AIR"); /** - * Energy Tag for Heat - * Primary = Temperature - * Secondary = unused (always 1) + * Energy Tag for Heat Primary = Temperature Secondary = unused (always 1) */ public static final SubTag ENERGY_HEAT = getNewSubTag("ENERGY_HEAT"); /** - * Energy Tag for RedstoneFlux - * Primary = unused (always 1) - * Secondary = RF + * Energy Tag for RedstoneFlux Primary = unused (always 1) Secondary = RF */ public static final SubTag ENERGY_REDSTONE_FLUX = getNewSubTag("ENERGY_REDSTONE_FLUX"); /** @@ -263,10 +252,8 @@ public final class SubTag implements ICondition<ISubTagContainer> { } public SubTag addContainerToList(ISubTagContainer... aContainers) { - if (aContainers != null) - for (ISubTagContainer aContainer : aContainers) - if (aContainer != null && !mRelevantTaggedItems.contains(aContainer)) - mRelevantTaggedItems.add(aContainer); + if (aContainers != null) for (ISubTagContainer aContainer : aContainers) + if (aContainer != null && !mRelevantTaggedItems.contains(aContainer)) mRelevantTaggedItems.add(aContainer); 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 cb578cf870..7d0ca56fbf 100644 --- a/src/main/java/gregtech/api/enums/TC_Aspects.java +++ b/src/main/java/gregtech/api/enums/TC_Aspects.java @@ -3,6 +3,7 @@ package gregtech.api.enums; import java.util.List; public enum TC_Aspects { + AER(1), ALIENIS(20), AQUA(3), @@ -70,6 +71,7 @@ public enum TC_Aspects { } public static class TC_AspectStack { + public TC_Aspects mAspect; public long mAmount; @@ -88,24 +90,22 @@ public enum TC_Aspects { public List<TC_AspectStack> addToAspectList(List<TC_AspectStack> aList) { if (mAmount == 0) return aList; - for (TC_AspectStack tAspect : aList) - if (tAspect.mAspect == mAspect) { - tAspect.mAmount += mAmount; - return aList; - } + for (TC_AspectStack tAspect : aList) if (tAspect.mAspect == mAspect) { + tAspect.mAmount += mAmount; + return aList; + } aList.add(copy()); return aList; } public boolean removeFromAspectList(List<TC_AspectStack> aList) { - for (TC_AspectStack tAspect : aList) - if (tAspect.mAspect == mAspect) { - if (tAspect.mAmount >= mAmount) { - tAspect.mAmount -= mAmount; - if (tAspect.mAmount == 0) aList.remove(tAspect); - return true; - } + for (TC_AspectStack tAspect : aList) if (tAspect.mAspect == mAspect) { + if (tAspect.mAmount >= mAmount) { + tAspect.mAmount -= mAmount; + if (tAspect.mAmount == 0) aList.remove(tAspect); + return true; } + } return false; } } diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java index b033e010d3..78829ca01f 100644 --- a/src/main/java/gregtech/api/enums/TextureSet.java +++ b/src/main/java/gregtech/api/enums/TextureSet.java @@ -3,311 +3,75 @@ package gregtech.api.enums; import gregtech.api.interfaces.IIconContainer; public class TextureSet { + private static final String aTextMatIconDir = "materialicons/"; private static final String aTextVoidDir = "/void"; - private static final TextureType[] IS_BLOCK_TEXTURE = new TextureType[] { - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.BLOCK, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - TextureType.ITEM, - }; - private static final String[] SUFFIXES = new String[] { - "/dustTiny", - "/dustSmall", - "/dust", - "/dustImpure", - "/dustPure", - "/crushed", - "/crushedPurified", - "/crushedCentrifuged", - "/gem", - "/nugget", - "/casingSmall", - "/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", - "/toolHeadScrewdriver", - "/toolHeadBuzzSaw", - "/toolHeadSoldering", - "/nanites", - "/wireFine", - "/gearGtSmall", - "/rotor", - "/stickLong", - "/springSmall", - "/spring", - "/arrowGtWood", - "/arrowGtPlastic", - "/gemChipped", - "/gemFlawed", - "/gemFlawless", - "/gemExquisite", - "/gearGt", - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - "/oreSmall", - "/ore", - "/wire", - "/foil", - "/block1", - "/block2", - "/block3", - "/block4", - "/block5", - "/block6", - "/pipeSide", - "/pipeTiny", - "/pipeSmall", - "/pipeMedium", - "/pipeLarge", - "/pipeHuge", - "/frameGt", - "/pipeQuadruple", - "/pipeNonuple", - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - "/crateGtDust", - "/crateGtIngot", - "/crateGtGem", - "/crateGtPlate", - "/turbineBlade", - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - aTextVoidDir, - "/handleMallet", - "/toolHeadMallet", - }; + private static final TextureType[] IS_BLOCK_TEXTURE = new TextureType[] { TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, + TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, + TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, + TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, + TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, + TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, + TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.BLOCK, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, TextureType.ITEM, + TextureType.ITEM, }; + private static final String[] SUFFIXES = new String[] { "/dustTiny", "/dustSmall", "/dust", "/dustImpure", + "/dustPure", "/crushed", "/crushedPurified", "/crushedCentrifuged", "/gem", "/nugget", "/casingSmall", + "/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", "/toolHeadScrewdriver", "/toolHeadBuzzSaw", "/toolHeadSoldering", + "/nanites", "/wireFine", "/gearGtSmall", "/rotor", "/stickLong", "/springSmall", "/spring", "/arrowGtWood", + "/arrowGtPlastic", "/gemChipped", "/gemFlawed", "/gemFlawless", "/gemExquisite", "/gearGt", aTextVoidDir, + aTextVoidDir, aTextVoidDir, "/oreSmall", "/ore", "/wire", "/foil", "/block1", "/block2", "/block3", + "/block4", "/block5", "/block6", "/pipeSide", "/pipeTiny", "/pipeSmall", "/pipeMedium", "/pipeLarge", + "/pipeHuge", "/frameGt", "/pipeQuadruple", "/pipeNonuple", aTextVoidDir, aTextVoidDir, aTextVoidDir, + aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, + "/crateGtDust", "/crateGtIngot", "/crateGtGem", "/crateGtPlate", "/turbineBlade", aTextVoidDir, + aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, + aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, + aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, aTextVoidDir, + aTextVoidDir, aTextVoidDir, aTextVoidDir, "/handleMallet", "/toolHeadMallet", }; public boolean is_custom = false; - public static final TextureSet SET_NONE = new TextureSet("NONE"), - SET_DULL = new TextureSet("DULL"), - SET_RUBY = new TextureSet("RUBY"), - SET_OPAL = new TextureSet("OPAL"), - SET_LEAF = new TextureSet("LEAF"), - SET_WOOD = new TextureSet("WOOD"), - SET_SAND = new TextureSet("SAND"), - SET_FINE = new TextureSet("FINE"), - SET_FIERY = new TextureSet("FIERY"), - SET_FLUID = new TextureSet("FLUID"), - SET_ROUGH = new TextureSet("ROUGH"), - SET_PAPER = new TextureSet("PAPER"), - SET_GLASS = new TextureSet("GLASS"), - SET_FLINT = new TextureSet("FLINT"), - SET_LAPIS = new TextureSet("LAPIS"), - SET_SHINY = new TextureSet("SHINY"), - SET_SHARDS = new TextureSet("SHARDS"), - SET_POWDER = new TextureSet("POWDER"), - SET_QUARTZ = new TextureSet("QUARTZ"), - SET_EMERALD = new TextureSet("EMERALD"), - SET_DIAMOND = new TextureSet("DIAMOND"), - SET_LIGNITE = new TextureSet("LIGNITE"), - SET_MAGNETIC = new TextureSet("MAGNETIC"), - SET_METALLIC = new TextureSet("METALLIC"), - SET_NETHERSTAR = new TextureSet("NETHERSTAR"), - SET_GEM_VERTICAL = new TextureSet("GEM_VERTICAL"), + public static final TextureSet SET_NONE = new TextureSet("NONE"), SET_DULL = new TextureSet("DULL"), + SET_RUBY = new TextureSet("RUBY"), SET_OPAL = new TextureSet("OPAL"), SET_LEAF = new TextureSet("LEAF"), + SET_WOOD = new TextureSet("WOOD"), SET_SAND = new TextureSet("SAND"), SET_FINE = new TextureSet("FINE"), + SET_FIERY = new TextureSet("FIERY"), SET_FLUID = new TextureSet("FLUID"), + SET_ROUGH = new TextureSet("ROUGH"), SET_PAPER = new TextureSet("PAPER"), + SET_GLASS = new TextureSet("GLASS"), SET_FLINT = new TextureSet("FLINT"), + SET_LAPIS = new TextureSet("LAPIS"), SET_SHINY = new TextureSet("SHINY"), + SET_SHARDS = new TextureSet("SHARDS"), SET_POWDER = new TextureSet("POWDER"), + SET_QUARTZ = new TextureSet("QUARTZ"), SET_EMERALD = new TextureSet("EMERALD"), + SET_DIAMOND = new TextureSet("DIAMOND"), SET_LIGNITE = new TextureSet("LIGNITE"), + SET_MAGNETIC = new TextureSet("MAGNETIC"), SET_METALLIC = new TextureSet("METALLIC"), + SET_NETHERSTAR = new TextureSet("NETHERSTAR"), SET_GEM_VERTICAL = new TextureSet("GEM_VERTICAL"), SET_GEM_HORIZONTAL = new TextureSet("GEM_HORIZONTAL"); /** * For the Indices of OrePrefixes you need to look into the OrePrefix Enum. */ - public static final short INDEX_wire = 69, - INDEX_foil = 70, - INDEX_block1 = 71, - INDEX_block2 = 72, - INDEX_block3 = 73, - INDEX_block4 = 74, - INDEX_block5 = 75, - INDEX_block6 = 76; + public static final short INDEX_wire = 69, INDEX_foil = 70, INDEX_block1 = 71, INDEX_block2 = 72, INDEX_block3 = 73, + INDEX_block4 = 74, INDEX_block5 = 75, INDEX_block6 = 76; public final IIconContainer[] mTextures = new IIconContainer[128]; public final String mSetName; diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 13a2ac8490..d3778a6253 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -3,19 +3,23 @@ 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 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; + public class Textures { + public enum BlockIcons implements IIconContainer, Runnable { + // ADDED MACHINE_UEV_SIDE, MACHINE_UIV_SIDE, @@ -1340,767 +1344,309 @@ public class Textures { LARGETURBINE_NEW_EMPTY6, LARGETURBINE_NEW_EMPTY7, LARGETURBINE_NEW_EMPTY8, - LARGETURBINE_NEW_EMPTY9, - ; + LARGETURBINE_NEW_EMPTY9,; + /** * Icon for Fresh CFoam */ - public static final ITexture[] FRESHFOAM = {TextureFactory.of(CFOAM_FRESH)}; + public static final ITexture[] FRESHFOAM = { TextureFactory.of(CFOAM_FRESH) }; /** - * Icons for Hardened CFoam - * 0 = No Color - * 1 - 16 = Colors + * Icons for Hardened CFoam 0 = No Color 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 + * 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 - }, - TURBINE_NEW = - { - LARGETURBINE_NEW1, - LARGETURBINE_NEW2, - LARGETURBINE_NEW3, - LARGETURBINE_NEW4, - LARGETURBINE_NEW5, - LARGETURBINE_NEW6, - LARGETURBINE_NEW7, - LARGETURBINE_NEW8, - LARGETURBINE_NEW9 - }, - TURBINE_NEW_ACTIVE = - { - LARGETURBINE_NEW_ACTIVE1, - LARGETURBINE_NEW_ACTIVE2, - LARGETURBINE_NEW_ACTIVE3, - LARGETURBINE_NEW_ACTIVE4, - LARGETURBINE_NEW_ACTIVE5, - LARGETURBINE_NEW_ACTIVE6, - LARGETURBINE_NEW_ACTIVE7, - LARGETURBINE_NEW_ACTIVE8, - LARGETURBINE_NEW_ACTIVE9 - }, - TURBINE_NEW_EMPTY = - { - LARGETURBINE_NEW_EMPTY1, - LARGETURBINE_NEW_EMPTY2, - LARGETURBINE_NEW_EMPTY3, - LARGETURBINE_NEW_EMPTY4, - LARGETURBINE_NEW_EMPTY5, - LARGETURBINE_NEW_EMPTY6, - LARGETURBINE_NEW_EMPTY7, - LARGETURBINE_NEW_EMPTY8, - LARGETURBINE_NEW_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, - BLOCK_TRANSCENDENTMETAL, - BLOCK_ORIHARUKON, - BLOCK_WHITEDWARFMATTER, - BLOCK_BLACKDWARFMATTER, - }; + 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 }, + TURBINE_NEW = { LARGETURBINE_NEW1, LARGETURBINE_NEW2, LARGETURBINE_NEW3, LARGETURBINE_NEW4, + LARGETURBINE_NEW5, LARGETURBINE_NEW6, LARGETURBINE_NEW7, LARGETURBINE_NEW8, LARGETURBINE_NEW9 }, + TURBINE_NEW_ACTIVE = { LARGETURBINE_NEW_ACTIVE1, LARGETURBINE_NEW_ACTIVE2, LARGETURBINE_NEW_ACTIVE3, + LARGETURBINE_NEW_ACTIVE4, LARGETURBINE_NEW_ACTIVE5, LARGETURBINE_NEW_ACTIVE6, + LARGETURBINE_NEW_ACTIVE7, LARGETURBINE_NEW_ACTIVE8, LARGETURBINE_NEW_ACTIVE9 }, + TURBINE_NEW_EMPTY = { LARGETURBINE_NEW_EMPTY1, LARGETURBINE_NEW_EMPTY2, LARGETURBINE_NEW_EMPTY3, + LARGETURBINE_NEW_EMPTY4, LARGETURBINE_NEW_EMPTY5, LARGETURBINE_NEW_EMPTY6, + LARGETURBINE_NEW_EMPTY7, LARGETURBINE_NEW_EMPTY8, LARGETURBINE_NEW_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, + BLOCK_TRANSCENDENTMETAL, BLOCK_ORIHARUKON, BLOCK_WHITEDWARFMATTER, BLOCK_BLACKDWARFMATTER, }; public static final ITexture[] HIDDEN_TEXTURE = { - TextureFactory.builder().addIcon(HIDDEN_FACE).stdOrient().build() - }; - public static final ITexture[] ERROR_RENDERING = {TextureFactory.of(RENDERING_ERROR)}; + TextureFactory.builder().addIcon(HIDDEN_FACE).stdOrient().build() }; + 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}), - }; - public static final ITexture[] LOCKERS = { - TextureFactory.of(OVERLAY_LOCKER_000), - TextureFactory.of(OVERLAY_LOCKER_001), - TextureFactory.of(OVERLAY_LOCKER_002), - TextureFactory.of(OVERLAY_LOCKER_003), - TextureFactory.of(OVERLAY_LOCKER_004), - TextureFactory.of(OVERLAY_LOCKER_005), - TextureFactory.of(OVERLAY_LOCKER_006), - TextureFactory.of(OVERLAY_LOCKER_007), - TextureFactory.of(OVERLAY_LOCKER_008), - TextureFactory.of(OVERLAY_LOCKER_009), - TextureFactory.of(OVERLAY_LOCKER_010), - TextureFactory.of(OVERLAY_LOCKER_011), - TextureFactory.of(OVERLAY_LOCKER_012), - TextureFactory.of(OVERLAY_LOCKER_013), - }; + 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), + TextureFactory.of(OVERLAY_LOCKER_001), TextureFactory.of(OVERLAY_LOCKER_002), + TextureFactory.of(OVERLAY_LOCKER_003), TextureFactory.of(OVERLAY_LOCKER_004), + TextureFactory.of(OVERLAY_LOCKER_005), TextureFactory.of(OVERLAY_LOCKER_006), + TextureFactory.of(OVERLAY_LOCKER_007), TextureFactory.of(OVERLAY_LOCKER_008), + TextureFactory.of(OVERLAY_LOCKER_009), TextureFactory.of(OVERLAY_LOCKER_010), + TextureFactory.of(OVERLAY_LOCKER_011), TextureFactory.of(OVERLAY_LOCKER_012), + TextureFactory.of(OVERLAY_LOCKER_013), }; /** * USE casingTexturePages[page] instead of CASING_BLOCKS since it is casingTexturePages[0] */ @@ -2109,28 +1655,23 @@ public class Textures { public static ITexture[][] MACHINE_CASINGS = new ITexture[15][17]; /** - * by Default pages are null - * page 0: 0-63 GT casing 1-4, 64-127 GT++ - * page 1: 0-15 GT casing 5, 22-26 GS dyson swarm, 48-57 GT casing 8, 63 EMT, 80-95 GT reinforced blocks, - * 96 casing 2 meta 6, 97 error casing - * page 8: 0-111 TecTech, 112-127 GT casing 6 - * page 12: 0-127 GlodBlock - * page 42: 0-126 glee8e, 127 KekzTech LSC base + * by Default pages are null page 0: 0-63 GT casing 1-4, 64-127 GT++ page 1: 0-15 GT casing 5, 22-26 GS dyson + * swarm, 48-57 GT casing 8, 63 EMT, 80-95 GT reinforced blocks, 96 casing 2 meta 6, 97 error casing page 8: + * 0-111 TecTech, 112-127 GT casing 6 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<>(); static { 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)); + 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)); casingTexturePages[0] = new ITexture[128]; // adds some known pages, modders also can do it... GT_Utility.addTexturePage((byte) 1); @@ -2186,6 +1727,7 @@ public class Textures { } public static class CustomIcon implements IIconContainer, Runnable { + protected IIcon mIcon; protected String mIconName; @@ -2217,6 +1759,7 @@ public class Textures { } public enum ItemIcons implements IIconContainer, Runnable { + VOID, // The Empty Texture RENDERING_ERROR, WRENCH, @@ -2272,33 +1815,14 @@ public class Textures { POCKET_MULTITOOL_WIRECUTTER, HALO, HALO_FUZZY; - 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, - }; - - public static final ITexture[] ERROR_RENDERING = {TextureFactory.of(RENDERING_ERROR)}; + + 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, }; + + public static final ITexture[] ERROR_RENDERING = { TextureFactory.of(RENDERING_ERROR) }; protected IIcon mIcon, mOverlay; @@ -2328,6 +1852,7 @@ public class Textures { } public static class CustomIcon implements IIconContainer, Runnable { + protected IIcon mIcon, mOverlay; protected String mIconName; diff --git a/src/main/java/gregtech/api/enums/Tier.java b/src/main/java/gregtech/api/enums/Tier.java index 766c381041..3af005750b 100644 --- a/src/main/java/gregtech/api/enums/Tier.java +++ b/src/main/java/gregtech/api/enums/Tier.java @@ -7,448 +7,441 @@ 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)), + 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)), - // 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 */ @@ -459,19 +452,9 @@ public class Tier { 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/TierEU.java b/src/main/java/gregtech/api/enums/TierEU.java index 0c920c1bb0..419580f92d 100644 --- a/src/main/java/gregtech/api/enums/TierEU.java +++ b/src/main/java/gregtech/api/enums/TierEU.java @@ -23,7 +23,7 @@ public class TierEU { public static final long UXV = V[13]; public static final long MAX = V[14]; - // Use me for recipes. + // Use me for recipes. public static final long RECIPE_ULV = GT_Values.VP[0]; public static final long RECIPE_LV = GT_Values.VP[1]; public static final long RECIPE_MV = GT_Values.VP[2]; diff --git a/src/main/java/gregtech/api/enums/ToolDictNames.java b/src/main/java/gregtech/api/enums/ToolDictNames.java index 27e297de5e..9b1c3e594a 100644 --- a/src/main/java/gregtech/api/enums/ToolDictNames.java +++ b/src/main/java/gregtech/api/enums/ToolDictNames.java @@ -1,6 +1,7 @@ package gregtech.api.enums; public enum ToolDictNames { + craftingToolSaw, craftingToolHoe, craftingToolAxe, diff --git a/src/main/java/gregtech/api/events/BlockScanningEvent.java b/src/main/java/gregtech/api/events/BlockScanningEvent.java index 85d2e3e07a..9d7500a8b0 100644 --- a/src/main/java/gregtech/api/events/BlockScanningEvent.java +++ b/src/main/java/gregtech/api/events/BlockScanningEvent.java @@ -1,13 +1,15 @@ 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 cpw.mods.fml.common.eventhandler.Cancelable; + @Cancelable public class BlockScanningEvent extends WorldEvent { @@ -24,19 +26,8 @@ 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, + 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; diff --git a/src/main/java/gregtech/api/fluid/FluidTankGT.java b/src/main/java/gregtech/api/fluid/FluidTankGT.java index 93b3c87575..f10e65d100 100644 --- a/src/main/java/gregtech/api/fluid/FluidTankGT.java +++ b/src/main/java/gregtech/api/fluid/FluidTankGT.java @@ -2,16 +2,19 @@ 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 gregtech.api.util.GT_Utility; + public class FluidTankGT implements IFluidTank { - public final FluidTankGT[] AS_ARRAY = new FluidTankGT[] {this}; + + public final FluidTankGT[] AS_ARRAY = new FluidTankGT[] { this }; private FluidStack mFluid; private long mCapacity = 0, mAmount = 0; private boolean mPreventDraining = false, mVoidExcess = false, mChangedFluids = false; @@ -191,18 +194,15 @@ public class FluidTankGT implements IFluidTank { return mVoidExcess ? aFluid.amount : (int) tFilled; } return saturatedCast( - isEmpty() - ? mVoidExcess ? aFluid.amount : Math.min(capacity(aFluid), aFluid.amount) + 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) + return aFluid == null || aFluid.amount <= 0 + || (isEmpty() ? mVoidExcess || aFluid.amount <= capacity(aFluid) : contains(aFluid) && (mVoidExcess || mAmount + aFluid.amount <= capacity(aFluid))); } @@ -263,6 +263,7 @@ public class FluidTankGT implements IFluidTank { } return false; } + /** Resets Tank Contents entirely */ public FluidTankGT setEmpty() { mFluid = null; @@ -271,7 +272,7 @@ public class FluidTankGT implements IFluidTank { return this; } - /** Sets Fluid Content, taking Amount from the Fluid Parameter */ + /** Sets Fluid Content, taking Amount from the Fluid Parameter */ public FluidTankGT setFluid(FluidStack aFluid) { mFluid = aFluid; mChangedFluids = true; @@ -287,7 +288,7 @@ public class FluidTankGT implements IFluidTank { return this; } - /** Sets Fluid Content, taking Amount from the Tank Parameter */ + /** Sets Fluid Content, taking Amount from the Tank Parameter */ public FluidTankGT setFluid(FluidTankGT aTank) { mFluid = new FluidStack(aTank.mFluid, saturatedCast(aTank.mAmount)); mChangedFluids = true; @@ -306,7 +307,8 @@ public class FluidTankGT implements IFluidTank { if (aCapacity >= 0) mCapacity = aCapacity; return this; } - /** Sets the Capacity Multiplier */ + + /** Sets the Capacity Multiplier */ public FluidTankGT setCapacityMultiplier(long aCapacityMultiplier) { if (aCapacityMultiplier >= 0) mAdjustableMultiplier = aCapacityMultiplier; return this; @@ -363,8 +365,7 @@ public class FluidTankGT implements IFluidTank { if (mAdjustableCapacity == null || aFluid == null) return mCapacity; final Long tSize = mAdjustableCapacity.get(aFluid); - return tSize == null - ? Math.max(mAmount, mCapacity) + return tSize == null ? Math.max(mAmount, mCapacity) : Math.max(tSize * mAdjustableMultiplier, Math.max(mAmount, mCapacity)); } diff --git a/src/main/java/gregtech/api/fluid/GT_FluidFactory.java b/src/main/java/gregtech/api/fluid/GT_FluidFactory.java index 1622aa2e05..b392167147 100644 --- a/src/main/java/gregtech/api/fluid/GT_FluidFactory.java +++ b/src/main/java/gregtech/api/fluid/GT_FluidFactory.java @@ -1,32 +1,42 @@ package gregtech.api.fluid; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; + import gregtech.api.enums.FluidState; import gregtech.api.enums.Materials; import gregtech.api.interfaces.fluid.IGT_Fluid; import gregtech.api.interfaces.fluid.IGT_FluidBuilder; import gregtech.common.fluid.GT_FluidBuilder; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; /** - * <p>This class contains helpers factory methods to:</p> + * <p> + * This class contains helpers factory methods to: + * </p> * <ol> - * <li> - * <p>Build {@link IGT_Fluid} instances.</p> - * </li> - * <li> - * <p>Register the corresponding {@link Fluid}, built from an {@link IGT_Fluid}, - * to the {@link FluidRegistry}:</p> - * <ul> - * <li> - * <p>Register the optionally associated containers to the {@link FluidContainerRegistry}.</p> - * </li> - * <li> - * <p>Add the needed Fluid Canner recipes.</p> - * </li> - * </ul> - * </li> + * <li> + * <p> + * Build {@link IGT_Fluid} instances. + * </p> + * </li> + * <li> + * <p> + * Register the corresponding {@link Fluid}, built from an {@link IGT_Fluid}, to the {@link FluidRegistry}: + * </p> + * <ul> + * <li> + * <p> + * Register the optionally associated containers to the {@link FluidContainerRegistry}. + * </p> + * </li> + * <li> + * <p> + * Add the needed Fluid Canner recipes. + * </p> + * </li> + * </ul> + * </li> * </ol> */ @SuppressWarnings("unused") // API might legitimately expose unused methods within this local project's scope @@ -34,46 +44,38 @@ public class GT_FluidFactory { /** * Helper for quick fluid creation and registration - * @param fluidName The name key of the {@link Fluid} to register in the {@link FluidRegistry} + * + * @param fluidName The name key of the {@link Fluid} to register in the {@link FluidRegistry} * @param localizedName The localized name of this {@link IGT_Fluid} - * @param material The {@link Materials} of this {@link IGT_Fluid} - * @param state The {@link FluidState} of this {@link IGT_Fluid} - * @param temperature The fluid temperature in Kelvin + * @param material The {@link Materials} of this {@link IGT_Fluid} + * @param state The {@link FluidState} of this {@link IGT_Fluid} + * @param temperature The fluid temperature in Kelvin * @return the registered {@link Fluid} */ - public static Fluid of( - final String fluidName, - final String localizedName, - final Materials material, - final FluidState state, - final int temperature) { - return builder(fluidName) - .withLocalizedName(localizedName) - .withStateAndTemperature(state, temperature) - .buildAndRegister() - .configureMaterials(material) - .asFluid(); + public static Fluid of(final String fluidName, final String localizedName, final Materials material, + final FluidState state, final int temperature) { + return builder(fluidName).withLocalizedName(localizedName).withStateAndTemperature(state, temperature) + .buildAndRegister().configureMaterials(material).asFluid(); } /** * Helper for quick fluid creation and registration - * @param fluidName The name key of the {@link Fluid} to register in the {@link FluidRegistry} + * + * @param fluidName The name key of the {@link Fluid} to register in the {@link FluidRegistry} * @param localizedName The localized name of this {@link IGT_Fluid} - * @param state The {@link FluidState} of this {@link IGT_Fluid} - * @param temperature The fluid temperature in Kelvin + * @param state The {@link FluidState} of this {@link IGT_Fluid} + * @param temperature The fluid temperature in Kelvin * @return the registered {@link Fluid} */ - public static Fluid of( - final String fluidName, final String localizedName, final FluidState state, final int temperature) { - return builder(fluidName) - .withLocalizedName(localizedName) - .withStateAndTemperature(state, temperature) - .buildAndRegister() - .asFluid(); + public static Fluid of(final String fluidName, final String localizedName, final FluidState state, + final int temperature) { + return builder(fluidName).withLocalizedName(localizedName).withStateAndTemperature(state, temperature) + .buildAndRegister().asFluid(); } /** * Gets an {@link IGT_Fluid} builder instance + * * @param fluidName The name key of the {@link Fluid} to register in the {@link FluidRegistry} * @return the {@link IGT_FluidBuilder} instance */ diff --git a/src/main/java/gregtech/api/graphs/GenerateNodeMap.java b/src/main/java/gregtech/api/graphs/GenerateNodeMap.java index 8085421576..fba74b0aec 100644 --- a/src/main/java/gregtech/api/graphs/GenerateNodeMap.java +++ b/src/main/java/gregtech/api/graphs/GenerateNodeMap.java @@ -3,16 +3,19 @@ package gregtech.api.graphs; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; import static gregtech.api.util.GT_Utility.getOppositeSide; +import java.util.ArrayList; +import java.util.HashSet; + +import net.minecraft.tileentity.TileEntity; + import gregtech.api.graphs.consumers.ConsumerNode; import gregtech.api.graphs.paths.NodePath; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; -import java.util.ArrayList; -import java.util.HashSet; -import net.minecraft.tileentity.TileEntity; // generates the node map 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) { @@ -47,13 +50,8 @@ public abstract 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) { final MetaPipeEntity tMetaPipe = (MetaPipeEntity) aPipe.getMetaTileEntity(); for (byte side : ALL_VALID_SIDES) { if (side == aInvalidSide) { @@ -86,14 +84,8 @@ public abstract 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; final byte tSideOp = getOppositeSide(aSide); final byte tInvalidSide = aPreviousNode == null ? -1 : tSideOp; @@ -111,7 +103,7 @@ public abstract 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; @@ -138,8 +130,8 @@ public abstract 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)) { final BaseMetaPipeEntity tPipe = (BaseMetaPipeEntity) aTileEntity; final MetaPipeEntity tMetaPipe = (MetaPipeEntity) tPipe.getMetaTileEntity(); @@ -176,15 +168,15 @@ public abstract class GenerateNodeMap { } // checks if the tile entity is a consumer and add to the list - protected abstract 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 + // 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; } @@ -194,6 +186,7 @@ public abstract class GenerateNodeMap { } private static class Pair { + public byte mSide; public TileEntity mTileEntity; diff --git a/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java b/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java index 293a46502a..62dfa2d8ea 100644 --- a/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java +++ b/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java @@ -1,5 +1,11 @@ package gregtech.api.graphs; +import java.util.ArrayList; +import java.util.HashSet; + +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + import cofh.api.energy.IEnergyReceiver; import gregtech.api.GregTech_API; import gregtech.api.graphs.consumers.ConsumerNode; @@ -16,13 +22,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 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 { + public GenerateNodeMapPower(BaseMetaPipeEntity aTileEntity) { generateNode(aTileEntity, null, 1, null, -1, new ArrayList<>(), new HashSet<>()); } @@ -34,8 +37,8 @@ public class GenerateNodeMapPower extends GenerateNodeMap { } @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)) { @@ -63,14 +66,20 @@ 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; } @@ -84,8 +93,8 @@ public class GenerateNodeMapPower extends GenerateNodeMap { // 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 e89cc8b25c..d3c8c49169 100644 --- a/src/main/java/gregtech/api/graphs/Lock.java +++ b/src/main/java/gregtech/api/graphs/Lock.java @@ -1,9 +1,11 @@ package gregtech.api.graphs; import java.util.ArrayList; + import net.minecraft.tileentity.TileEntity; public class Lock { + protected ArrayList<TileEntity> tiles = new ArrayList<>(); public void addTileEntity(TileEntity tileEntity) { diff --git a/src/main/java/gregtech/api/graphs/Node.java b/src/main/java/gregtech/api/graphs/Node.java index f6a3ebe2d2..21b9937191 100644 --- a/src/main/java/gregtech/api/graphs/Node.java +++ b/src/main/java/gregtech/api/graphs/Node.java @@ -1,13 +1,16 @@ 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 gregtech.api.graphs.consumers.ConsumerNode; +import gregtech.api.graphs.paths.NodePath; + // base Node class public class Node { + public Node(int aNodeValue, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { this.mNodeValue = aNodeValue; this.mTileEntity = aTileEntity; @@ -29,6 +32,7 @@ public class Node { public int mHighestNodeValue; public class ReturnPair { + public NodePath mReturnPath; public Lock returnLock; } diff --git a/src/main/java/gregtech/api/graphs/NodeList.java b/src/main/java/gregtech/api/graphs/NodeList.java index 8a018e2123..899384b3d4 100644 --- a/src/main/java/gregtech/api/graphs/NodeList.java +++ b/src/main/java/gregtech/api/graphs/NodeList.java @@ -2,6 +2,7 @@ package gregtech.api.graphs; // keep track on which node is being looked for across the recursive functions public class NodeList { + Node[] mNodes; int mCounter = 0; diff --git a/src/main/java/gregtech/api/graphs/PowerNode.java b/src/main/java/gregtech/api/graphs/PowerNode.java index c81d436861..75a8e8d73b 100644 --- a/src/main/java/gregtech/api/graphs/PowerNode.java +++ b/src/main/java/gregtech/api/graphs/PowerNode.java @@ -1,11 +1,14 @@ package gregtech.api.graphs; -import gregtech.api.graphs.consumers.ConsumerNode; import java.util.ArrayList; + import net.minecraft.tileentity.TileEntity; +import gregtech.api.graphs.consumers.ConsumerNode; + // base node for power networks public class PowerNode extends Node { + public boolean mHadVoltage = false; public PowerNode(int aNodeValue, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { diff --git a/src/main/java/gregtech/api/graphs/PowerNodes.java b/src/main/java/gregtech/api/graphs/PowerNodes.java index 759002dbdb..12416f6d72 100644 --- a/src/main/java/gregtech/api/graphs/PowerNodes.java +++ b/src/main/java/gregtech/api/graphs/PowerNodes.java @@ -3,27 +3,20 @@ package gregtech.api.graphs; import gregtech.api.graphs.consumers.ConsumerNode; import gregtech.api.graphs.paths.PowerNodePath; -/* look for and power node that need power - * - * how this works - * - * a node only contains nodes that has a higher value then it self except for 1 which is the return node - * this node also contains the highest known node value of its network - * this network only includes nodes that have a higher value then it self so it does not know the highest known value that - * the return node knows - * - * with these rules we can know for the target node to be in the network of a node, the target node must have a value no - * less than the node we are looking and no greater than the highest value that node knows - * this way we don't have to go over the entire network to look for it - * - * we also hold a list of all consumers so we can check before looking if that consumer actually needs power - * and only look for nodes that actually need power - * +/* + * look for and power node that need power how this works a node only contains nodes that has a higher value then it + * self except for 1 which is the return node this node also contains the highest known node value of its network this + * network only includes nodes that have a higher value then it self so it does not know the highest known value that + * the return node knows with these rules we can know for the target node to be in the network of a node, the target + * node must have a value no less than the node we are looking and no greater than the highest value that node knows + * this way we don't have to go over the entire network to look for it we also hold a list of all consumers so we can + * check before looking if that consumer actually needs power and only look for nodes that actually need power */ public class PowerNodes { + // check if the looked for node is next to or get the next node that is closer to it - public static 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; @@ -41,7 +34,12 @@ public class PowerNodes { } else { if (aPreviousNode == tNextNode) return tAmpsUsed; tAmpsUsed += processNextNode( - aCurrentNode, tNextNode, aConsumers, j, aMaxAmps - tAmpsUsed, aVoltage); + aCurrentNode, + tNextNode, + aConsumers, + j, + aMaxAmps - tAmpsUsed, + aVoltage); tConsumer = (ConsumerNode) aConsumers.getNode(); break; } @@ -55,7 +53,12 @@ public class PowerNodes { if (tNextNode.mNodeValue > aCurrentNode.mNodeValue && tNextNode.mNodeValue < tTargetNodeValue) { if (tNextNode == aPreviousNode) return tAmpsUsed; tAmpsUsed += processNextNodeAbove( - aCurrentNode, tNextNode, aConsumers, side, aMaxAmps - tAmpsUsed, aVoltage); + aCurrentNode, + tNextNode, + aConsumers, + side, + aMaxAmps - tAmpsUsed, + aVoltage); tConsumer = (ConsumerNode) aConsumers.getNode(); break; } else if (tNextNode.mNodeValue == tTargetNodeValue) { @@ -77,8 +80,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(); @@ -93,7 +96,12 @@ public class PowerNodes { if (tNextNode.mNodeValue > aCurrentNode.mNodeValue && tNextNode.mNodeValue < tTargetNodeValue) { if (tNextNode == aPreviousNode) return tAmpsUsed; tAmpsUsed += processNextNodeAbove( - aCurrentNode, tNextNode, aConsumers, side, aMaxAmps - tAmpsUsed, aVoltage); + aCurrentNode, + tNextNode, + aConsumers, + side, + aMaxAmps - tAmpsUsed, + aVoltage); tConsumer = (ConsumerNode) aConsumers.getNode(); break; } else if (tNextNode.mNodeValue == tTargetNodeValue) { @@ -113,8 +121,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; @@ -134,8 +142,8 @@ public class PowerNodes { 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; @@ -155,8 +163,8 @@ public class PowerNodes { 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; diff --git a/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java b/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java index 78b3c51928..f82798f09b 100644 --- a/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java +++ b/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java @@ -1,11 +1,14 @@ package gregtech.api.graphs.consumers; -import gregtech.api.graphs.Node; import java.util.ArrayList; + import net.minecraft.tileentity.TileEntity; +import gregtech.api.graphs.Node; + // 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) { diff --git a/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java b/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java index d5ff76c12b..6507d0f8e4 100644 --- a/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java +++ b/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java @@ -1,12 +1,15 @@ package gregtech.api.graphs.consumers; -import gregtech.api.graphs.paths.PowerNodePath; -import gregtech.api.metatileentity.BaseMetaPipeEntity; import java.util.ArrayList; + import net.minecraft.tileentity.TileEntity; +import gregtech.api.graphs.paths.PowerNodePath; +import gregtech.api.metatileentity.BaseMetaPipeEntity; + // 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); } diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java index 30582332e7..bd2087de84 100644 --- a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java @@ -1,12 +1,15 @@ package gregtech.api.graphs.consumers; -import gregtech.api.interfaces.tileentity.IEnergyConnected; import java.util.ArrayList; + import net.minecraft.tileentity.TileEntity; +import gregtech.api.interfaces.tileentity.IEnergyConnected; + public class NodeEnergyConnected extends ConsumerNode { - public NodeEnergyConnected( - int aNodeValue, IEnergyConnected aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { + + public NodeEnergyConnected(int aNodeValue, IEnergyConnected aTileEntity, byte aSide, + ArrayList<ConsumerNode> aConsumers) { super(aNodeValue, (TileEntity) aTileEntity, aSide, aConsumers); } diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java index 9c5e3f8aab..eec63cf935 100644 --- a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java @@ -2,6 +2,13 @@ package gregtech.api.graphs.consumers; import static gregtech.api.enums.GT_Values.V; +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 cofh.api.energy.IEnergyReceiver; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -9,18 +16,14 @@ 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; // 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); } @@ -38,8 +41,7 @@ public class NodeEnergyReceiver extends ConsumerNode { mRestRF -= consumed; return ampsUsed; } - if (GregTech_API.mRFExplosions - && GregTech_API.sMachineExplosions + if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions && ((IEnergyReceiver) mTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600L) { explode(rfOut); } @@ -50,77 +52,45 @@ public class NodeEnergyReceiver extends ConsumerNode { 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 + 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 + < V[9] ? 12.0F : aExplosionPower - < V[ - 11] - ? 14.0F - : aExplosionPower - < V[ - 12] - ? 15.0F + < V[10] ? 13.0F : aExplosionPower - < V[ - 12] - * 2 - ? 16.0F - : aExplosionPower - < V[ - 13] - ? 17.0F + < V[11] ? 14.0F : aExplosionPower - < V[ - 14] - ? 18.0F - : aExplosionPower - < V[ - 15] - ? 19.0F - : 20.0F; + < 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); + if (GregTech_API.sMachineExplosions) if (GT_Mod.gregtechproxy.mPollution) GT_Pollution + .addPollution(tWorld.getChunkFromBlockCoords(tX, tZ), GT_Mod.gregtechproxy.mPollutionOnExplosion); - new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder() - .setStrength(tStrength) - .setSmoking(true) - .setPosition(tX + 0.5, tY + 0.5, tZ + 0.5) - .setWorld(tWorld) - .run(); + new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder().setStrength(tStrength).setSmoking(true) + .setPosition(tX + 0.5, tY + 0.5, tZ + 0.5).setWorld(tWorld).run(); } } } diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java index 95b16883af..16b8f99939 100644 --- a/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java @@ -1,12 +1,15 @@ 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 ic2.api.energy.tile.IEnergySink; + // consumer for IC2 machines public class NodeEnergySink extends ConsumerNode { + public NodeEnergySink(int nodeValue, IEnergySink tileEntity, byte side, ArrayList<ConsumerNode> consumers) { super(nodeValue, (TileEntity) tileEntity, side, consumers); } @@ -19,10 +22,10 @@ public class NodeEnergySink extends ConsumerNode { @Override public int injectEnergy(long aVoltage, long aMaxAmps) { int tUsedAmps = 0; - while (aMaxAmps > tUsedAmps - && ((IEnergySink) mTileEntity).getDemandedEnergy() > 0 + while (aMaxAmps > tUsedAmps && ((IEnergySink) mTileEntity).getDemandedEnergy() > 0 && ((IEnergySink) mTileEntity).injectEnergy(ForgeDirection.getOrientation(mSide), aVoltage, aVoltage) - < aVoltage) tUsedAmps++; + < 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 e367a5294e..19a2478c07 100644 --- a/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java +++ b/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java @@ -1,13 +1,15 @@ package gregtech.api.graphs.consumers; +import java.util.ArrayList; + import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.metatileentity.BaseMetaTileEntity; -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); } diff --git a/src/main/java/gregtech/api/graphs/paths/NodePath.java b/src/main/java/gregtech/api/graphs/paths/NodePath.java index d5a179b24b..0e852bd484 100644 --- a/src/main/java/gregtech/api/graphs/paths/NodePath.java +++ b/src/main/java/gregtech/api/graphs/paths/NodePath.java @@ -6,6 +6,7 @@ import gregtech.api.metatileentity.MetaPipeEntity; // 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 3ab8c7fe03..1601d3b28d 100644 --- a/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java +++ b/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java @@ -1,13 +1,15 @@ package gregtech.api.graphs.paths; +import net.minecraft.server.MinecraftServer; + import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; -import net.minecraft.server.MinecraftServer; // path for cables // all calculations like amp and voltage happens here public class PowerNodePath extends NodePath { + long mMaxAmps; long mAmps = 0; long mLoss; diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java index 5d9dde3535..2c4d7292d0 100644 --- a/src/main/java/gregtech/api/gui/GT_Container.java +++ b/src/main/java/gregtech/api/gui/GT_Container.java @@ -1,10 +1,7 @@ package gregtech.api.gui; -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; @@ -15,12 +12,18 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; +import gregtech.api.interfaces.IFluidAccess; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; + /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> * Main Container-Class, used for all my GUIs */ public class GT_Container extends Container { + public IGregTechTileEntity mTileEntity; public InventoryPlayer mPlayerInventory; @@ -108,10 +111,8 @@ 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 { @@ -138,8 +139,7 @@ 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); } @@ -208,25 +208,24 @@ public class GT_Container extends Container { aSlot.putStack(mouseStack); aPlayerInventory.setItemStack(tTempStack); } - } else if (tTempStack.getItem() == mouseStack.getItem() - && mouseStack.getMaxStackSize() > 1 + } else if (tTempStack.getItem() == mouseStack.getItem() && mouseStack.getMaxStackSize() > 1 && (!tTempStack.getHasSubtypes() || tTempStack.getItemDamage() == mouseStack.getItemDamage()) && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { - tTempStackSize = tTempStack.stackSize; + tTempStackSize = tTempStack.stackSize; - if (tTempStackSize > 0 - && tTempStackSize + mouseStack.stackSize <= mouseStack.getMaxStackSize()) { - mouseStack.stackSize += tTempStackSize; - tTempStack = aSlot.decrStackSize(tTempStackSize); + if (tTempStackSize > 0 + && tTempStackSize + mouseStack.stackSize <= mouseStack.getMaxStackSize()) { + mouseStack.stackSize += tTempStackSize; + tTempStack = aSlot.decrStackSize(tTempStackSize); - if (tTempStack.stackSize == 0) { - aSlot.putStack(null); - } + if (tTempStack.stackSize == 0) { + aSlot.putStack(null); + } - aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack()); - } - } + aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack()); + } + } } aSlot.onSlotChanged(); } @@ -240,8 +239,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) { @@ -270,17 +269,16 @@ public class GT_Container extends Container { aSlot.putStack(tTempStack); } } - } else if (aShifthold == 3 - && aPlayer.capabilities.isCreativeMode + } 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()); - tTempStack.stackSize = tTempStack.getMaxStackSize(); - aPlayerInventory.setItemStack(tTempStack); - } - } + aSlot = (Slot) this.inventorySlots.get(aSlotIndex); + if (aSlot != null && aSlot.getHasStack()) { + tTempStack = GT_Utility.copyOrNull(aSlot.getStack()); + tTempStack.stackSize = tTempStack.getMaxStackSize(); + aPlayerInventory.setItemStack(tTempStack); + } + } return rStack; } @@ -292,8 +290,7 @@ 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 + if (getSlotCount() > 0 && slotObject != null && slotObject.getHasStack() && !(slotObject instanceof GT_Slot_Holo)) { ItemStack stackInSlot = slotObject.getStack(); @@ -311,8 +308,8 @@ public class GT_Container extends Container { getShiftClickStartIndex(), getShiftClickStartIndex() + getShiftClickSlotCount(), false)) { - return null; - } + return null; + } if (stackInSlot.stackSize == 0) { slotObject.putStack(null); @@ -345,8 +342,7 @@ public class GT_Container extends Container { && (!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) + if (!(slot instanceof GT_Slot_Holo) && !(slot instanceof GT_Slot_Output) && slot.isItemValid(aStack) && itemStack != null && itemStack.getItem() == aStack.getItem() @@ -596,12 +592,8 @@ 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; @@ -658,12 +650,10 @@ public class GT_Container extends Container { if (aProcessFullStack) { int tFilledAmount = tOriginalFluidAmount - tTankStack.amount; /* - work out how many more items we can fill - one cell is already used, so account for that - the round down behavior will left over a fraction of a cell worth of fluid - the user then get to decide what to do with it - it will not be too fancy if it spills out partially filled cells - */ + * work out how many more items we can fill one cell is already used, so account for that the round down + * behavior will left over a fraction of a cell worth of fluid the user then get to decide what to do + * with it it will not be too fancy if it spills out partially filled cells + */ int tAdditionalParallel = Math.min(tStackHeld.stackSize - 1, tTankStack.amount / tFilledAmount); tTankStack.amount -= tFilledAmount * tAdditionalParallel; tFilledContainer.stackSize += tAdditionalParallel; @@ -674,8 +664,8 @@ public class GT_Container extends Container { 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; ItemStack tStackHeld = aPlayer.inventory.getItemStack(); 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 588fb415c2..3ce2a53fce 100644 --- a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java @@ -1,16 +1,18 @@ package gregtech.api.gui; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.item.ItemStack; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.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; -import net.minecraft.item.ItemStack; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -19,29 +21,11 @@ import net.minecraft.item.ItemStack; */ public class GT_ContainerMetaTile_Machine extends GT_Container { - public int mActive = 0, - mMaxProgressTime = 0, - mProgressTime = 0, - mEnergy = 0, - mSteam = 0, - mSteamStorage = 0, - mStorage = 0, - mOutput = 0, - mInput = 0, - mID = 0, - mDisplayErrorCode = 0; + public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mEnergy = 0, mSteam = 0, mSteamStorage = 0, + mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0; public long mEnergyLong = 0, mStorageLong = 0; - private int oActive = 0, - oMaxProgressTime = 0, - oProgressTime = 0, - oEnergy = 0, - oSteam = 0, - oSteamStorage = 0, - oStorage = 0, - oOutput = 0, - oInput = 0, - oID = 0, - oDisplayErrorCode = 0; + private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oEnergy = 0, oSteam = 0, oSteamStorage = 0, + oStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0; private long oEnergyLong = 0, oStorageLong = 0; protected int mTimer = 0; protected Runnable circuitSlotClickCallback; @@ -60,8 +44,8 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { } } - 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; @@ -77,8 +61,11 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { 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()); + GT_Slot_Render slotCircuit = new GT_Slot_Render( + mTileEntity, + ccs.getCircuitSlot(), + ccs.getCircuitSlotX(), + ccs.getCircuitSlotY()); addSlotToContainer(slotCircuit); slotCircuit.setEnabled(ccs.allowSelectCircuit()); } @@ -278,9 +265,8 @@ 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_1by1.java b/src/main/java/gregtech/api/gui/GT_Container_1by1.java index 882b4d0502..06efaee5ef 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_1by1.java +++ b/src/main/java/gregtech/api/gui/GT_Container_1by1.java @@ -1,9 +1,10 @@ package gregtech.api.gui; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + @Deprecated public class GT_Container_1by1 extends GT_ContainerMetaTile_Machine { diff --git a/src/main/java/gregtech/api/gui/GT_Container_2by2.java b/src/main/java/gregtech/api/gui/GT_Container_2by2.java index 4267423b75..4e3584a0a6 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_2by2.java +++ b/src/main/java/gregtech/api/gui/GT_Container_2by2.java @@ -1,9 +1,10 @@ package gregtech.api.gui; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + @Deprecated public class GT_Container_2by2 extends GT_ContainerMetaTile_Machine { diff --git a/src/main/java/gregtech/api/gui/GT_Container_3by3.java b/src/main/java/gregtech/api/gui/GT_Container_3by3.java index 80f3e213d6..4c0f7f946b 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_3by3.java +++ b/src/main/java/gregtech/api/gui/GT_Container_3by3.java @@ -1,9 +1,10 @@ package gregtech.api.gui; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + @Deprecated public class GT_Container_3by3 extends GT_ContainerMetaTile_Machine { diff --git a/src/main/java/gregtech/api/gui/GT_Container_4by4.java b/src/main/java/gregtech/api/gui/GT_Container_4by4.java index 6aa0717a11..db5cde4cfe 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_4by4.java +++ b/src/main/java/gregtech/api/gui/GT_Container_4by4.java @@ -1,9 +1,10 @@ package gregtech.api.gui; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + @Deprecated public class GT_Container_4by4 extends GT_ContainerMetaTile_Machine { 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 28779ada08..101c1cba83 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java @@ -2,6 +2,12 @@ package gregtech.api.gui; import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.OTHER_SLOT_COUNT; +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.interfaces.IFluidAccess; @@ -10,11 +16,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachin import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; 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; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -223,7 +224,7 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank { } IFluidAccess tFillableAccess = constructFluidAccess(tTank, true); GT_Recipe_Map recipes = machine.getRecipeList(); - // If the machine has recipes but no fluid inputs, disallow filling this slot with fluids. + // If the machine has recipes but no fluid inputs, disallow filling this slot with fluids. ItemStack tToken = handleFluidSlotClick( tFillableAccess, 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 bc0ac72a8b..5aa793f8f6 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java @@ -1,11 +1,5 @@ package gregtech.api.gui; -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_BasicTank; -import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; @@ -13,6 +7,13 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +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_BasicTank; +import gregtech.api.util.GT_Utility; + /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -28,8 +29,8 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine { } /** - * Subclasses must ensure third slot (aSlotIndex==2) is drainable fluid display item slot. - * Otherwise, subclasses must intercept the appropriate the slotClick event and call super.slotClick(2, xxx) if necessary + * Subclasses must ensure third slot (aSlotIndex==2) is drainable fluid display item slot. Otherwise, subclasses + * must intercept the appropriate the slotClick event and call super.slotClick(2, xxx) if necessary */ @Override public void addSlots(InventoryPlayer aInventoryPlayer) { @@ -46,16 +47,20 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine { /* * While a logical client don't really need to process fluid cells upon click (it could have just wait * for server side to send the result), doing so would result in every fluid interaction having a - * noticeable delay between clicking and changes happening even on single player. - * 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 + * noticeable delay between clicking and changes happening even on single player. 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 */ Slot slot = (Slot) inventorySlots.get(aSlotIndex); tTank.setDrainableStack(GT_Utility.getFluidFromDisplayStack(slot.getStack())); } IFluidAccess tDrainableAccess = constructFluidAccess(tTank, false); return handleFluidSlotClick( - tDrainableAccess, aPlayer, aMouseclick == 0, true, !tTank.isDrainableStackSeparate()); + tDrainableAccess, + aPlayer, + aMouseclick == 0, + true, + !tTank.isDrainableStackSeparate()); } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } @@ -110,6 +115,7 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine { } static class BasicTankFluidAccess implements IFluidAccess { + protected final GT_MetaTileEntity_BasicTank mTank; protected final boolean mIsFillableStack; 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 4bfc14ad57..bcc9219d5e 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java @@ -1,9 +1,10 @@ package gregtech.api.gui; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -11,12 +12,13 @@ import net.minecraft.inventory.Slot; */ @Deprecated public class GT_Container_MultiMachine extends GT_ContainerMetaTile_Machine { + public GT_Container_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { 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_GUIColorOverride.java b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java index 2d6268dbec..795148ee25 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java +++ b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java @@ -1,24 +1,29 @@ package gregtech.api.gui; +import java.util.concurrent.ExecutionException; + +import javax.annotation.Nonnull; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.IResource; +import net.minecraft.util.ResourceLocation; + import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.google.common.util.concurrent.UncheckedExecutionException; + import cpw.mods.fml.relauncher.FMLLaunchHandler; import cpw.mods.fml.relauncher.Side; import gregtech.api.GregTech_API; import gregtech.api.util.ColorsMetadataSection; -import java.util.concurrent.ExecutionException; -import javax.annotation.Nonnull; -import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.IResource; -import net.minecraft.util.ResourceLocation; public class GT_GUIColorOverride { + private static final Object NOT_FOUND = new Object(); - private static final LoadingCache<ResourceLocation, Object> cache = CacheBuilder.newBuilder() - .softValues() + private static final LoadingCache<ResourceLocation, Object> cache = CacheBuilder.newBuilder().softValues() .build(new CacheLoader<ResourceLocation, Object>() { + @Override public Object load(@Nonnull ResourceLocation key) throws Exception { IResource ir = Minecraft.getMinecraft().getResourceManager().getResource(key); diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer.java b/src/main/java/gregtech/api/gui/GT_GUIContainer.java index efed327b46..639bd56162 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer.java @@ -7,6 +7,7 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.util.ResourceLocation; + import org.lwjgl.input.Mouse; /** @@ -90,19 +91,9 @@ public class GT_GUIContainer extends GuiContainer { } /* - @Override - protected void drawSlotInventory(Slot slot) { - try { - super.drawSlotInventory(slot); - } catch(Throwable e) { - try { - Tessellator.instance.draw(); - } catch(Throwable f) {} - if (!mCrashed) { - GT_Log.out.println("Clientside Slot drawing Crash prevented. Seems one Itemstack causes Problems with negative Damage Values or the Wildcard Damage Value. This is absolutely NOT a Bug of the GregTech-Addon, so don't even think about reporting it to me, it's a Bug of the Mod, which belongs to the almost-crash-causing Item, so bug that Mods Author and not me! Did you hear it? NOT ME!!!"); - e.printStackTrace(); - mCrashed = true; - } - } - }*/ + * @Override protected void drawSlotInventory(Slot slot) { try { super.drawSlotInventory(slot); } catch(Throwable e) + * { try { Tessellator.instance.draw(); } catch(Throwable f) {} if (!mCrashed) { GT_Log.out. + * println("Clientside Slot drawing Crash prevented. Seems one Itemstack causes Problems with negative Damage Values or the Wildcard Damage Value. This is absolutely NOT a Bug of the GregTech-Addon, so don't even think about reporting it to me, it's a Bug of the Mod, which belongs to the almost-crash-causing Item, so bug that Mods Author and not me! Did you hear it? NOT ME!!!" + * ); e.printStackTrace(); mCrashed = true; } } } + */ } 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 19aa8fa9a8..7e072f0fe6 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java @@ -1,5 +1,16 @@ package gregtech.api.gui; +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 org.lwjgl.opengl.GL11; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; @@ -17,14 +28,6 @@ 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 org.lwjgl.opengl.GL11; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -43,14 +46,13 @@ 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, + 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 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); @@ -70,8 +72,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); } @@ -174,16 +176,17 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements // Tooltips support /** - * Load data for and create appropriate tooltips for this machine. - * Only called when one of regular or shift tooltips are enabled. + * Load data for and create appropriate tooltips for this machine. Only called when one of regular or shift tooltips + * are enabled. */ protected void setupTooltips() { if (mContainer.mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport) { - IConfigurationCircuitSupport ccs = - (IConfigurationCircuitSupport) mContainer.mTileEntity.getMetaTileEntity(); - if (ccs.allowSelectCircuit()) - addToolTip(new GT_GuiSlotTooltip( - mContainer.getSlot(ccs.getCircuitGUISlot()), mTooltipCache.getData(GHOST_CIRCUIT_TOOLTIP))); + IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) mContainer.mTileEntity + .getMetaTileEntity(); + if (ccs.allowSelectCircuit()) addToolTip( + new GT_GuiSlotTooltip( + mContainer.getSlot(ccs.getCircuitGUISlot()), + mTooltipCache.getData(GHOST_CIRCUIT_TOOLTIP))); } } @@ -231,8 +234,8 @@ 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)) { @@ -248,13 +251,14 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements IMetaTileEntity machine = mContainer.mTileEntity.getMetaTileEntity(); 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())))); + 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())))); } private void onCircuitSelected(ItemStack 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 694b212872..b891ed177d 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java @@ -2,9 +2,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 gregtech.api.interfaces.tileentity.IGregTechTileEntity; + @Deprecated public class GT_GUIContainer_1by1 extends GT_GUIContainerMetaTile_Machine { @@ -16,8 +17,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 069e6f67fe..a06d4a98d2 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java @@ -2,9 +2,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 gregtech.api.interfaces.tileentity.IGregTechTileEntity; + @Deprecated public class GT_GUIContainer_2by2 extends GT_GUIContainerMetaTile_Machine { @@ -16,8 +17,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_3by3.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java index 2ce72e054c..715be4fdea 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java @@ -2,9 +2,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 gregtech.api.interfaces.tileentity.IGregTechTileEntity; + @Deprecated public class GT_GUIContainer_3by3 extends GT_GUIContainerMetaTile_Machine { @@ -16,8 +17,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 df8e3d137b..d091abfff6 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java @@ -2,9 +2,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 gregtech.api.interfaces.tileentity.IGregTechTileEntity; + @Deprecated public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine { @@ -16,8 +17,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 50272f4820..43943b49cb 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java @@ -2,6 +2,11 @@ package gregtech.api.gui; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; +import java.awt.Rectangle; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.StatCollector; + import gregtech.api.enums.GT_Values; import gregtech.api.gui.widgets.GT_GuiIcon; import gregtech.api.gui.widgets.GT_GuiSlotTooltip; @@ -14,9 +19,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachin 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.util.StatCollector; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -24,11 +26,16 @@ import net.minecraft.util.StatCollector; * The GUI-Container I use for all my Basic Machines */ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machine implements NEI_TransferRectHost { + private static final int NEEDS_STEAM_VENTING = 64; 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); + 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); + 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; @@ -46,23 +53,13 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin 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) { + 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) { + 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); @@ -87,57 +84,67 @@ 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) { batterySlotTooltipKey = BATTERY_SLOT_TOOLTIP_ALT; - batterySlotTooltipArgs = new String[] {pTier1}; + batterySlotTooltipArgs = new String[] { pTier1 }; } else { batterySlotTooltipKey = BATTERY_SLOT_TOOLTIP; - batterySlotTooltipArgs = new String[] {pTier1, powerTierName((byte) (machine.mTier + 1))}; + 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() { - public boolean shouldShowTooltip() { - return container.mStuttering && !hasErrorCode(NEEDS_STEAM_VENTING); - } - }, + 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"))))); + StatCollector + .translateToLocal(POWER_SOURCE_KEY + (machine.isSteampowered() ? "steam" : "power"))))); } /** * Apply proper coloration to a machine's power tier short name + * * @param machineTier * @return colored power tier short name */ @@ -171,14 +178,12 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin 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)) + 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. @@ -218,8 +223,7 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin @Override protected GT_GuiTabIconSet getTabBackground() { if (getMachine().isSteampowered()) { - return getMachine() instanceof GT_MetaTileEntity_BasicMachine_Steel - ? TAB_ICONSET_STEEL + return getMachine() instanceof GT_MetaTileEntity_BasicMachine_Steel ? TAB_ICONSET_STEEL : TAB_ICONSET_BRONZE; } return super.getTabBackground(); @@ -253,7 +257,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 034525c338..28075cabdb 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java @@ -2,11 +2,12 @@ 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 gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; + public class GT_GUIContainer_BasicTank extends GT_GUIContainerMetaTile_Machine { private final String mName; @@ -21,8 +22,8 @@ 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); 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 7fb5026cd3..f2ea91571a 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java @@ -2,14 +2,15 @@ package gregtech.api.gui; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -23,8 +24,8 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin 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) { + 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)); @@ -73,8 +74,8 @@ 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) + 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); @@ -92,42 +93,45 @@ 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); + 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); } 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) { @@ -135,16 +139,21 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin 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); + 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.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); + 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 cef3ddb3bf..2bd981c6b1 100644 --- a/src/main/java/gregtech/api/gui/GT_GUICover.java +++ b/src/main/java/gregtech/api/gui/GT_GUICover.java @@ -1,9 +1,10 @@ package gregtech.api.gui; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.net.GT_Packet_GtTileEntityGuiRequest; -import net.minecraft.item.ItemStack; @Deprecated public abstract class GT_GUICover extends GT_GUIScreen { @@ -27,6 +28,7 @@ public abstract class GT_GUICover extends GT_GUIScreen { /** * The parent GUI to exit to. -1 is ignored. + * * @param parentGuiId */ public void setParentGuiId(int parentGuiId) { @@ -37,13 +39,14 @@ public abstract class GT_GUICover extends GT_GUIScreen { 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())); + GT_Values.NW.sendToServer( + new GT_Packet_GtTileEntityGuiRequest( + 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 b0c381f104..f2352fb53d 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java +++ b/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java @@ -1,19 +1,22 @@ package gregtech.api.gui; -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 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; + @Deprecated 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; @@ -25,51 +28,40 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { // 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 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) { + 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) { + 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 + * 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 + * @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) { + 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); @@ -84,8 +76,9 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { 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)); + slots.add( + new GT_GuiFakeItemButton(this, 8 + 18 * j, 44 + 18 * i, GT_GuiIcon.SLOT_GRAY) + .setMimicSlot(true)); } } @@ -163,8 +156,7 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { private void fillSlots() { for (int i = 0, j = scroll * cols; i < slots.size(); i++, j++) { - slots.get(i) - .setItem(getCandidate(j)) + slots.get(i).setItem(getCandidate(j)) .setBgIcon(j == getSelected() ? GT_GuiIcon.SLOT_DARKGRAY : GT_GuiIcon.SLOT_GRAY); } } diff --git a/src/main/java/gregtech/api/gui/GT_GUIScreen.java b/src/main/java/gregtech/api/gui/GT_GUIScreen.java index 141f51e7c7..1aa9ccc24c 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIScreen.java +++ b/src/main/java/gregtech/api/gui/GT_GUIScreen.java @@ -1,14 +1,8 @@ package gregtech.api.gui; -import gregtech.api.enums.Dyes; -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; @@ -16,10 +10,19 @@ import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.util.ResourceLocation; + import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import gregtech.api.enums.Dyes; +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; + @Deprecated public abstract class GT_GUIScreen extends GuiScreen implements GT_IToolTipRenderer, IGuiScreen { @@ -161,7 +164,7 @@ public abstract class GT_GUIScreen extends GuiScreen implements GT_IToolTipRende if (tBox.isEnabled() || hadFocus) tBox.mouseClicked(x, y, button); if (tBox.isFocused() && button == 1 && tBox.isEnabled()) // rightclick -> lcear it - tBox.setText("0"); + tBox.setText("0"); else if (hadFocus && !tBox.isFocused()) applyTextBox(tBox); } super.mouseClicked(x, y, button); diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Armor.java b/src/main/java/gregtech/api/gui/GT_Slot_Armor.java index 3b454aee0e..be9b0e5e00 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Armor.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Armor.java @@ -6,6 +6,7 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class GT_Slot_Armor extends Slot { + final int mArmorType; final EntityPlayer mPlayer; diff --git a/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java b/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java index 0a78e3f0b3..115b50ddb8 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java @@ -1,11 +1,13 @@ package gregtech.api.gui; -import gregtech.api.enums.ItemList; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import gregtech.api.enums.ItemList; + public class GT_Slot_DataOrb extends Slot { + public GT_Slot_DataOrb(IInventory inventory, int slotIndex, int xPos, int yPos) { super(inventory, slotIndex, xPos, yPos); } 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 bf5f8886b3..a01b91cefb 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Holo.java @@ -1,26 +1,22 @@ package gregtech.api.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class GT_Slot_Holo extends Slot { + public final int mSlotIndex; public boolean mEnabled = true; 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; @@ -55,8 +51,8 @@ public class GT_Slot_Holo extends Slot { } /** - * Whether this slot should be ignored in event processing, - * for example highlight the slot on mouseOver + * Whether this slot should be ignored in event processing, for example highlight the slot on mouseOver + * * @param enabled */ public void setEnabled(boolean enabled) { diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Output.java b/src/main/java/gregtech/api/gui/GT_Slot_Output.java index d348e4e236..7c883ea2d1 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Output.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Output.java @@ -5,6 +5,7 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class GT_Slot_Output extends Slot { + public GT_Slot_Output(IInventory inventory, int slotIndex, int xPos, int yPos) { super(inventory, slotIndex, xPos, yPos); } diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Render.java b/src/main/java/gregtech/api/gui/GT_Slot_Render.java index dd11aa6305..ae03ce83ea 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Render.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Render.java @@ -5,12 +5,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; public class GT_Slot_Render extends GT_Slot_Holo { + public GT_Slot_Render(IInventory inventory, int slotIndex, int xPos, int yPos) { super(inventory, slotIndex, xPos, yPos, false, false, 0); } /** - * NEI has a nice and "useful" Delete-All Function, which would delete the Content of this Slot. This is here to prevent that. + * NEI has a nice and "useful" Delete-All Function, which would delete the Content of this Slot. This is here to + * prevent that. */ @Override public void putStack(ItemStack aStack) { diff --git a/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java b/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java index 9216d1d224..f242aff0ed 100644 --- a/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java +++ b/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java @@ -1,15 +1,17 @@ package gregtech.api.gui.modularui; -import com.gtnewhorizons.modularui.api.drawable.UITexture; -import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; -import gregtech.api.enums.SteamVariant; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import net.minecraft.client.Minecraft; +import com.gtnewhorizons.modularui.api.drawable.UITexture; +import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; +import gregtech.api.enums.SteamVariant; + public class FallbackableSteamTexture { private final SteamTexture candidate; diff --git a/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java b/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java index 811ad8be5f..65a61ad951 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java @@ -1,8 +1,9 @@ package gregtech.api.gui.modularui; +import net.minecraft.entity.player.EntityPlayer; + import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import gregtech.api.interfaces.tileentity.ICoverable; -import net.minecraft.entity.player.EntityPlayer; public class GT_CoverUIBuildContext extends UIBuildContext { @@ -14,15 +15,15 @@ public class GT_CoverUIBuildContext extends UIBuildContext { private final int guiColorization; /** - * @param player Player opened this UI - * @param coverID See {@link ICoverable#getCoverIDAtSide} - * @param side Side this cover is attached to - * @param tile Tile this cover is attached to - * @param anotherWindow If cover UI is shown on top of another window + * @param player Player opened this UI + * @param coverID See {@link ICoverable#getCoverIDAtSide} + * @param side Side this cover is attached to + * @param tile Tile this cover is attached to + * @param anotherWindow If cover UI is shown on top of another window * @param guiColorization The color used to render machine's GUI */ - public GT_CoverUIBuildContext( - EntityPlayer player, int coverID, byte side, ICoverable tile, boolean anotherWindow, int guiColorization) { + public GT_CoverUIBuildContext(EntityPlayer player, int coverID, byte side, ICoverable tile, boolean anotherWindow, + int guiColorization) { super(player); this.coverID = coverID; this.side = side; @@ -32,10 +33,10 @@ public class GT_CoverUIBuildContext extends UIBuildContext { } /** - * @param player Player opened this UI - * @param coverID See {@link ICoverable#getCoverIDAtSide} - * @param side Side this cover is attached to - * @param tile Tile this cover is attached to + * @param player Player opened this UI + * @param coverID See {@link ICoverable#getCoverIDAtSide} + * @param side Side this cover is attached to + * @param tile Tile this cover is attached to * @param anotherWindow If cover GUI is shown in opened on top of another window */ public GT_CoverUIBuildContext(EntityPlayer player, int coverID, byte side, ICoverable tile, boolean anotherWindow) { diff --git a/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java b/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java index d1e699bb40..32ed6442c1 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java @@ -1,5 +1,14 @@ package gregtech.api.gui.modularui; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + import com.gtnewhorizons.modularui.api.UIInfos; import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI; import com.gtnewhorizons.modularui.api.screen.ModularUIContext; @@ -10,6 +19,7 @@ import com.gtnewhorizons.modularui.common.builder.UIInfo; import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; import com.gtnewhorizons.modularui.common.internal.wrapper.ModularGui; import com.gtnewhorizons.modularui.common.internal.wrapper.ModularUIContainer; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.GT_Values; @@ -17,47 +27,37 @@ import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.net.GT_Packet_SendCoverData; import gregtech.api.util.GT_CoverBehaviorBase; -import java.util.HashMap; -import java.util.Map; -import java.util.function.Function; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; public class GT_UIInfos { /** - * Generator for {@link UIInfo} which is responsible for registering and opening UIs. - * Unlike {@link com.gtnewhorizons.modularui.api.UIInfos#TILE_MODULAR_UI}, this accepts - * custom constructors for UI. - * <br> Do NOT run {@link UIBuilder#build} on-the-fly, otherwise MP client won't register UIs. - * Instead, store to static field, just like {@link #GTTileEntityDefaultUI}. - * Such mistake can be easily overlooked by testing only SP. + * Generator for {@link UIInfo} which is responsible for registering and opening UIs. Unlike + * {@link com.gtnewhorizons.modularui.api.UIInfos#TILE_MODULAR_UI}, this accepts custom constructors for UI. <br> + * Do NOT run {@link UIBuilder#build} on-the-fly, otherwise MP client won't register UIs. Instead, store to static + * field, just like {@link #GTTileEntityDefaultUI}. Such mistake can be easily overlooked by testing only SP. */ - public static final Function<ContainerConstructor, UIInfo<?, ?>> GTTileEntityUIFactory = - containerConstructor -> UIBuilder.of() - .container((player, world, x, y, z) -> { - TileEntity te = world.getTileEntity(x, y, z); - if (te instanceof ITileWithModularUI) { - return createTileEntityContainer( - player, - ((ITileWithModularUI) te)::createWindow, - te::markDirty, - containerConstructor); - } - return null; - }) - .gui(((player, world, x, y, z) -> { - if (!world.isRemote) return null; - TileEntity te = world.getTileEntity(x, y, z); - if (te instanceof ITileWithModularUI) { - return createTileEntityGuiContainer( - player, ((ITileWithModularUI) te)::createWindow, containerConstructor); - } - return null; - })) - .build(); + public static final Function<ContainerConstructor, UIInfo<?, ?>> GTTileEntityUIFactory = containerConstructor -> UIBuilder + .of().container((player, world, x, y, z) -> { + TileEntity te = world.getTileEntity(x, y, z); + if (te instanceof ITileWithModularUI) { + return createTileEntityContainer( + player, + ((ITileWithModularUI) te)::createWindow, + te::markDirty, + containerConstructor); + } + return null; + }).gui(((player, world, x, y, z) -> { + if (!world.isRemote) return null; + TileEntity te = world.getTileEntity(x, y, z); + if (te instanceof ITileWithModularUI) { + return createTileEntityGuiContainer( + player, + ((ITileWithModularUI) te)::createWindow, + containerConstructor); + } + return null; + })).build(); private static final UIInfo<?, ?> GTTileEntityDefaultUI = GTTileEntityUIFactory.apply(ModularUIContainer::new); @@ -66,36 +66,31 @@ public class GT_UIInfos { static { for (byte i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { final byte side = i; - coverUI.put( - side, - UIBuilder.of() - .container((player, world, x, y, z) -> { - final TileEntity te = world.getTileEntity(x, y, z); - if (!(te instanceof ICoverable)) return null; - final ICoverable gtTileEntity = (ICoverable) te; - GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side); - return createCoverContainer( - player, - cover::createWindow, - te::markDirty, - gtTileEntity.getCoverIDAtSide(side), - side, - gtTileEntity); - }) - .gui((player, world, x, y, z) -> { - if (!world.isRemote) return null; - final TileEntity te = world.getTileEntity(x, y, z); - if (!(te instanceof ICoverable)) return null; - final ICoverable gtTileEntity = (ICoverable) te; - final GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side); - return createCoverGuiContainer( - player, - cover::createWindow, - gtTileEntity.getCoverIDAtSide(side), - side, - gtTileEntity); - }) - .build()); + coverUI.put(side, UIBuilder.of().container((player, world, x, y, z) -> { + final TileEntity te = world.getTileEntity(x, y, z); + if (!(te instanceof ICoverable)) return null; + final ICoverable gtTileEntity = (ICoverable) te; + GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side); + return createCoverContainer( + player, + cover::createWindow, + te::markDirty, + gtTileEntity.getCoverIDAtSide(side), + side, + gtTileEntity); + }).gui((player, world, x, y, z) -> { + if (!world.isRemote) return null; + final TileEntity te = world.getTileEntity(x, y, z); + if (!(te instanceof ICoverable)) return null; + final ICoverable gtTileEntity = (ICoverable) te; + final GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side); + return createCoverGuiContainer( + player, + cover::createWindow, + gtTileEntity.getCoverIDAtSide(side), + side, + gtTileEntity); + }).build()); } } @@ -126,27 +121,25 @@ public class GT_UIInfos { tileEntity), (EntityPlayerMP) player); - coverUI.get(side) - .open( - player, - tileEntity.getWorld(), - tileEntity.getXCoord(), - tileEntity.getYCoord(), - tileEntity.getZCoord()); + coverUI.get(side).open( + player, + tileEntity.getWorld(), + tileEntity.getXCoord(), + tileEntity.getYCoord(), + tileEntity.getZCoord()); } /** - * Opens UI for player's item, created by {@link com.gtnewhorizons.modularui.api.screen.IItemWithModularUI#createWindow}. + * Opens UI for player's item, created by + * {@link com.gtnewhorizons.modularui.api.screen.IItemWithModularUI#createWindow}. */ public static void openPlayerHeldItemUI(EntityPlayer player) { if (NetworkUtils.isClient()) return; UIInfos.PLAYER_HELD_ITEM_UI.open(player); } - private static ModularUIContainer createTileEntityContainer( - EntityPlayer player, - Function<UIBuildContext, ModularWindow> windowCreator, - Runnable onWidgetUpdate, + private static ModularUIContainer createTileEntityContainer(EntityPlayer player, + Function<UIBuildContext, ModularWindow> windowCreator, Runnable onWidgetUpdate, ContainerConstructor containerCreator) { final UIBuildContext buildContext = new UIBuildContext(player); final ModularWindow window = windowCreator.apply(buildContext); @@ -155,23 +148,20 @@ public class GT_UIInfos { } @SideOnly(Side.CLIENT) - private static ModularGui createTileEntityGuiContainer( - EntityPlayer player, - Function<UIBuildContext, ModularWindow> windowCreator, - ContainerConstructor containerConstructor) { - final ModularUIContainer container = - createTileEntityContainer(player, windowCreator, null, containerConstructor); + private static ModularGui createTileEntityGuiContainer(EntityPlayer player, + Function<UIBuildContext, ModularWindow> windowCreator, ContainerConstructor containerConstructor) { + final ModularUIContainer container = createTileEntityContainer( + player, + windowCreator, + null, + containerConstructor); if (container == null) return null; return new ModularGui(container); } - private static ModularUIContainer createCoverContainer( - EntityPlayer player, - Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, - Runnable onWidgetUpdate, - int coverID, - byte side, - ICoverable tile) { + private static ModularUIContainer createCoverContainer(EntityPlayer player, + Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, Runnable onWidgetUpdate, int coverID, + byte side, ICoverable tile) { final GT_CoverUIBuildContext buildContext = new GT_CoverUIBuildContext(player, coverID, side, tile, false); final ModularWindow window = windowCreator.apply(buildContext); if (window == null) return null; @@ -179,12 +169,8 @@ public class GT_UIInfos { } @SideOnly(Side.CLIENT) - private static ModularGui createCoverGuiContainer( - EntityPlayer player, - Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, - int coverID, - byte side, - ICoverable tile) { + private static ModularGui createCoverGuiContainer(EntityPlayer player, + Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, int coverID, byte side, ICoverable tile) { final ModularUIContainer container = createCoverContainer(player, windowCreator, null, coverID, side, tile); if (container == null) { return null; @@ -194,6 +180,7 @@ public class GT_UIInfos { @FunctionalInterface public interface ContainerConstructor { + ModularUIContainer of(ModularUIContext context, ModularWindow mainWindow); } } diff --git a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java index 3ca1e6d45e..a480178002 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java @@ -1,33 +1,34 @@ package gregtech.api.gui.modularui; -import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture; -import com.gtnewhorizons.modularui.api.drawable.UITexture; import java.util.function.BiFunction; import java.util.stream.Collectors; import java.util.stream.IntStream; +import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture; +import com.gtnewhorizons.modularui.api.drawable.UITexture; + public class GT_UITextures { private static final String MODID = "gregtech"; public static final UITexture TRANSPARENT = UITexture.fullImage(MODID, "gui/picture/transparent"); - public static final AdaptableUITexture BACKGROUND_SINGLEBLOCK_DEFAULT = - AdaptableUITexture.of(MODID, "gui/background/singleblock_default", 176, 166, 4); - public static final SteamTexture BACKGROUND_STEAM = - SteamTexture.adaptableTexture(MODID, "gui/background/%s", 176, 166, 4); - public static final UITexture BACKGROUND_FUSION_COMPUTER = - UITexture.fullImage(MODID, "gui/background/fusion_computer"); - public static final AdaptableUITexture BACKGROUND_TEXT_FIELD = - AdaptableUITexture.of(MODID, "gui/background/text_field", 142, 28, 1); - public static final AdaptableUITexture BACKGROUND_TEXT_FIELD_LIGHT_GRAY = - AdaptableUITexture.of(MODID, "gui/background/text_field_light_gray", 61, 12, 1); + public static final AdaptableUITexture BACKGROUND_SINGLEBLOCK_DEFAULT = AdaptableUITexture + .of(MODID, "gui/background/singleblock_default", 176, 166, 4); + public static final SteamTexture BACKGROUND_STEAM = SteamTexture + .adaptableTexture(MODID, "gui/background/%s", 176, 166, 4); + public static final UITexture BACKGROUND_FUSION_COMPUTER = UITexture + .fullImage(MODID, "gui/background/fusion_computer"); + public static final AdaptableUITexture BACKGROUND_TEXT_FIELD = AdaptableUITexture + .of(MODID, "gui/background/text_field", 142, 28, 1); + public static final AdaptableUITexture BACKGROUND_TEXT_FIELD_LIGHT_GRAY = AdaptableUITexture + .of(MODID, "gui/background/text_field_light_gray", 61, 12, 1); public static final SteamTexture SLOT_ITEM_STEAM = SteamTexture.fullImage(MODID, "gui/slot/item_%s"); - public static final AdaptableUITexture SLOT_DARK_GRAY = - AdaptableUITexture.of(MODID, "gui/slot/dark_gray", 18, 18, 1); - public static final AdaptableUITexture SLOT_MAINTENANCE = - AdaptableUITexture.of(MODID, "gui/slot/maintenance", 20, 20, 1); + public static final AdaptableUITexture SLOT_DARK_GRAY = AdaptableUITexture + .of(MODID, "gui/slot/dark_gray", 18, 18, 1); + public static final AdaptableUITexture SLOT_MAINTENANCE = AdaptableUITexture + .of(MODID, "gui/slot/maintenance", 20, 20, 1); public static final AdaptableUITexture SLOT_UPLIFTED = AdaptableUITexture.of(MODID, "gui/slot/uplifted", 18, 18, 1); public static final UITexture OVERLAY_SLOT_ARROW_ME = UITexture.fullImage(MODID, "gui/overlay_slot/arrow_me"); @@ -39,51 +40,51 @@ public class GT_UITextures { public static final UITexture OVERLAY_SLOT_BOX = UITexture.fullImage(MODID, "gui/overlay_slot/box"); public static final UITexture OVERLAY_SLOT_BOXED = UITexture.fullImage(MODID, "gui/overlay_slot/boxed"); public static final UITexture OVERLAY_SLOT_CANISTER = UITexture.fullImage(MODID, "gui/overlay_slot/canister"); - public static final SteamTexture OVERLAY_SLOT_CANISTER_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/canister_%s"); + public static final SteamTexture OVERLAY_SLOT_CANISTER_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/canister_%s"); public static final UITexture OVERLAY_SLOT_CANNER = UITexture.fullImage(MODID, "gui/overlay_slot/canner"); public static final UITexture OVERLAY_SLOT_CAULDRON = UITexture.fullImage(MODID, "gui/overlay_slot/cauldron"); public static final UITexture OVERLAY_SLOT_CENTRIFUGE = UITexture.fullImage(MODID, "gui/overlay_slot/centrifuge"); - public static final UITexture OVERLAY_SLOT_CENTRIFUGE_FLUID = - UITexture.fullImage(MODID, "gui/overlay_slot/centrifuge_fluid"); - public static final SteamTexture OVERLAY_SLOT_CENTRIFUGE_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/centrifuge_%s"); + public static final UITexture OVERLAY_SLOT_CENTRIFUGE_FLUID = UITexture + .fullImage(MODID, "gui/overlay_slot/centrifuge_fluid"); + public static final SteamTexture OVERLAY_SLOT_CENTRIFUGE_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/centrifuge_%s"); public static final UITexture OVERLAY_SLOT_CHARGER = UITexture.fullImage(MODID, "gui/overlay_slot/charger"); - public static final UITexture OVERLAY_SLOT_CHARGER_FLUID = - UITexture.fullImage(MODID, "gui/overlay_slot/charger_fluid"); + public static final UITexture OVERLAY_SLOT_CHARGER_FLUID = UITexture + .fullImage(MODID, "gui/overlay_slot/charger_fluid"); public static final UITexture OVERLAY_SLOT_CIRCUIT = UITexture.fullImage(MODID, "gui/overlay_slot/circuit"); - public static final SteamTexture OVERLAY_SLOT_COAL_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/coal_%s"); + public static final SteamTexture OVERLAY_SLOT_COAL_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/coal_%s"); public static final UITexture OVERLAY_SLOT_COMPRESSOR = UITexture.fullImage(MODID, "gui/overlay_slot/compressor"); - public static final SteamTexture OVERLAY_SLOT_COMPRESSOR_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/compressor_%s"); + public static final SteamTexture OVERLAY_SLOT_COMPRESSOR_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/compressor_%s"); public static final UITexture OVERLAY_SLOT_CRUSHED_ORE = UITexture.fullImage(MODID, "gui/overlay_slot/crushed_ore"); - public static final SteamTexture OVERLAY_SLOT_CRUSHED_ORE_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/crushed_ore_%s"); - public static final UITexture OVERLAY_SLOT_CUTTER_SLICED = - UITexture.fullImage(MODID, "gui/overlay_slot/cutter_sliced"); + public static final SteamTexture OVERLAY_SLOT_CRUSHED_ORE_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/crushed_ore_%s"); + public static final UITexture OVERLAY_SLOT_CUTTER_SLICED = UITexture + .fullImage(MODID, "gui/overlay_slot/cutter_sliced"); public static final UITexture OVERLAY_SLOT_DATA_ORB = UITexture.fullImage(MODID, "gui/overlay_slot/data_orb"); public static final UITexture OVERLAY_SLOT_DATA_STICK = UITexture.fullImage(MODID, "gui/overlay_slot/data_stick"); public static final UITexture OVERLAY_SLOT_DUST = UITexture.fullImage(MODID, "gui/overlay_slot/dust"); - public static final SteamTexture OVERLAY_SLOT_DUST_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/dust_%s"); + public static final SteamTexture OVERLAY_SLOT_DUST_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/dust_%s"); public static final UITexture OVERLAY_SLOT_EXPLOSIVE = UITexture.fullImage(MODID, "gui/overlay_slot/explosive"); - public static final UITexture OVERLAY_SLOT_EXTRUDER_SHAPE = - UITexture.fullImage(MODID, "gui/overlay_slot/extruder_shape"); + public static final UITexture OVERLAY_SLOT_EXTRUDER_SHAPE = UITexture + .fullImage(MODID, "gui/overlay_slot/extruder_shape"); public static final UITexture OVERLAY_SLOT_FURNACE = UITexture.fullImage(MODID, "gui/overlay_slot/furnace"); - public static final SteamTexture OVERLAY_SLOT_FURNACE_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/furnace_%s"); + public static final SteamTexture OVERLAY_SLOT_FURNACE_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/furnace_%s"); public static final UITexture OVERLAY_SLOT_GEM = UITexture.fullImage(MODID, "gui/overlay_slot/gem"); public static final UITexture OVERLAY_SLOT_HAMMER = UITexture.fullImage(MODID, "gui/overlay_slot/hammer"); - public static final SteamTexture OVERLAY_SLOT_HAMMER_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/hammer_%s"); + public static final SteamTexture OVERLAY_SLOT_HAMMER_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/hammer_%s"); public static final UITexture OVERLAY_SLOT_HEATER_1 = UITexture.fullImage(MODID, "gui/overlay_slot/heater_1"); public static final UITexture OVERLAY_SLOT_HEATER_2 = UITexture.fullImage(MODID, "gui/overlay_slot/heater_2"); public static final UITexture OVERLAY_SLOT_IMPLOSION = UITexture.fullImage(MODID, "gui/overlay_slot/implosion"); public static final UITexture OVERLAY_SLOT_IN = UITexture.fullImage(MODID, "gui/overlay_slot/in"); public static final SteamTexture OVERLAY_SLOT_IN_STEAM = SteamTexture.fullImage(MODID, "gui/overlay_slot/in_%s"); - public static final SteamTexture OVERLAY_SLOT_INGOT_STEAM = - SteamTexture.fullImage(MODID, "gui/overlay_slot/ingot_%s"); + public static final SteamTexture OVERLAY_SLOT_INGOT_STEAM = SteamTexture + .fullImage(MODID, "gui/overlay_slot/ingot_%s"); public static final UITexture OVERLAY_SLOT_INT_CIRCUIT = UITexture.fullImage(MODID, "gui/overlay_slot/int_circuit"); public static final UITexture OVERLAY_SLOT_LENS = UITexture.fullImage(MODID, "gui/overlay_slot/lens"); public static final UITexture OVERLAY_SLOT_MICROSCOPE = UITexture.fullImage(MODID, "gui/overlay_slot/microscope"); @@ -94,8 +95,8 @@ public class GT_UITextures { public static final UITexture OVERLAY_SLOT_OUT = UITexture.fullImage(MODID, "gui/overlay_slot/out"); public static final SteamTexture OVERLAY_SLOT_OUT_STEAM = SteamTexture.fullImage(MODID, "gui/overlay_slot/out_%s"); public static final UITexture OVERLAY_SLOT_PAGE_BLANK = UITexture.fullImage(MODID, "gui/overlay_slot/page_blank"); - public static final UITexture OVERLAY_SLOT_PAGE_PRINTED = - UITexture.fullImage(MODID, "gui/overlay_slot/page_printed"); + public static final UITexture OVERLAY_SLOT_PAGE_PRINTED = UITexture + .fullImage(MODID, "gui/overlay_slot/page_printed"); public static final UITexture OVERLAY_SLOT_PRESS_1 = UITexture.fullImage(MODID, "gui/overlay_slot/press_1"); public static final UITexture OVERLAY_SLOT_PRESS_2 = UITexture.fullImage(MODID, "gui/overlay_slot/press_2"); public static final UITexture OVERLAY_SLOT_PRESS_3 = UITexture.fullImage(MODID, "gui/overlay_slot/press_3"); @@ -103,8 +104,8 @@ public class GT_UITextures { public static final UITexture OVERLAY_SLOT_ROD_1 = UITexture.fullImage(MODID, "gui/overlay_slot/rod_1"); public static final UITexture OVERLAY_SLOT_ROD_2 = UITexture.fullImage(MODID, "gui/overlay_slot/rod_2"); public static final UITexture OVERLAY_SLOT_SLICE_SHAPE = UITexture.fullImage(MODID, "gui/overlay_slot/slice_shape"); - public static final UITexture OVERLAY_SLOT_SLICER_SLICED = - UITexture.fullImage(MODID, "gui/overlay_slot/slicer_sliced"); + public static final UITexture OVERLAY_SLOT_SLICER_SLICED = UITexture + .fullImage(MODID, "gui/overlay_slot/slicer_sliced"); public static final UITexture OVERLAY_SLOT_SQUARE = UITexture.fullImage(MODID, "gui/overlay_slot/square"); public static final UITexture OVERLAY_SLOT_UUA = UITexture.fullImage(MODID, "gui/overlay_slot/uua"); public static final UITexture OVERLAY_SLOT_UUM = UITexture.fullImage(MODID, "gui/overlay_slot/uum"); @@ -113,54 +114,53 @@ public class GT_UITextures { public static final UITexture OVERLAY_SLOT_WIREMILL = UITexture.fullImage(MODID, "gui/overlay_slot/wiremill"); public static final UITexture OVERLAY_SLOT_WRENCH = UITexture.fullImage(MODID, "gui/overlay_slot/wrench"); public static final UITexture[] OVERLAY_SLOTS_NUMBER = IntStream.range(0, 12) - .mapToObj(i -> UITexture.fullImage(MODID, "gui/overlay_slot/number_" + i)) - .collect(Collectors.toList()) + .mapToObj(i -> UITexture.fullImage(MODID, "gui/overlay_slot/number_" + i)).collect(Collectors.toList()) .toArray(new UITexture[0]); public static final UITexture PROGRESSBAR_ARROW = UITexture.fullImage(MODID, "gui/progressbar/arrow"); - public static final SteamTexture PROGRESSBAR_ARROW_STEAM = - SteamTexture.fullImage(MODID, "gui/progressbar/arrow_%s"); - public static final SteamTexture PROGRESSBAR_ARROW_2_STEAM = - SteamTexture.fullImage(MODID, "gui/progressbar/arrow_2_%s"); - public static final UITexture PROGRESSBAR_ARROW_MULTIPLE = - UITexture.fullImage(MODID, "gui/progressbar/arrow_multiple"); + public static final SteamTexture PROGRESSBAR_ARROW_STEAM = SteamTexture + .fullImage(MODID, "gui/progressbar/arrow_%s"); + public static final SteamTexture PROGRESSBAR_ARROW_2_STEAM = SteamTexture + .fullImage(MODID, "gui/progressbar/arrow_2_%s"); + public static final UITexture PROGRESSBAR_ARROW_MULTIPLE = UITexture + .fullImage(MODID, "gui/progressbar/arrow_multiple"); public static final UITexture PROGRESSBAR_ASSEMBLE = UITexture.fullImage(MODID, "gui/progressbar/assemble"); - public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_1 = - UITexture.fullImage(MODID, "gui/progressbar/assemblyline_1"); - public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_2 = - UITexture.fullImage(MODID, "gui/progressbar/assemblyline_2"); - public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_3 = - UITexture.fullImage(MODID, "gui/progressbar/assemblyline_3"); + public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_1 = UITexture + .fullImage(MODID, "gui/progressbar/assemblyline_1"); + public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_2 = UITexture + .fullImage(MODID, "gui/progressbar/assemblyline_2"); + public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_3 = UITexture + .fullImage(MODID, "gui/progressbar/assemblyline_3"); public static final UITexture PROGRESSBAR_BATH = UITexture.fullImage(MODID, "gui/progressbar/bath"); public static final UITexture PROGRESSBAR_BENDING = UITexture.fullImage(MODID, "gui/progressbar/bending"); - public static final SteamTexture PROGRESSBAR_BOILER_EMPTY_STEAM = - SteamTexture.fullImage(MODID, "gui/progressbar/boiler_empty_%s"); + public static final SteamTexture PROGRESSBAR_BOILER_EMPTY_STEAM = SteamTexture + .fullImage(MODID, "gui/progressbar/boiler_empty_%s"); public static final UITexture PROGRESSBAR_BOILER_HEAT = UITexture.fullImage(MODID, "gui/progressbar/boiler_heat"); public static final UITexture PROGRESSBAR_BOILER_STEAM = UITexture.fullImage(MODID, "gui/progressbar/boiler_steam"); public static final UITexture PROGRESSBAR_BOILER_WATER = UITexture.fullImage(MODID, "gui/progressbar/boiler_water"); public static final UITexture PROGRESSBAR_CANNER = UITexture.fullImage(MODID, "gui/progressbar/canner"); - public static final UITexture PROGRESSBAR_CIRCUIT_ASSEMBLER = - UITexture.fullImage(MODID, "gui/progressbar/circuit_assembler"); + public static final UITexture PROGRESSBAR_CIRCUIT_ASSEMBLER = UITexture + .fullImage(MODID, "gui/progressbar/circuit_assembler"); public static final UITexture PROGRESSBAR_COMPRESS = UITexture.fullImage(MODID, "gui/progressbar/compress"); - public static final SteamTexture PROGRESSBAR_COMPRESS_STEAM = - SteamTexture.fullImage(MODID, "gui/progressbar/compress_%s"); + public static final SteamTexture PROGRESSBAR_COMPRESS_STEAM = SteamTexture + .fullImage(MODID, "gui/progressbar/compress_%s"); public static final UITexture PROGRESSBAR_CUT = UITexture.fullImage(MODID, "gui/progressbar/cut"); public static final UITexture PROGRESSBAR_EXTRACT = UITexture.fullImage(MODID, "gui/progressbar/extract"); - public static final SteamTexture PROGRESSBAR_EXTRACT_STEAM = - SteamTexture.fullImage(MODID, "gui/progressbar/extract_%s"); + public static final SteamTexture PROGRESSBAR_EXTRACT_STEAM = SteamTexture + .fullImage(MODID, "gui/progressbar/extract_%s"); public static final UITexture PROGRESSBAR_EXTRUDE = UITexture.fullImage(MODID, "gui/progressbar/extrude"); public static final SteamTexture PROGRESSBAR_FUEL_STEAM = SteamTexture.fullImage(MODID, "gui/progressbar/fuel_%s"); public static final UITexture PROGRESSBAR_HAMMER = UITexture.fullImage(MODID, "gui/progressbar/hammer"); public static final UITexture PROGRESSBAR_HAMMER_BASE = UITexture.fullImage(MODID, "gui/progressbar/hammer_base"); - public static final SteamTexture PROGRESSBAR_HAMMER_STEAM = - SteamTexture.fullImage(MODID, "gui/progressbar/hammer_%s"); - public static final SteamTexture PROGRESSBAR_HAMMER_BASE_STEAM = - SteamTexture.fullImage(MODID, "gui/progressbar/hammer_base_%s"); + public static final SteamTexture PROGRESSBAR_HAMMER_STEAM = SteamTexture + .fullImage(MODID, "gui/progressbar/hammer_%s"); + public static final SteamTexture PROGRESSBAR_HAMMER_BASE_STEAM = SteamTexture + .fullImage(MODID, "gui/progressbar/hammer_base_%s"); public static final UITexture PROGRESSBAR_LATHE = UITexture.fullImage(MODID, "gui/progressbar/lathe"); public static final UITexture PROGRESSBAR_LATHE_BASE = UITexture.fullImage(MODID, "gui/progressbar/lathe_base"); public static final UITexture PROGRESSBAR_MACERATE = UITexture.fullImage(MODID, "gui/progressbar/macerate"); - public static final SteamTexture PROGRESSBAR_MACERATE_STEAM = - SteamTexture.fullImage(MODID, "gui/progressbar/macerate_%s"); + public static final SteamTexture PROGRESSBAR_MACERATE_STEAM = SteamTexture + .fullImage(MODID, "gui/progressbar/macerate_%s"); public static final UITexture PROGRESSBAR_MAGNET = UITexture.fullImage(MODID, "gui/progressbar/magnet"); public static final UITexture PROGRESSBAR_MIXER = UITexture.fullImage(MODID, "gui/progressbar/mixer"); public static final UITexture PROGRESSBAR_RECYCLE = UITexture.fullImage(MODID, "gui/progressbar/recycle"); @@ -173,36 +173,36 @@ public class GT_UITextures { public static final UITexture TAB_COVER_HIGHLIGHT = UITexture.fullImage(MODID, "gui/tab/cover_highlight"); public static final UITexture TAB_COVER_DISABLED = UITexture.fullImage(MODID, "gui/tab/cover_disabled"); public static final SteamTexture TAB_COVER_STEAM_NORMAL = SteamTexture.fullImage(MODID, "gui/tab/cover_%s_normal"); - public static final SteamTexture TAB_COVER_STEAM_HIGHLIGHT = - SteamTexture.fullImage(MODID, "gui/tab/cover_%s_highlight"); - public static final SteamTexture TAB_COVER_STEAM_DISABLED = - SteamTexture.fullImage(MODID, "gui/tab/cover_%s_disabled"); + public static final SteamTexture TAB_COVER_STEAM_HIGHLIGHT = SteamTexture + .fullImage(MODID, "gui/tab/cover_%s_highlight"); + public static final SteamTexture TAB_COVER_STEAM_DISABLED = SteamTexture + .fullImage(MODID, "gui/tab/cover_%s_disabled"); public static final AdaptableUITexture TAB_TITLE = AdaptableUITexture.of(MODID, "gui/tab/title", 28, 28, 4); - public static final AdaptableUITexture TAB_TITLE_DARK = - AdaptableUITexture.of(MODID, "gui/tab/title_dark", 28, 28, 4); - public static final SteamTexture TAB_TITLE_STEAM = - SteamTexture.adaptableTexture(MODID, "gui/tab/title_%s", 28, 28, 4); - public static final SteamTexture TAB_TITLE_DARK_STEAM = - SteamTexture.adaptableTexture(MODID, "gui/tab/title_dark_%s", 28, 28, 4); - public static final AdaptableUITexture TAB_TITLE_ANGULAR = - AdaptableUITexture.of(MODID, "gui/tab/title_angular", 28, 28, 4); - public static final SteamTexture TAB_TITLE_ANGULAR_STEAM = - SteamTexture.adaptableTexture(MODID, "gui/tab/title_angular_%s", 28, 28, 4); + public static final AdaptableUITexture TAB_TITLE_DARK = AdaptableUITexture + .of(MODID, "gui/tab/title_dark", 28, 28, 4); + public static final SteamTexture TAB_TITLE_STEAM = SteamTexture + .adaptableTexture(MODID, "gui/tab/title_%s", 28, 28, 4); + public static final SteamTexture TAB_TITLE_DARK_STEAM = SteamTexture + .adaptableTexture(MODID, "gui/tab/title_dark_%s", 28, 28, 4); + public static final AdaptableUITexture TAB_TITLE_ANGULAR = AdaptableUITexture + .of(MODID, "gui/tab/title_angular", 28, 28, 4); + public static final SteamTexture TAB_TITLE_ANGULAR_STEAM = SteamTexture + .adaptableTexture(MODID, "gui/tab/title_angular_%s", 28, 28, 4); public static final UITexture BUTTON_STANDARD = AdaptableUITexture.of(MODID, "gui/button/standard", 18, 18, 1); - public static final UITexture BUTTON_STANDARD_TOGGLE = - AdaptableUITexture.of(MODID, "gui/button/standard_toggle", 18, 18, 1); + public static final UITexture BUTTON_STANDARD_TOGGLE = AdaptableUITexture + .of(MODID, "gui/button/standard_toggle", 18, 18, 1); public static final UITexture BUTTON_COVER_NORMAL = UITexture.fullImage(MODID, "gui/button/cover_normal"); - public static final UITexture BUTTON_COVER_NORMAL_HOVERED = - UITexture.fullImage(MODID, "gui/button/cover_normal_hovered"); - public static final UITexture BUTTON_COVER_NORMAL_DISABLED = - UITexture.fullImage(MODID, "gui/button/cover_normal_disabled"); + public static final UITexture BUTTON_COVER_NORMAL_HOVERED = UITexture + .fullImage(MODID, "gui/button/cover_normal_hovered"); + public static final UITexture BUTTON_COVER_NORMAL_DISABLED = UITexture + .fullImage(MODID, "gui/button/cover_normal_disabled"); public static final UITexture OVERLAY_BUTTON_DISABLE = UITexture.fullImage(MODID, "gui/overlay_button/disable"); - public static final UITexture OVERLAY_BUTTON_REDSTONE_OFF = - UITexture.fullImage(MODID, "gui/overlay_button/redstone_off"); - public static final UITexture OVERLAY_BUTTON_REDSTONE_ON = - UITexture.fullImage(MODID, "gui/overlay_button/redstone_on"); + public static final UITexture OVERLAY_BUTTON_REDSTONE_OFF = UITexture + .fullImage(MODID, "gui/overlay_button/redstone_off"); + public static final UITexture OVERLAY_BUTTON_REDSTONE_ON = UITexture + .fullImage(MODID, "gui/overlay_button/redstone_on"); public static final UITexture OVERLAY_BUTTON_CHECKMARK = UITexture.fullImage(MODID, "gui/overlay_button/checkmark"); public static final UITexture OVERLAY_BUTTON_CROSS = UITexture.fullImage(MODID, "gui/overlay_button/cross"); public static final UITexture OVERLAY_BUTTON_WHITELIST = UITexture.fullImage(MODID, "gui/overlay_button/whitelist"); @@ -210,77 +210,77 @@ public class GT_UITextures { public static final UITexture OVERLAY_BUTTON_PROGRESS = UITexture.fullImage(MODID, "gui/overlay_button/progress"); public static final UITexture OVERLAY_BUTTON_EXPORT = UITexture.fullImage(MODID, "gui/overlay_button/export"); public static final UITexture OVERLAY_BUTTON_IMPORT = UITexture.fullImage(MODID, "gui/overlay_button/import"); - public static final UITexture OVERLAY_BUTTON_AUTOOUTPUT_ITEM = - UITexture.fullImage(MODID, "gui/overlay_button/autooutput_item"); - public static final UITexture OVERLAY_BUTTON_AUTOOUTPUT_FLUID = - UITexture.fullImage(MODID, "gui/overlay_button/autooutput_fluid"); - public static final UITexture OVERLAY_BUTTON_ALLOW_INPUT = - UITexture.fullImage(MODID, "gui/overlay_button/allow_input"); - public static final UITexture OVERLAY_BUTTON_BLOCK_INPUT = - UITexture.fullImage(MODID, "gui/overlay_button/block_input"); - public static final UITexture OVERLAY_BUTTON_ARROW_GREEN_UP = - UITexture.fullImage(MODID, "gui/overlay_button/arrow_green_up"); - public static final UITexture OVERLAY_BUTTON_ARROW_GREEN_DOWN = - UITexture.fullImage(MODID, "gui/overlay_button/arrow_green_down"); + public static final UITexture OVERLAY_BUTTON_AUTOOUTPUT_ITEM = UITexture + .fullImage(MODID, "gui/overlay_button/autooutput_item"); + public static final UITexture OVERLAY_BUTTON_AUTOOUTPUT_FLUID = UITexture + .fullImage(MODID, "gui/overlay_button/autooutput_fluid"); + public static final UITexture OVERLAY_BUTTON_ALLOW_INPUT = UITexture + .fullImage(MODID, "gui/overlay_button/allow_input"); + public static final UITexture OVERLAY_BUTTON_BLOCK_INPUT = UITexture + .fullImage(MODID, "gui/overlay_button/block_input"); + public static final UITexture OVERLAY_BUTTON_ARROW_GREEN_UP = UITexture + .fullImage(MODID, "gui/overlay_button/arrow_green_up"); + public static final UITexture OVERLAY_BUTTON_ARROW_GREEN_DOWN = UITexture + .fullImage(MODID, "gui/overlay_button/arrow_green_down"); public static final UITexture OVERLAY_BUTTON_CYCLIC = UITexture.fullImage(MODID, "gui/overlay_button/cyclic"); - public static final UITexture OVERLAY_BUTTON_EMIT_ENERGY = - UITexture.fullImage(MODID, "gui/overlay_button/emit_energy"); - public static final UITexture OVERLAY_BUTTON_EMIT_REDSTONE = - UITexture.fullImage(MODID, "gui/overlay_button/emit_redstone"); - public static final UITexture OVERLAY_BUTTON_INVERT_REDSTONE = - UITexture.fullImage(MODID, "gui/overlay_button/invert_redstone"); - public static final UITexture OVERLAY_BUTTON_STOCKING_MODE = - UITexture.fullImage(MODID, "gui/overlay_button/stocking_mode"); - public static final UITexture OVERLAY_BUTTON_INVERT_FILTER = - UITexture.fullImage(MODID, "gui/overlay_button/invert_filter"); + public static final UITexture OVERLAY_BUTTON_EMIT_ENERGY = UITexture + .fullImage(MODID, "gui/overlay_button/emit_energy"); + public static final UITexture OVERLAY_BUTTON_EMIT_REDSTONE = UITexture + .fullImage(MODID, "gui/overlay_button/emit_redstone"); + public static final UITexture OVERLAY_BUTTON_INVERT_REDSTONE = UITexture + .fullImage(MODID, "gui/overlay_button/invert_redstone"); + public static final UITexture OVERLAY_BUTTON_STOCKING_MODE = UITexture + .fullImage(MODID, "gui/overlay_button/stocking_mode"); + public static final UITexture OVERLAY_BUTTON_INVERT_FILTER = UITexture + .fullImage(MODID, "gui/overlay_button/invert_filter"); public static final UITexture OVERLAY_BUTTON_NBT = UITexture.fullImage(MODID, "gui/overlay_button/nbt"); public static final UITexture OVERLAY_BUTTON_PRINT = UITexture.fullImage(MODID, "gui/overlay_button/print"); public static final UITexture OVERLAY_BUTTON_TRANSPOSE = UITexture.fullImage(MODID, "gui/overlay_button/transpose"); - public static final UITexture OVERLAY_BUTTON_BOUNDING_BOX = - UITexture.fullImage(MODID, "gui/overlay_button/bounding_box"); - public static final UITexture OVERLAY_BUTTON_MINUS_SMALL = - UITexture.fullImage(MODID, "gui/overlay_button/minus_small"); - public static final UITexture OVERLAY_BUTTON_MINUS_LARGE = - UITexture.fullImage(MODID, "gui/overlay_button/minus_large"); - public static final UITexture OVERLAY_BUTTON_PLUS_SMALL = - UITexture.fullImage(MODID, "gui/overlay_button/plus_small"); - public static final UITexture OVERLAY_BUTTON_PLUS_LARGE = - UITexture.fullImage(MODID, "gui/overlay_button/plus_large"); + public static final UITexture OVERLAY_BUTTON_BOUNDING_BOX = UITexture + .fullImage(MODID, "gui/overlay_button/bounding_box"); + public static final UITexture OVERLAY_BUTTON_MINUS_SMALL = UITexture + .fullImage(MODID, "gui/overlay_button/minus_small"); + public static final UITexture OVERLAY_BUTTON_MINUS_LARGE = UITexture + .fullImage(MODID, "gui/overlay_button/minus_large"); + public static final UITexture OVERLAY_BUTTON_PLUS_SMALL = UITexture + .fullImage(MODID, "gui/overlay_button/plus_small"); + public static final UITexture OVERLAY_BUTTON_PLUS_LARGE = UITexture + .fullImage(MODID, "gui/overlay_button/plus_large"); public static final UITexture OVERLAY_BUTTON_GATE_AND = UITexture.fullImage(MODID, "gui/overlay_button/gate_and"); public static final UITexture OVERLAY_BUTTON_GATE_NAND = UITexture.fullImage(MODID, "gui/overlay_button/gate_nand"); public static final UITexture OVERLAY_BUTTON_GATE_OR = UITexture.fullImage(MODID, "gui/overlay_button/gate_or"); public static final UITexture OVERLAY_BUTTON_GATE_NOR = UITexture.fullImage(MODID, "gui/overlay_button/gate_nor"); public static final UITexture OVERLAY_BUTTON_ANALOG = UITexture.fullImage(MODID, "gui/overlay_button/analog"); public static final UITexture OVERLAY_BUTTON_LOCK = UITexture.fullImage(MODID, "gui/overlay_button/lock"); - public static final UITexture OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE = - UITexture.fullImage(MODID, "gui/overlay_button/input_from_output_side"); - public static final UITexture OVERLAY_BUTTON_VOID_EXCESS = - UITexture.fullImage(MODID, "gui/overlay_button/void_excess"); + public static final UITexture OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE = UITexture + .fullImage(MODID, "gui/overlay_button/input_from_output_side"); + public static final UITexture OVERLAY_BUTTON_VOID_EXCESS = UITexture + .fullImage(MODID, "gui/overlay_button/void_excess"); public static final UITexture OVERLAY_BUTTON_VOID_ALL = UITexture.fullImage(MODID, "gui/overlay_button/void_all"); public static final UITexture OVERLAY_BUTTON_NEI = UITexture.fullImage(MODID, "gui/overlay_button/nei"); /** * Can adjust size as needed. */ - public static final AdaptableUITexture PICTURE_SCREEN_BLACK = - AdaptableUITexture.of(MODID, "gui/picture/screen_black", 16, 16, 2); + public static final AdaptableUITexture PICTURE_SCREEN_BLACK = AdaptableUITexture + .of(MODID, "gui/picture/screen_black", 16, 16, 2); - public static final UITexture PICTURE_RADIATION_WARNING = - UITexture.fullImage(MODID, "gui/picture/radiation_warning"); - public static final UITexture PICTURE_GT_LOGO_17x17_TRANSPARENT = - UITexture.fullImage(MODID, "gui/picture/gt_logo_17x17_transparent"); - public static final UITexture PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY = - UITexture.fullImage(MODID, "gui/picture/gt_logo_17x17_transparent_gray"); - public static final SteamTexture PICTURE_GT_LOGO_17x17_TRANSPARENT_STEAM = - SteamTexture.fullImage(MODID, "gui/picture/gt_logo_17x17_transparent_%s"); + public static final UITexture PICTURE_RADIATION_WARNING = UITexture + .fullImage(MODID, "gui/picture/radiation_warning"); + public static final UITexture PICTURE_GT_LOGO_17x17_TRANSPARENT = UITexture + .fullImage(MODID, "gui/picture/gt_logo_17x17_transparent"); + public static final UITexture PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY = UITexture + .fullImage(MODID, "gui/picture/gt_logo_17x17_transparent_gray"); + public static final SteamTexture PICTURE_GT_LOGO_17x17_TRANSPARENT_STEAM = SteamTexture + .fullImage(MODID, "gui/picture/gt_logo_17x17_transparent_%s"); public static final UITexture PICTURE_GT_LOGO_18x18 = UITexture.fullImage(MODID, "gui/picture/gt_logo_18x18"); public static final UITexture PICTURE_GT_LOGO_19x19 = UITexture.fullImage(MODID, "gui/picture/gt_logo_19x19"); public static final UITexture PICTURE_INFORMATION = UITexture.fullImage(MODID, "gui/picture/information"); - public static final UITexture PICTURE_STALLED_ELECTRICITY = - UITexture.fullImage(MODID, "gui/picture/stalled_electricity"); + public static final UITexture PICTURE_STALLED_ELECTRICITY = UITexture + .fullImage(MODID, "gui/picture/stalled_electricity"); public static final UITexture PICTURE_STALLED_STEAM = UITexture.fullImage(MODID, "gui/picture/stalled_steam"); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_RED = - (width, fromRight) -> UITexture.partly( + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_RED = (width, fromRight) -> UITexture + .partly( MODID, "gui/picture/arrow_22_red", 87, @@ -289,8 +289,8 @@ public class GT_UITextures { 0, fromRight ? 87 : width, 22); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_BLUE = - (width, fromRight) -> UITexture.partly( + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_BLUE = (width, fromRight) -> UITexture + .partly( MODID, "gui/picture/arrow_22_blue", 87, @@ -299,8 +299,8 @@ public class GT_UITextures { 0, fromRight ? 87 : width, 22); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_WHITE = - (width, fromRight) -> UITexture.partly( + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_WHITE = (width, fromRight) -> UITexture + .partly( MODID, "gui/picture/arrow_22_white", 87, @@ -309,8 +309,8 @@ public class GT_UITextures { 0, fromRight ? 87 : width, 22); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_RED = - (width, fromRight) -> UITexture.partly( + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_RED = (width, fromRight) -> UITexture + .partly( MODID, "gui/picture/arrow_24_red", 69, @@ -319,8 +319,8 @@ public class GT_UITextures { 0, fromRight ? 69 : width, 24); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_BLUE = - (width, fromRight) -> UITexture.partly( + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_BLUE = (width, fromRight) -> UITexture + .partly( MODID, "gui/picture/arrow_24_blue", 69, @@ -329,8 +329,8 @@ public class GT_UITextures { 0, fromRight ? 69 : width, 24); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_WHITE = - (width, fromRight) -> UITexture.partly( + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_WHITE = (width, fromRight) -> UITexture + .partly( MODID, "gui/picture/arrow_24_white", 69, @@ -344,8 +344,8 @@ public class GT_UITextures { public static final UITexture PICTURE_SLOTS_HOLO_3BY3 = UITexture.fullImage(MODID, "gui/picture/slots_holo_3by3"); public static final UITexture PICTURE_ARROW_DOUBLE = UITexture.fullImage(MODID, "gui/picture/arrow_double"); public static final UITexture PICTURE_SUPER_BUFFER = UITexture.fullImage(MODID, "gui/picture/super_buffer"); - public static final UITexture PICTURE_SQUARE_LIGHT_GRAY = - UITexture.fullImage(MODID, "gui/picture/square_light_gray"); + public static final UITexture PICTURE_SQUARE_LIGHT_GRAY = UITexture + .fullImage(MODID, "gui/picture/square_light_gray"); public static final UITexture PICTURE_GAUGE = UITexture.fullImage(MODID, "gui/picture/gauge"); public static final UITexture PICTURE_ITEM_IN = UITexture.fullImage(MODID, "gui/picture/item_in"); public static final UITexture PICTURE_ITEM_OUT = UITexture.fullImage(MODID, "gui/picture/item_out"); diff --git a/src/main/java/gregtech/api/gui/modularui/GUITextureSet.java b/src/main/java/gregtech/api/gui/modularui/GUITextureSet.java index 13d7eadfee..1bacff886a 100644 --- a/src/main/java/gregtech/api/gui/modularui/GUITextureSet.java +++ b/src/main/java/gregtech/api/gui/modularui/GUITextureSet.java @@ -1,17 +1,19 @@ package gregtech.api.gui.modularui; +import java.util.function.Function; + import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture; import com.gtnewhorizons.modularui.api.drawable.UITexture; import gregtech.api.enums.SteamVariant; -import java.util.function.Function; /** - * Set of textures that is commonly used for GUI but can vary depending on "style" of machines, - * e.g. bronze steam or steel steam. - * <br> This has builder pattern; Textures you didn't specify will fall back to default ones. + * Set of textures that is commonly used for GUI but can vary depending on "style" of machines, e.g. bronze steam or + * steel steam. <br> + * This has builder pattern; Textures you didn't specify will fall back to default ones. */ public class GUITextureSet { + private UITexture mainBackground; private UITexture itemSlot; private UITexture fluidSlot; @@ -27,11 +29,12 @@ public class GUITextureSet { private UITexture gregtechLogo; public static final GUITextureSet DEFAULT = new GUITextureSet() - .setMainBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT) - .setItemSlot(ModularUITextures.ITEM_SLOT) + .setMainBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT).setItemSlot(ModularUITextures.ITEM_SLOT) .setFluidSlot(ModularUITextures.FLUID_SLOT) .setCoverTab( - GT_UITextures.TAB_COVER_NORMAL, GT_UITextures.TAB_COVER_HIGHLIGHT, GT_UITextures.TAB_COVER_DISABLED) + GT_UITextures.TAB_COVER_NORMAL, + GT_UITextures.TAB_COVER_HIGHLIGHT, + GT_UITextures.TAB_COVER_DISABLED) .setTitleTab(GT_UITextures.TAB_TITLE, GT_UITextures.TAB_TITLE_DARK, GT_UITextures.TAB_TITLE_ANGULAR) .setGregTechLogo(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT); @@ -77,8 +80,8 @@ public class GUITextureSet { return this; } - public GUITextureSet setTitleTab( - AdaptableUITexture titleNormal, AdaptableUITexture titleDark, AdaptableUITexture titleTabAngular) { + public GUITextureSet setTitleTab(AdaptableUITexture titleNormal, AdaptableUITexture titleDark, + AdaptableUITexture titleTabAngular) { this.titleTabNormal = titleNormal; this.titleTabDark = titleDark; this.titleTabAngular = titleTabAngular; diff --git a/src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java b/src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java index 40ebcea0f4..87833da7b3 100644 --- a/src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java +++ b/src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java @@ -1,19 +1,21 @@ package gregtech.api.gui.modularui; +import java.util.function.Consumer; +import java.util.function.Function; + import com.gtnewhorizons.modularui.api.widget.Widget; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.DataControllerWidget; -import java.util.function.Consumer; -import java.util.function.Function; /** - * Widget whose state is controlled by specific data. - * Data can be anything, e.g. {@link ISerializableObject} or machine recipe mode. - * <br> No widgets implementing this interface should not sync; - * Instead, {@link DataControllerWidget} will sync data, either when this widget triggers update on client - * or data update is detected on server. + * Widget whose state is controlled by specific data. Data can be anything, e.g. {@link ISerializableObject} or machine + * recipe mode. <br> + * No widgets implementing this interface should not sync; Instead, {@link DataControllerWidget} will sync data, either + * when this widget triggers update on client or data update is detected on server. + * * @param <T> Data type stored in the parent widget * @param <U> State type stored in this widget * @see DataControllerWidget @@ -22,21 +24,20 @@ import java.util.function.Function; public interface IDataFollowerWidget<T, U> { /** - * Sets function to get widget state from provided data. This function will be called when client receives data - * from server and {@link DataControllerWidget} updates all children, including this widget. + * Sets function to get widget state from provided data. This function will be called when client receives data from + * server and {@link DataControllerWidget} updates all children, including this widget. */ Widget setDataToStateGetter(Function<T, U> dataToStateGetter); /** - * Sets setter called when this widget gets action from player. - * Basically the same functionality with widgets that have getter/setter. + * Sets setter called when this widget gets action from player. Basically the same functionality with widgets that + * have getter/setter. */ Widget setStateSetter(Consumer<U> setter); /** - * Updates state of this widget with provided data. - * On server {@link DataControllerWidget} won't propagate data update to this widget, - * so this method is client-only. + * Updates state of this widget with provided data. On server {@link DataControllerWidget} won't propagate data + * update to this widget, so this method is client-only. */ @SideOnly(Side.CLIENT) void updateState(T data); diff --git a/src/main/java/gregtech/api/gui/modularui/SteamTexture.java b/src/main/java/gregtech/api/gui/modularui/SteamTexture.java index 9e52c0f874..619b19e232 100644 --- a/src/main/java/gregtech/api/gui/modularui/SteamTexture.java +++ b/src/main/java/gregtech/api/gui/modularui/SteamTexture.java @@ -5,8 +5,7 @@ import com.gtnewhorizons.modularui.api.drawable.UITexture; import gregtech.api.enums.SteamVariant; /** - * Wrapper for {@link UITexture}s used to - * ease in choosing between Bronze, Steel and Primitive textures. + * Wrapper for {@link UITexture}s used to ease in choosing between Bronze, Steel and Primitive textures. */ public class SteamTexture { @@ -27,13 +26,21 @@ public class SteamTexture { UITexture.fullImage(mod, String.format(location, SteamVariant.PRIMITIVE))); } - public static SteamTexture adaptableTexture( - String mod, String location, int imageWidth, int imageHeight, int borderWidthPixel) { + public static SteamTexture adaptableTexture(String mod, String location, int imageWidth, int imageHeight, + int borderWidthPixel) { return new SteamTexture( AdaptableUITexture.of( - mod, String.format(location, SteamVariant.BRONZE), imageWidth, imageHeight, borderWidthPixel), + mod, + String.format(location, SteamVariant.BRONZE), + imageWidth, + imageHeight, + borderWidthPixel), AdaptableUITexture.of( - mod, String.format(location, SteamVariant.STEEL), imageWidth, imageHeight, borderWidthPixel), + mod, + String.format(location, SteamVariant.STEEL), + imageWidth, + imageHeight, + borderWidthPixel), AdaptableUITexture.of( mod, String.format(location, SteamVariant.PRIMITIVE), 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 d5e383ed50..639b402856 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java @@ -1,34 +1,33 @@ package gregtech.api.gui.widgets; -import codechicken.nei.api.API; -import codechicken.nei.api.INEIGuiAdapter; -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; +import codechicken.nei.api.API; +import codechicken.nei.api.INEIGuiAdapter; +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; + /** * 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 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" - }; + 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" }; // Not sure there's a point in JIT translation but that's what this is private String[] translatedSides; @@ -38,35 +37,24 @@ 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 - * @param tabHeight height of a tab - * @param tabWidth width of a tab - * @param tabSpacing pixels between each tab - * @param xDir whether to extend the line horizontally to the right (NORMAL), - * the left (INVERSE) or not at all (NONE) - * @param yDir whether to extend the line vertically down (NORMAL), up (INVERSE) - * or not at all (NONE) - * @param displayMode whether to display on the left side of the GT_ITabRenderer - * (NORMAL), on it's right side (INVERSE) or not at all (NONE) + * @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 + * @param tabHeight height of a tab + * @param tabWidth width of a tab + * @param tabSpacing pixels between each tab + * @param xDir whether to extend the line horizontally to the right (NORMAL), the left (INVERSE) or not at + * all (NONE) + * @param yDir whether to extend the line vertically down (NORMAL), up (INVERSE) or not at all (NONE) + * @param displayMode whether to display on the left side of the GT_ITabRenderer (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 - * @param tile The IGregTechTileEntity the covers of which we are accessing - * @param colorization The colorization of the GUI we are adding tabs to + * @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; @@ -89,27 +77,31 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { @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); } @Override 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)); + 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)); } } /** * Add the cover on this side of the IGregTechTileEntity to the tabs + * * @param side * @param cover */ @@ -121,6 +113,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { /** * Decorate the cover's tooltips according to the side it's on and on whether the tab is enabled or not + * * @param side * @param cover * @param enabled @@ -130,8 +123,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { final List<String> tooltip = cover.getTooltip(Minecraft.getMinecraft().thePlayer, true); tooltip.set( 0, - (enabled ? EnumChatFormatting.UNDERLINE : EnumChatFormatting.DARK_GRAY) - + getSideDescription(side) + (enabled ? EnumChatFormatting.UNDERLINE : EnumChatFormatting.DARK_GRAY) + getSideDescription(side) + (enabled ? EnumChatFormatting.RESET + ": " : ": " + EnumChatFormatting.RESET) + tooltip.get(0)); return tooltip.toArray(new String[0]); @@ -139,6 +131,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { /** * Get the translated name for a side of the IGregTechTileEntity + * * @param side * @return translated name for a side of the IGregTechTileEntity */ @@ -156,6 +149,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { * Hide any NEI slots that would intersect with a cover tab */ static class CoverTabLineNEIHandler extends INEIGuiAdapter { + @Override public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) { final Rectangle neiSlotArea = new Rectangle(x, y, w, h); 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 7a57c49515..bfeb84d762 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java @@ -1,16 +1,19 @@ 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 codechicken.lib.gui.GuiDraw; +import gregtech.api.interfaces.IGuiScreen; +import gregtech.api.util.GT_UtilityClient; + public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { private GT_GuiIcon bgIcon; @@ -19,6 +22,7 @@ public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { private int xPosition, yPosition; private List<String> itemTooltips; private final GT_GuiTooltip tooltip = new GT_GuiTooltip(null) { + @Override public List<String> getToolTipText() { return itemTooltips; @@ -112,26 +116,24 @@ 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); + gui.getItemRenderer().renderItemAndEffectIntoGUI( + gui.getFontRenderer(), + Minecraft.getMinecraft().getTextureManager(), + item, + xPosition, + yPosition); if (item.getItem() instanceof ItemBlock) GL11.glPopAttrib(); } - if (getMimicSlot()) - if (getBounds().contains(mouseX - gui.getGuiLeft(), mouseY - gui.getGuiTop())) { - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glColorMask(true, true, true, false); - GuiDraw.drawGradientRect(xPosition, yPosition, 16, 16, 0x80ffffff, 0x80ffffff); - GL11.glColorMask(true, true, true, true); - // no glEnable, state will be recovered by glPopAttrib - } + if (getMimicSlot()) if (getBounds().contains(mouseX - gui.getGuiLeft(), mouseY - gui.getGuiTop())) { + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glColorMask(true, true, true, false); + GuiDraw.drawGradientRect(xPosition, yPosition, 16, 16, 0x80ffffff, 0x80ffffff); + GL11.glColorMask(true, true, true, true); + // no glEnable, state will be recovered by glPopAttrib + } GL11.glPopAttrib(); } 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 43fbe0711c..01c8671678 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java @@ -1,12 +1,15 @@ package gregtech.api.gui.widgets; -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; +import gregtech.api.interfaces.IGuiIcon; + public enum GT_GuiIcon implements IGuiIcon { + BUTTON_NORMAL(0, 0, 0), BUTTON_DOWN(0, 32, 0), BUTTON_HIGHLIGHT(0, 32 * 2, 0), @@ -52,15 +55,12 @@ public enum GT_GuiIcon implements IGuiIcon { 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), - ; + 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"), - }; + 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"), }; public final int x, y, width, height; public final IGuiIcon overlay; @@ -83,20 +83,13 @@ public enum GT_GuiIcon implements IGuiIcon { 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()]); 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 fd9a879902..01bbccc599 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java @@ -1,12 +1,16 @@ 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 gregtech.api.interfaces.IGuiScreen; + public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElement { + public static final int DEFAULT_WIDTH = 16; public static final int DEFAULT_HEIGHT = 16; @@ -43,8 +47,7 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen if (this.visible) { // moused over - this.field_146123_n = mouseX >= this.xPosition - && mouseY >= this.yPosition + this.field_146123_n = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + width && mouseY < this.yPosition + height; @@ -57,7 +60,7 @@ 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); + // 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); 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 113b19711b..636ff0bc26 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java @@ -3,6 +3,7 @@ package gregtech.api.gui.widgets; import gregtech.api.interfaces.IGuiScreen; public class GT_GuiIconCheckButton extends GT_GuiIconButton { + private final GT_GuiIcon checkedIcon; private final GT_GuiIcon normalIcon; private final String checkedTooltip; @@ -13,15 +14,8 @@ 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; 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 3e2ac1e296..b2430f7b76 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,14 @@ 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 gregtech.api.interfaces.IGuiScreen; + public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGuiElement { + private final int x0, y0; private final IGuiScreen gui; public final int id; @@ -43,8 +46,7 @@ public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGu @Override public boolean textboxKeyTyped(char c, int key) { - if (validChar(c, key) - || c == 1 + if (validChar(c, key) || c == 1 || c == 3 || c == 22 || c == 24 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 105e919149..015c8c7697 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java @@ -1,10 +1,13 @@ package gregtech.api.gui.widgets; -import gregtech.api.util.GT_TooltipDataCache.TooltipData; import java.awt.Rectangle; + import net.minecraft.inventory.Slot; +import gregtech.api.util.GT_TooltipDataCache.TooltipData; + public class GT_GuiSlotTooltip extends GT_GuiTooltip { + private final Slot slot; public GT_GuiSlotTooltip(Slot slot, TooltipData data) { 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 2bb28fb929..ffae5c30e6 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java @@ -1,10 +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(); } 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 1bb2f6dbb7..661ed81fce 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java @@ -1,19 +1,23 @@ package gregtech.api.gui.widgets; -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; +import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet; +import gregtech.api.gui.widgets.GT_GuiTabLine.GT_ITabRenderer; +import gregtech.api.interfaces.IGuiIcon; + /** * A tab to be attached to a tab line */ public class GT_GuiTab { + private static final int SLOT_SIZE = 18; public boolean visible = true, mousedOver, enabled = true; @@ -29,24 +33,17 @@ 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 - * @param tabBackground set of background textures - * @param item item to draw atop the background texture, not colored - * @param overlay texture to draw atop the background texture, not colored - * @param tooltipText tooltip of this tab + * @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 + * @param tabBackground set of background textures + * @param item item to draw atop the background texture, not colored + * @param overlay texture to draw atop the background texture, not colored + * @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; @@ -133,13 +130,12 @@ public class GT_GuiTab { 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); + 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(); 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 ff0ccc2ac1..cb94a81dfa 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java @@ -1,20 +1,25 @@ package gregtech.api.gui.widgets; -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; +import gregtech.api.interfaces.IGuiIcon; + /** * Draws clickable and configurable tabs on the left or right side of another GUI */ public class GT_GuiTabLine { + /** * Defines a set of textures a tab line can use to render it's tab backgrounds */ public static class GT_GuiTabIconSet { + public IGuiIcon disabled; public IGuiIcon normal; public IGuiIcon highlight; @@ -30,6 +35,7 @@ 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); @@ -46,10 +52,11 @@ public class GT_GuiTabLine { } /** - * A GUI should implement these methods as well as call the tab line's - * onMouseClicked, onInit and drawTabs for the tab line to attach to it properly. + * A GUI should implement these methods as well as call the tab line's onMouseClicked, onInit and drawTabs for the + * tab line to attach to it properly. */ public interface GT_ITabRenderer { + int getGuiLeft(); int getGuiTop(); @@ -82,32 +89,22 @@ public class GT_GuiTabLine { /** * 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 - * @param tabLineTop top position of the tab line in relation to the gui - * @param tabHeight height of a tab - * @param tabWidth width of a tab - * @param tabSpacing pixels between each tab - * @param xDir whether to extend the line horizontally to the right (NORMAL), - * the left (INVERSE) or not at all (NONE) - * @param yDir whether to extend the line vertically down (NORMAL), up (INVERSE) - * or not at all (NONE) - * @param displayMode whether to display on the left side of the GT_ITabRenderer - * (NORMAL), on it's right side (INVERSE) or not at all (NONE) + * @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 + * @param tabLineTop top position of the tab line in relation to the gui + * @param tabHeight height of a tab + * @param tabWidth width of a tab + * @param tabSpacing pixels between each tab + * @param xDir whether to extend the line horizontally to the right (NORMAL), the left (INVERSE) or not at + * all (NONE) + * @param yDir whether to extend the line vertically down (NORMAL), up (INVERSE) or not at all (NONE) + * @param displayMode whether to display on the left side of the GT_ITabRenderer (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, + 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]; @@ -124,8 +121,7 @@ public class GT_GuiTabLine { } /** - * Creates a new tab at the specified position with the given parameters. - * This class handles the positioning. + * Creates a new tab at the specified position with the given parameters. This class handles the positioning. * * @param tabId * @param item @@ -167,9 +163,8 @@ public class GT_GuiTabLine { } /** - * Draw the tabs for this tab bar - * GT_ITabRenderer must call this method on drawGuiContainerBackgroundLayer - * or on drawScreen. + * Draw the tabs for this tab bar GT_ITabRenderer must call this method on drawGuiContainerBackgroundLayer or on + * drawScreen. * * @param parTicks * @param mouseX @@ -217,8 +212,7 @@ public class GT_GuiTabLine { } /** - * Call tabClick for every tab that was clicked. - * GT_ITabRenderer must call this method on mouseClicked. + * Call tabClick for every tab that was clicked. GT_ITabRenderer must call this method on mouseClicked. * * @param mouseX * @param mouseY @@ -242,8 +236,7 @@ public class GT_GuiTabLine { protected void tabClicked(int tabId, int mouseButton) {} /** - * Reposition ourselves whenever the GT_ITabRenderer does so. - * GT_ITabRenderer must call this method on Init. + * Reposition ourselves whenever the GT_ITabRenderer does so. GT_ITabRenderer must call this method on Init. */ public void onInit() { for (int i = 0; i < mTabs.length; i++) { @@ -260,8 +253,7 @@ public class GT_GuiTabLine { * @return */ private int getTabX(int tabId) { - return this.gui.getGuiLeft() - + (flipHorizontally ? (gui.getXSize() - tabLineLeft - tabWidth) : tabLineLeft) + return this.gui.getGuiLeft() + (flipHorizontally ? (gui.getXSize() - tabLineLeft - tabWidth) : tabLineLeft) + (tabId * (tabWidth + tabSpacing) * xDir.getValue()); } 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 ab755eb2c3..1162630d5e 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java @@ -1,13 +1,15 @@ 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 org.lwjgl.input.Keyboard; +import gregtech.api.util.GT_TooltipDataCache.TooltipData; + public class GT_GuiTooltip { protected Rectangle bounds; @@ -16,8 +18,8 @@ public class GT_GuiTooltip { public boolean enabled = true; /** - * 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. + * 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 @@ -28,8 +30,8 @@ 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. + * 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 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 1c31670071..a74f5adda5 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java @@ -2,10 +2,13 @@ package gregtech.api.gui.widgets; 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(); @@ -46,9 +49,7 @@ 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; diff --git a/src/main/java/gregtech/api/interfaces/IBlockContainer.java b/src/main/java/gregtech/api/interfaces/IBlockContainer.java index 89bda5de12..5a80655a5c 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockContainer.java +++ b/src/main/java/gregtech/api/interfaces/IBlockContainer.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces; import net.minecraft.block.Block; public interface IBlockContainer { + Block getBlock(); byte getMeta(); diff --git a/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java b/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java index 50f6cce5d9..0c8fce931b 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java +++ b/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java @@ -4,5 +4,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.world.World; public interface IBlockOnWalkOver { + void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ); } diff --git a/src/main/java/gregtech/api/interfaces/IChunkLoader.java b/src/main/java/gregtech/api/interfaces/IChunkLoader.java index adba5e721e..b597d6a71f 100644 --- a/src/main/java/gregtech/api/interfaces/IChunkLoader.java +++ b/src/main/java/gregtech/api/interfaces/IChunkLoader.java @@ -4,6 +4,7 @@ import net.minecraft.world.ChunkCoordIntPair; // This interface is implemented by the machines that actively load a working chunk public interface IChunkLoader { + // return a working chunk coordinates, may be null ChunkCoordIntPair getActiveChunk(); } diff --git a/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java b/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java index d3c312e610..55053e1d12 100644 --- a/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java +++ b/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java @@ -1,5 +1,6 @@ package gregtech.api.interfaces; public interface IColorModulationContainer { + short[] getRGBA(); } diff --git a/src/main/java/gregtech/api/interfaces/ICondition.java b/src/main/java/gregtech/api/interfaces/ICondition.java index b29b960650..554cd2df77 100644 --- a/src/main/java/gregtech/api/interfaces/ICondition.java +++ b/src/main/java/gregtech/api/interfaces/ICondition.java @@ -1,11 +1,13 @@ package gregtech.api.interfaces; public interface ICondition<O> { + boolean isTrue(O aObject); // Utility Classes for adding relations between Conditions. class Not<O> implements ICondition<O> { + private final ICondition<O> mCondition; public Not(ICondition<O> aCondition) { @@ -19,6 +21,7 @@ public interface ICondition<O> { } class Or<O> implements ICondition<O> { + private final ICondition<O>[] mConditions; public Or(ICondition<O>... aConditions) { @@ -33,6 +36,7 @@ public interface ICondition<O> { } class Nor<O> implements ICondition<O> { + private final ICondition<O>[] mConditions; public Nor(ICondition<O>... aConditions) { @@ -47,6 +51,7 @@ public interface ICondition<O> { } class And<O> implements ICondition<O> { + private final ICondition<O>[] mConditions; public And(ICondition<O>... aConditions) { @@ -61,6 +66,7 @@ public interface ICondition<O> { } class Nand<O> implements ICondition<O> { + private final ICondition<O>[] mConditions; public Nand(ICondition<O>... aConditions) { @@ -75,6 +81,7 @@ public interface ICondition<O> { } class Xor<O> implements ICondition<O> { + private final ICondition<O> mCondition1, mCondition2; public Xor(ICondition<O> aCondition1, ICondition<O> aCondition2) { @@ -89,6 +96,7 @@ public interface ICondition<O> { } class Equal<O> implements ICondition<O> { + private final ICondition<O> mCondition1, mCondition2; public Equal(ICondition<O> aCondition1, ICondition<O> aCondition2) { diff --git a/src/main/java/gregtech/api/interfaces/IConfigurationCircuitSupport.java b/src/main/java/gregtech/api/interfaces/IConfigurationCircuitSupport.java index b2d32b2fc4..6ec9f68a8b 100644 --- a/src/main/java/gregtech/api/interfaces/IConfigurationCircuitSupport.java +++ b/src/main/java/gregtech/api/interfaces/IConfigurationCircuitSupport.java @@ -1,14 +1,17 @@ package gregtech.api.interfaces; -import gregtech.api.GregTech_API; import java.util.List; + import net.minecraft.item.ItemStack; +import gregtech.api.GregTech_API; + /** - * Implement this interface if your tileentity (or metatileentity) supports configuration circuits - * to resolve recipe conflicts. + * Implement this interface if your tileentity (or metatileentity) supports configuration circuits to resolve recipe + * conflicts. */ public interface IConfigurationCircuitSupport { + /** * * @return Integrated circuit slot index in the machine inventory diff --git a/src/main/java/gregtech/api/interfaces/IDamagableItem.java b/src/main/java/gregtech/api/interfaces/IDamagableItem.java index b360556aa3..5f0d53b577 100644 --- a/src/main/java/gregtech/api/interfaces/IDamagableItem.java +++ b/src/main/java/gregtech/api/interfaces/IDamagableItem.java @@ -3,5 +3,6 @@ package gregtech.api.interfaces; import net.minecraft.item.ItemStack; public interface IDamagableItem { + boolean doDamageToItem(ItemStack aStack, int aVanillaDamage); } diff --git a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java index 063f713fe4..9c6ab660bd 100644 --- a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java +++ b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java @@ -1,25 +1,23 @@ package gregtech.api.interfaces; 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. */ public interface IDebugableBlock { + /** - * Returns a Debug Message, for a generic DebugItem - * Blocks have to implement this interface NOT TileEntities! + * Returns a Debug Message, for a generic DebugItem Blocks have to implement this interface NOT TileEntities! * * @param aPlayer the Player, who rightclicked with his Debug Item * @param aX Block-Coordinate * @param aY Block-Coordinate * @param aZ Block-Coordinate - * @param aLogLevel the Log Level of the Debug Item. - * 0 = Obvious - * 1 = Visible for the regular Scanner - * 2 = Only visible to more advanced Scanners - * 3 = Debug ONLY + * @param aLogLevel the Log Level of the Debug Item. 0 = Obvious 1 = Visible for the regular Scanner 2 = Only + * visible to more advanced Scanners 3 = Debug ONLY * @return a String-Array containing the DebugInfo, every Index is a separate line (0 = first Line) */ ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel); diff --git a/src/main/java/gregtech/api/interfaces/IDescribable.java b/src/main/java/gregtech/api/interfaces/IDescribable.java index 3e72f587db..21bb520482 100644 --- a/src/main/java/gregtech/api/interfaces/IDescribable.java +++ b/src/main/java/gregtech/api/interfaces/IDescribable.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces; * To get simple things like a ToolTip Description */ public interface IDescribable { + /** * The Tooltip Text */ diff --git a/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java b/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java index 53b3a2b059..3527b2e60d 100644 --- a/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java +++ b/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java @@ -1,14 +1,16 @@ package gregtech.api.interfaces; +import java.util.Collections; +import java.util.List; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; + import codechicken.nei.NEIClientUtils; import codechicken.nei.VisiblityData; import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; import cpw.mods.fml.common.Optional; -import java.util.Collections; -import java.util.List; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.ItemStack; /** * Implement this interface if your GuiContainer supports Drag-And-Drop behavior on NEI. @@ -17,19 +19,21 @@ import net.minecraft.item.ItemStack; public interface IDragAndDropSupport extends INEIGuiHandler { /** - * Implement this to handle Drag-And-Drop behavior. - * This may be invoked on normal click too ({@code isGhost==false}), so be careful - * if your slot supports both Drag-And-Drop and other behaviors e.g. fluid I/O with FluidDisplay click - * @param gui Current gui instance. Make sure to check if it is an instance of your GuiContainer. - * @param mousex X position of the mouse - * @param mousey Y position of the mouse + * Implement this to handle Drag-And-Drop behavior. This may be invoked on normal click too + * ({@code isGhost==false}), so be careful if your slot supports both Drag-And-Drop and other behaviors e.g. fluid + * I/O with FluidDisplay click + * + * @param gui Current gui instance. Make sure to check if it is an instance of your GuiContainer. + * @param mousex X position of the mouse + * @param mousey Y position of the mouse * @param draggedStack ItemStack user is holding on cursor - * @param button 0 = left click, 1 = right click - * @param isGhost Whether {@code draggedStack} is dragged from ItemPanel/BookmarkPanel, or actual item player holds + * @param button 0 = left click, 1 = right click + * @param isGhost Whether {@code draggedStack} is dragged from ItemPanel/BookmarkPanel, or actual item player + * holds * @return True if success */ - boolean handleDragAndDropGT( - GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button, boolean isGhost); + boolean handleDragAndDropGT(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button, + boolean isGhost); default boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) { return handleDragAndDropGT(gui, mousex, mousey, draggedStack, button, NEIClientUtils.getHeldItem() == null); diff --git a/src/main/java/gregtech/api/interfaces/IFoodStat.java b/src/main/java/gregtech/api/interfaces/IFoodStat.java index 4f4c696e12..c768c5ca1c 100644 --- a/src/main/java/gregtech/api/interfaces/IFoodStat.java +++ b/src/main/java/gregtech/api/interfaces/IFoodStat.java @@ -1,11 +1,13 @@ package gregtech.api.interfaces; -import gregtech.api.items.GT_MetaBase_Item; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; +import gregtech.api.items.GT_MetaBase_Item; + public interface IFoodStat { + /** * Warning the "aPlayer" Parameter may be null! */ diff --git a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java b/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java index 91ada956bf..29b32b5d3b 100644 --- a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java +++ b/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java @@ -2,11 +2,13 @@ package gregtech.api.interfaces; import static gregtech.common.misc.GlobalVariableStorage.*; -import gregtech.common.misc.GlobalEnergyWorldSavedData; import java.math.BigInteger; import java.util.UUID; + import net.minecraft.entity.player.EntityPlayer; +import gregtech.common.misc.GlobalEnergyWorldSavedData; + // 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 // multi-blocks directly into the users network. diff --git a/src/main/java/gregtech/api/interfaces/IGuiIcon.java b/src/main/java/gregtech/api/interfaces/IGuiIcon.java index 3204c35b4e..0bc7408250 100644 --- a/src/main/java/gregtech/api/interfaces/IGuiIcon.java +++ b/src/main/java/gregtech/api/interfaces/IGuiIcon.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces; * To allow addons to make use of GT_GuiIcon */ public interface IGuiIcon { + int getX(); int getY(); diff --git a/src/main/java/gregtech/api/interfaces/IGuiScreen.java b/src/main/java/gregtech/api/interfaces/IGuiScreen.java index 2f12781a77..c33838fc7f 100644 --- a/src/main/java/gregtech/api/interfaces/IGuiScreen.java +++ b/src/main/java/gregtech/api/interfaces/IGuiScreen.java @@ -1,13 +1,15 @@ package gregtech.api.interfaces; -import gregtech.api.gui.widgets.GT_GuiTooltip; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.entity.RenderItem; +import gregtech.api.gui.widgets.GT_GuiTooltip; + public interface IGuiScreen { interface IGuiElement { + void onInit(); default void onRemoved() {} diff --git a/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java b/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java index dc844b8a85..59bac8296b 100644 --- a/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java +++ b/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java @@ -1,5 +1,6 @@ package gregtech.api.interfaces; public interface IHasFluidDisplayItem { + void updateFluidDisplayItem(); } diff --git a/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java b/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java index 7401d35323..ed31984b6e 100644 --- a/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java +++ b/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java @@ -4,10 +4,12 @@ package gregtech.api.interfaces; * To be implemented on blocks. Usually machine casing blocks. */ public interface IHasIndexedTexture { + /** * Returns the statically mapped texture for this casing. Return * {@link gregtech.api.enums.Textures.BlockIcons#ERROR_TEXTURE_INDEX} if meta maps to a nonexistent block, or the * block does not have a statically mapped texture. + * * @param aMeta block meta * @return texture index into {@link gregtech.api.enums.Textures.BlockIcons#casingTexturePages} */ diff --git a/src/main/java/gregtech/api/interfaces/IHatchElement.java b/src/main/java/gregtech/api/interfaces/IHatchElement.java index 276a7a1a9c..254d9562c2 100644 --- a/src/main/java/gregtech/api/interfaces/IHatchElement.java +++ b/src/main/java/gregtech/api/interfaces/IHatchElement.java @@ -1,19 +1,23 @@ package gregtech.api.interfaces; -import com.google.common.collect.ImmutableList; -import com.gtnewhorizon.structurelib.structure.IStructureElement; -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; import java.util.function.BiPredicate; import java.util.function.ToLongFunction; + import net.minecraftforge.common.util.ForgeDirection; +import com.google.common.collect.ImmutableList; +import com.gtnewhorizon.structurelib.structure.IStructureElement; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_StructureUtility; +import gregtech.api.util.IGT_HatchAdder; + public interface IHatchElement<T> { + List<? extends Class<? extends IMetaTileEntity>> mteClasses(); IGT_HatchAdder<? super T> adder(); @@ -55,35 +59,21 @@ 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(); + return GT_StructureUtility.<T2>buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) + .continueIfSuccess().build(); } default <T2 extends T> IStructureElement<T2> newAny(int aCasingIndex, int aDot, ForgeDirection... allowedFacings) { if (aCasingIndex < 0 || aDot < 0) throw new IllegalArgumentException(); - return GT_StructureUtility.<T2>buildHatchAdder() - .anyOf(this) - .casingIndex(aCasingIndex) - .dot(aDot) - .continueIfSuccess() - .allowOnly(allowedFacings) - .build(); + return GT_StructureUtility.<T2>buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) + .continueIfSuccess().allowOnly(allowedFacings).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(); + return GT_StructureUtility.<T2>buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) + .shouldSkip(aShouldSkip).continueIfSuccess().build(); } default <T2 extends T> IHatchElement<T2> or(IHatchElement<? super T2> fallback) { @@ -92,6 +82,7 @@ public interface IHatchElement<T> { } class HatchElementEither<T> implements IHatchElement<T> { + private final IHatchElement<? super T> first, second; private ImmutableList<? extends Class<? extends IMetaTileEntity>> mMteClasses; private String name; @@ -103,11 +94,8 @@ class HatchElementEither<T> implements IHatchElement<T> { @Override public List<? extends Class<? extends IMetaTileEntity>> mteClasses() { - if (mMteClasses == null) - mMteClasses = ImmutableList.<Class<? extends IMetaTileEntity>>builder() - .addAll(first.mteClasses()) - .addAll(second.mteClasses()) - .build(); + if (mMteClasses == null) mMteClasses = ImmutableList.<Class<? extends IMetaTileEntity>>builder() + .addAll(first.mteClasses()).addAll(second.mteClasses()).build(); return mMteClasses; } @@ -129,18 +117,15 @@ class HatchElementEither<T> implements IHatchElement<T> { } class HatchElement<T> implements IHatchElement<T> { + private final List<Class<? extends IMetaTileEntity>> mClasses; private final IGT_HatchAdder<? super T> mAdder; private final String mName; 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 f30145165b..37f7969d56 100644 --- a/src/main/java/gregtech/api/interfaces/IHeatingCoil.java +++ b/src/main/java/gregtech/api/interfaces/IHeatingCoil.java @@ -1,9 +1,11 @@ package gregtech.api.interfaces; -import gregtech.api.enums.HeatingCoilLevel; import java.util.function.Consumer; + import net.minecraft.item.ItemStack; +import gregtech.api.enums.HeatingCoilLevel; + public interface IHeatingCoil { HeatingCoilLevel getCoilHeat(int meta); diff --git a/src/main/java/gregtech/api/interfaces/IIconContainer.java b/src/main/java/gregtech/api/interfaces/IIconContainer.java index 8090ce7cb9..fbb9e53519 100644 --- a/src/main/java/gregtech/api/interfaces/IIconContainer.java +++ b/src/main/java/gregtech/api/interfaces/IIconContainer.java @@ -2,12 +2,14 @@ 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 cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public interface IIconContainer { + /** * @return A regular Icon. */ @@ -26,8 +28,7 @@ public interface IIconContainer { @SideOnly(Side.CLIENT) default int getIconPasses() { return 1; - } - ; + }; /** * @return the Default Texture File for this Icon. diff --git a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java index 9a513c2af5..33e5db783a 100644 --- a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java +++ b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java @@ -1,8 +1,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; @@ -12,34 +11,18 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import gregtech.api.enums.SubTag; +import gregtech.api.items.GT_MetaBase_Item; + 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); @@ -55,9 +38,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/IItemContainer.java b/src/main/java/gregtech/api/interfaces/IItemContainer.java index 36363b8da1..de94606e95 100644 --- a/src/main/java/gregtech/api/interfaces/IItemContainer.java +++ b/src/main/java/gregtech/api/interfaces/IItemContainer.java @@ -5,6 +5,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public interface IItemContainer { + Item getItem(); Block getBlock(); diff --git a/src/main/java/gregtech/api/interfaces/IMaterialHandler.java b/src/main/java/gregtech/api/interfaces/IMaterialHandler.java index 9ca97981bf..b26951121b 100644 --- a/src/main/java/gregtech/api/interfaces/IMaterialHandler.java +++ b/src/main/java/gregtech/api/interfaces/IMaterialHandler.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces; import gregtech.api.enums.Materials; public interface IMaterialHandler { + void onMaterialsInit(); void onComponentInit(); diff --git a/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java b/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java index de251017a1..b7e7b0ce33 100644 --- a/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java +++ b/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java @@ -5,19 +5,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; /** - * Together with {@link gregtech.api.net.GT_Packet_UpdateItem} you can request server side to update item in hand with - * a NBT tag. + * Together with {@link gregtech.api.net.GT_Packet_UpdateItem} you can request server side to update item in hand with a + * NBT tag. * * Usual NBT tag size limit applies. */ public interface INetworkUpdatableItem { + /** * Receive update from client. Runs on server thread. - * @param stack Stack being updated + * + * @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) + * @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/IOreRecipeRegistrator.java b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java index 322586dc90..714342ae7e 100644 --- a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java +++ b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java @@ -1,12 +1,15 @@ package gregtech.api.interfaces; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import net.minecraft.item.ItemStack; public interface IOreRecipeRegistrator { + /** - * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before. + * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did + * before. * * @param aPrefix always != null * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! diff --git a/src/main/java/gregtech/api/interfaces/IProjectileItem.java b/src/main/java/gregtech/api/interfaces/IProjectileItem.java index 9441e2991b..a1cfb7f4d1 100644 --- a/src/main/java/gregtech/api/interfaces/IProjectileItem.java +++ b/src/main/java/gregtech/api/interfaces/IProjectileItem.java @@ -1,25 +1,29 @@ package gregtech.api.interfaces; -import gregtech.api.enums.SubTag; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import gregtech.api.enums.SubTag; + public interface IProjectileItem { + /** * @return if this Item has an Arrow Entity */ boolean hasProjectile(SubTag aProjectileType, ItemStack aStack); /** - * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow + * @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, double aX, double aY, double aZ); /** - * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow + * @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/IRedstoneCircuitBlock.java b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java index 73a81cc74b..91219368b7 100644 --- a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java +++ b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java @@ -1,14 +1,16 @@ package gregtech.api.interfaces; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.util.GT_CoverBehavior; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; + /** * Implemented by the MetaTileEntity of the Redstone Circuit Block */ public interface IRedstoneCircuitBlock { + /** * The Output Direction the Circuit Block is Facing */ @@ -20,8 +22,8 @@ public interface IRedstoneCircuitBlock { boolean setRedstone(byte aStrength, byte aSide); /** - * returns Output Redstone State at Side - * Note that setRedstone checks if there is a Difference between the old and the new Setting before consuming any Energy + * returns Output Redstone State at Side Note that setRedstone checks if there is a Difference between the old and + * the new Setting before consuming any Energy */ byte getOutputRedstone(byte aSide); diff --git a/src/main/java/gregtech/api/interfaces/ISecondaryDescribable.java b/src/main/java/gregtech/api/interfaces/ISecondaryDescribable.java index 9c3c9ed219..1f480091fc 100644 --- a/src/main/java/gregtech/api/interfaces/ISecondaryDescribable.java +++ b/src/main/java/gregtech/api/interfaces/ISecondaryDescribable.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces; * To get a tooltip with a secondary description */ public interface ISecondaryDescribable extends IDescribable { + /** * Convenient to call when overriding the `String[] getDescription()` method. */ diff --git a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java index e067579a1d..3e3690c67b 100644 --- a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java +++ b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces; import gregtech.api.enums.SubTag; public interface ISubTagContainer { + /** * @return if the Tag is inside the List. */ diff --git a/src/main/java/gregtech/api/interfaces/ITexture.java b/src/main/java/gregtech/api/interfaces/ITexture.java index e2445a8204..e97fa4539a 100644 --- a/src/main/java/gregtech/api/interfaces/ITexture.java +++ b/src/main/java/gregtech/api/interfaces/ITexture.java @@ -5,6 +5,7 @@ import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; public interface ITexture { + void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); @@ -28,10 +29,11 @@ public interface ITexture { /** * Will initialize the {@link Tessellator} if rendering off-world (Inventory) + * * @param aRenderer The {@link RenderBlocks} Renderer - * @param aNormalX The X Normal for current Quad Face - * @param aNormalY The Y Normal for current Quad Face - * @param aNormalZ The Z Normal for current Quad Face + * @param aNormalX The X Normal for current Quad Face + * @param aNormalY The Y Normal for current Quad Face + * @param aNormalZ The Z Normal for current Quad Face */ default void startDrawingQuads(RenderBlocks aRenderer, float aNormalX, float aNormalY, float aNormalZ) { if (aRenderer.useInventoryTint && !isOldTexture()) { @@ -42,6 +44,7 @@ public interface ITexture { /** * Will run the {@link Tessellator} to draw Quads if rendering off-world (Inventory) + * * @param aRenderer The {@link RenderBlocks} Renderer */ default void draw(RenderBlocks aRenderer) { diff --git a/src/main/java/gregtech/api/interfaces/ITextureBuilder.java b/src/main/java/gregtech/api/interfaces/ITextureBuilder.java index d8ae592c9e..95c7639477 100644 --- a/src/main/java/gregtech/api/interfaces/ITextureBuilder.java +++ b/src/main/java/gregtech/api/interfaces/ITextureBuilder.java @@ -1,15 +1,21 @@ package gregtech.api.interfaces; -import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; -import gregtech.api.render.TextureFactory; import net.minecraft.block.Block; import net.minecraftforge.common.util.ForgeDirection; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; +import gregtech.api.render.TextureFactory; + /** - * <p>This Interface defines operations to configure and build instances of the {@link ITexture} implementations</p> - * <p>Use the {@link TextureFactory#builder()} method to get an instance of the {@link ITextureBuilder} implementation.</p> + * <p> + * This Interface defines operations to configure and build instances of the {@link ITexture} implementations + * </p> + * <p> + * Use the {@link TextureFactory#builder()} method to get an instance of the {@link ITextureBuilder} implementation. + * </p> */ public interface ITextureBuilder { + /** * Build the {@link ITexture} * @@ -20,14 +26,19 @@ public interface ITextureBuilder { /** * @param block The {@link Block} - * @param meta The meta value for the Block + * @param meta The meta value for the Block * @return {@link ITextureBuilder} for chaining */ ITextureBuilder setFromBlock(final Block block, final int meta); /** - * @param side <p>The {@link ForgeDirection} side providing the texture</p> - * <p>Default is {@link ForgeDirection#UNKNOWN} to use same side as rendered</p> + * @param side + * <p> + * The {@link ForgeDirection} side providing the texture + * </p> + * <p> + * Default is {@link ForgeDirection#UNKNOWN} to use same side as rendered + * </p> * @return {@link ITextureBuilder} for chaining */ ITextureBuilder setFromSide(final ForgeDirection side); @@ -52,6 +63,7 @@ public interface ITextureBuilder { /** * Set alpha blending + * * @param allowAlpha to set * * @return {@link ITextureBuilder} for chaining diff --git a/src/main/java/gregtech/api/interfaces/IToolStats.java b/src/main/java/gregtech/api/interfaces/IToolStats.java index 9dcfc4bce8..91c8564a51 100644 --- a/src/main/java/gregtech/api/interfaces/IToolStats.java +++ b/src/main/java/gregtech/api/interfaces/IToolStats.java @@ -1,7 +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; @@ -12,12 +12,15 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.event.world.BlockEvent; +import gregtech.api.items.GT_MetaGenerated_Tool; + /** * The Stats for GT Tools. Not including any Material Modifiers. * <p/> * And this is supposed to not have any ItemStack Parameters as these are generic Stats. */ public interface IToolStats { + /** * Called when aPlayer crafts this Tool */ @@ -39,7 +42,8 @@ public interface IToolStats { int getToolDamagePerDropConversion(); /** - * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times more than normal. + * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times + * more than normal. */ int getToolDamagePerContainerCraft(); @@ -49,7 +53,8 @@ public interface IToolStats { int getToolDamagePerEntityAttack(); /** - * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools of this Type. Decreasing is also possible. + * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools + * of this Type. Decreasing is also possible. */ int getBaseQuality(); @@ -122,7 +127,8 @@ public interface IToolStats { boolean isWeapon(); /** - * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your Bow/Gun or something + * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your + * Bow/Gun or something */ boolean isRangedWeapon(); @@ -132,10 +138,12 @@ public interface IToolStats { boolean isMiningTool(); /** - * aBlock.getHarvestTool(aMetaData) can return the following Values for example. - * "axe", "pickaxe", "sword", "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch" + * aBlock.getHarvestTool(aMetaData) can return the following Values for example. "axe", "pickaxe", "sword", + * "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", + * "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch" * - * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this check. + * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this + * check. */ boolean isMinableBlock(Block aBlock, byte aMetaData); @@ -144,18 +152,8 @@ 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. @@ -176,6 +174,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/covers/IControlsWorkCover.java b/src/main/java/gregtech/api/interfaces/covers/IControlsWorkCover.java index 47edc7af93..cef20ac3b7 100644 --- a/src/main/java/gregtech/api/interfaces/covers/IControlsWorkCover.java +++ b/src/main/java/gregtech/api/interfaces/covers/IControlsWorkCover.java @@ -11,8 +11,8 @@ import gregtech.api.interfaces.tileentity.IMachineProgress; public interface IControlsWorkCover { /** - * Make sure there is only one GT_Cover_ControlsWork on the aTileEntity - * TODO this is a migration thing. Remove this after 2.3.0 is released. + * Make sure there is only one GT_Cover_ControlsWork on the aTileEntity TODO this is a migration thing. Remove this + * after 2.3.0 is released. * * @return true if the cover is the first (side) one **/ diff --git a/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java b/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java index a643b8aace..00bfd6dbe8 100644 --- a/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java +++ b/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java @@ -1,14 +1,17 @@ package gregtech.api.interfaces.fluid; -import gregtech.api.enums.FluidState; import javax.annotation.Nonnull; + import net.minecraft.block.Block; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; +import gregtech.api.enums.FluidState; + @SuppressWarnings("unused") // API might legitimately expose unused methods within this local project's scope public interface IGT_FluidBuilder { + /** * @param colorRGBA The {@code short[]} RGBA color of the {@link Fluid} or {@code null} for no defined RGBA color * @return {@link IGT_FluidBuilder} self for call chaining @@ -72,8 +75,8 @@ public interface IGT_FluidBuilder { * @return {@link IGT_FluidBuilder} self for call chaining */ @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value - IGT_FluidBuilder withTextures( - final ResourceLocation stillIconResourceLocation, final ResourceLocation flowingIconResourceLocation); + IGT_FluidBuilder withTextures(final ResourceLocation stillIconResourceLocation, + final ResourceLocation flowingIconResourceLocation); /** * Builds the {@link IGT_Fluid} diff --git a/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java b/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java index f4d278e2b0..e7c220607a 100644 --- a/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java +++ b/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java @@ -1,11 +1,12 @@ package gregtech.api.interfaces.fluid; -import gregtech.api.enums.FluidState; -import gregtech.api.enums.Materials; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; +import gregtech.api.enums.FluidState; +import gregtech.api.enums.Materials; + public interface IGT_RegisteredFluid { /** @@ -17,11 +18,12 @@ public interface IGT_RegisteredFluid { * @return The {@link IGT_RegisteredFluid} for call chaining */ @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value - IGT_RegisteredFluid registerContainers( - final ItemStack fullContainer, final ItemStack emptyContainer, final int containerSize); + IGT_RegisteredFluid registerContainers(final ItemStack fullContainer, final ItemStack emptyContainer, + final int containerSize); /** - * Registers the bucket-sized 1000L containers in the {@link FluidContainerRegistry} for this {@link IGT_RegisteredFluid} + * Registers the bucket-sized 1000L containers in the {@link FluidContainerRegistry} for this + * {@link IGT_RegisteredFluid} * * @param fullContainer The full container to associate with this {@link IGT_RegisteredFluid} * @param emptyContainer The empty container associate with this {@link IGT_RegisteredFluid} @@ -31,7 +33,8 @@ public interface IGT_RegisteredFluid { IGT_RegisteredFluid registerBContainers(final ItemStack fullContainer, final ItemStack emptyContainer); /** - * Registers the potion-sized 250L containers in the {@link FluidContainerRegistry} for this {@link IGT_RegisteredFluid} + * Registers the potion-sized 250L containers in the {@link FluidContainerRegistry} for this + * {@link IGT_RegisteredFluid} * * @param fullContainer The full container to associate with this {@link IGT_RegisteredFluid} * @param emptyContainer The empty container associate with this {@link IGT_RegisteredFluid} @@ -43,7 +46,8 @@ public interface IGT_RegisteredFluid { /** * Updates the {@link Materials}'s fluids from this {@link IGT_RegisteredFluid}'s state * - * @param material the {@link Materials} to configure based on this {@link IGT_RegisteredFluid} and {@link FluidState} + * @param material the {@link Materials} to configure based on this {@link IGT_RegisteredFluid} and + * {@link FluidState} * @return The {@link IGT_RegisteredFluid} for call chaining */ @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value diff --git a/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java b/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java index dd73ffc1e7..4acfa62549 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java @@ -3,6 +3,6 @@ package gregtech.api.interfaces.internal; /** * A simple compound Interface for generic BuildCraft Code. */ -public interface IBCTileEntity /*extends IPowerReceptor*/ { +public interface IBCTileEntity /* extends IPowerReceptor */ { // } diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java b/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java index 0bb4155214..3f29736470 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java @@ -3,5 +3,6 @@ package gregtech.api.interfaces.internal; import net.minecraft.item.crafting.IRecipe; public interface IGT_CraftingRecipe extends IRecipe { + boolean isRemovable(); } 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 19e7a56aad..dbf888ef96 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java @@ -10,18 +10,22 @@ import net.minecraft.world.World; * Don't even think about including this File in your Mod. */ public interface IGT_Mod { + /** - * This means that Server specific Basefiles are definitely existing! Not if the World is actually server side or not! + * This means that Server specific Basefiles are definitely existing! Not if the World is actually server side or + * not! */ boolean isServerSide(); /** - * This means that Client specific Basefiles are definitely existing! Not if the World is actually client side or not! + * This means that Client specific Basefiles are definitely existing! Not if the World is actually client side or + * not! */ boolean isClientSide(); /** - * This means that Bukkit specific Basefiles are definitely existing! Not if the World is actually bukkit server or not! + * This means that Bukkit specific Basefiles are definitely existing! Not if the World is actually bukkit server or + * not! */ boolean isBukkitSide(); 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 77e6bd6742..342d3a5403 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -1,23 +1,19 @@ package gregtech.api.interfaces.internal; -import gregtech.api.util.GT_Recipe; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.util.GT_Recipe; + public interface IGT_RecipeAdder { + /** - * Adds a FusionreactorRecipe - * Does not work anymore! + * Adds a FusionreactorRecipe 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 @@ -31,13 +27,8 @@ public interface IGT_RecipeAdder { * @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 @@ -49,45 +40,24 @@ 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 * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @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); + * @param aInput1 must be != null + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @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); /** * Adds a Centrifuge Recipe @@ -99,36 +69,13 @@ 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 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 aCleanroom); /** * @param aInput1 must be != null @@ -141,51 +88,31 @@ public interface IGT_RecipeAdder { /** * Adds a Electrolyzer Recipe * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @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); + * @param aInput1 must be != null + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @param aOutput4 can be null + * @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); /** * Adds a Electrolyzer Recipe * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @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); + * @param aInput1 must be != null + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @param aOutput4 can be null + * @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); /** * Adds a Chemical Recipe @@ -207,54 +134,36 @@ 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 - * Only use this when the recipe conflicts in MultiBlock! + * Adds a Chemical Recipe Only use this when the recipe conflicts in MultiBlock! * * @param aInput1 must be != null * @param aInput2 must be != null - * @param aOutput must be != null + * @param aOutput must be != null * @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 * * @param aInput1 must be != null * @param aInput2 must be != null - * @param aOutput must be != null + * @param aOutput must be != null * @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) + * Adds Recipes for creating a radically polymerized polymer from a base Material (for example Ethylene -> + * Polyethylene) * * @param aBasicMaterial The basic Material * @param aBasicMaterialCell The corresponding Cell basic Material @@ -267,70 +176,44 @@ public interface IGT_RecipeAdder { * * @param aInput1 must be != null * @param aInput2 must be != null - * @param aOutput must be != null + * @param aOutput must be != null * @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 * * @param aInput1 must be != null * @param aInput2 must be != null - * @param aOutput must be != null + * @param aOutput must be != null * @param aOutput2 must be != null * @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 * - * @param aInputs item inputs - * @param aFluidInputs fluid inputs + * @param aInputs item inputs + * @param aFluidInputs fluid inputs * @param aFluidOutputs fluid outputs - * @param aOutputs item outputs - * @param aDuration must be > 0 - * @param aEUtick must be > 0 - * <br>aInputs and aFluidInputs must contain at least one valid input. - * <br>aOutputs and aFluidOutputs must contain at least one valid output. + * @param aOutputs item outputs + * @param aDuration must be > 0 + * @param aEUtick must be > 0 <br> + * aInputs and aFluidInputs must contain at least one valid input. <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 @@ -344,14 +227,8 @@ 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 @@ -364,59 +241,29 @@ 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 * - * @param ItemInputArray Array of input items. - * @param FluidInputArray Array of output items. - * @param OutputItemArray Array of input fluids. - * @param FluidOutputArray Array of output items. - * @param aDuration Must be > 0. Duration in ticks. - * @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); + * @param ItemInputArray Array of input items. + * @param FluidInputArray Array of output items. + * @param OutputItemArray Array of input fluids. + * @param FluidOutputArray Array of output items. + * @param aDuration Must be > 0. Duration in ticks. + * @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); /** * Adds a Canning Machine Recipe @@ -426,8 +273,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 @@ -440,8 +287,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 @@ -473,8 +320,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 @@ -484,42 +331,19 @@ 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, 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 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[] 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 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 addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom); /** @@ -531,16 +355,11 @@ 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 @@ -551,30 +370,17 @@ 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 * - * @param aInputs elements should be: ItemStack for single item; - * ItemStack[] for multiple equivalent items; + * @param aInputs elements should be: ItemStack for single item; 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 @@ -587,13 +393,8 @@ public interface IGT_RecipeAdder { boolean addForgeHammerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); // Allows fluids as well as multiple items. - boolean addForgeHammerRecipe( - ItemStack[] ItemInputArray, - FluidStack[] FluidInputArray, - ItemStack[] ItemOutputArray, - FluidStack[] FluidOutputArray, - int aDuration, - int aEUt); + boolean addForgeHammerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] ItemOutputArray, + FluidStack[] FluidOutputArray, int aDuration, int aEUt); /** * Adds a Wiremill Recipe @@ -659,24 +460,11 @@ 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 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[] aChances, int aDuration, int aEUt); /** * Adds an Implosion Compressor Recipe @@ -698,13 +486,8 @@ 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 @@ -713,44 +496,26 @@ 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, + 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 @@ -760,28 +525,22 @@ 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); @@ -799,23 +558,17 @@ 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 @@ -830,21 +583,18 @@ 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 * * @param aInput1 must be != null * @param aOutput1 can be null - * @param aEU EU per MilliBucket. If no Liquid Form of this Container is available, then it will give you EU*1000 per Item. - * @param aType 0 = Diesel; 1 = Gas Turbine; 2 = Thermal; 3 = Dense Fluid; 4 = Plasma; 5 = Magic; And if something is unclear or missing, then look at the GT_Recipe-Class + * @param aEU EU per MilliBucket. If no Liquid Form of this Container is available, then it will give you + * EU*1000 per Item. + * @param aType 0 = Diesel; 1 = Gas Turbine; 2 = Thermal; 3 = Dense Fluid; 4 = Plasma; 5 = Magic; And if + * something is unclear or missing, then look at the GT_Recipe-Class */ boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType); @@ -858,11 +608,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 @@ -877,33 +627,22 @@ public interface IGT_RecipeAdder { boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aOutput, int aDuration, int aEUt); boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt); + /** * Adds a Recipe for the Distillery */ - boolean addDistilleryRecipe( - ItemStack aCircuit, - FluidStack aInput, - FluidStack aOutput, - ItemStack aSolidOutput, - int aDuration, - int aEUt, + 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 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 */ @@ -912,75 +651,43 @@ 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, 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, 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 @@ -990,194 +697,93 @@ 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 addAutoclaveRecipe( - ItemStack aInput, - FluidStack aFluid, - ItemStack aOutput, - int aChance, - int aDuration, - int aEUt, - boolean aCleanroom); + 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 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 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, 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 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 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. * - * @param ItemInputArray Array of input items. - * @param FluidInputArray Array of output items. - * @param OutputItemArray Array of input fluids. - * @param FluidOutputArray Array of output items. - * @param aDuration Must be > 0. Duration in ticks. - * @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); + * @param ItemInputArray Array of input items. + * @param FluidInputArray Array of output items. + * @param OutputItemArray Array of input fluids. + * @param FluidOutputArray Array of output items. + * @param aDuration Must be > 0. Duration in ticks. + * @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); /** * 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); // Allows more than 2 inputs and multiple outputs boolean addFormingPressRecipe(ItemStack[] ItemInputArray, ItemStack[] OutputItemArray, int aDuration, int aEUt); @@ -1186,27 +792,22 @@ public interface IGT_RecipeAdder { * Adds a Recipe for the Sifter. (up to 9 Outputs) */ boolean addSifterRecipe(ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, int aEUt); + /** * Adds a Generalised Sifter Recipe. * - * @param ItemInputArray Array of input items. - * @param FluidInputArray Array of output items. - * @param OutputItemArray Array of input fluids. - * @param FluidOutputArray Array of output items. - * @param aChances Array of output chances. - * @param aDuration Must be > 0. Duration in ticks. - * @param aEUt Should be > 0. EU/t. - * @param aCleanroom Boolean for usage of cleanroom in recipe. - */ - boolean addSifterRecipe( - ItemStack[] ItemInputArray, - FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, - FluidStack[] FluidOutputArray, - int[] aChances, - int aDuration, - int aEUt, - boolean aCleanroom); + * @param ItemInputArray Array of input items. + * @param FluidInputArray Array of output items. + * @param OutputItemArray Array of input fluids. + * @param FluidOutputArray Array of output items. + * @param aChances Array of output chances. + * @param aDuration Must be > 0. Duration in ticks. + * @param aEUt Should be > 0. EU/t. + * @param aCleanroom Boolean for usage of cleanroom in recipe. + */ + boolean addSifterRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, + FluidStack[] FluidOutputArray, int[] aChances, int aDuration, int aEUt, boolean aCleanroom); + /** * Adds a Recipe for the Arc Furnace. (up to 4 Outputs) */ @@ -1215,8 +816,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) @@ -1226,28 +827,22 @@ 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 - * Every Fluid also gets separate distillation recipes + * Adds a Distillation Tower Recipe Every Fluid also gets separate distillation recipes * * @param aInput must be != null * @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 addUniversalDistillationRecipewithCircuit( - FluidStack aInput, - ItemStack[] aCircuit, - FluidStack[] aOutputs, - ItemStack aOutput2, - int aDuration, + 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); + /** * Adds Pyrolyse Recipe * @@ -1258,14 +853,8 @@ 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 @@ -1288,12 +877,11 @@ 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 - * you should NOT call this in the preInit-Phase! + * Adds a Sound to the Sonictron9001 you should NOT call this in the preInit-Phase! * * @param aItemStack = The Item you want to display for this Sound * @param aSoundName = The Name of the Sound in the resources/newsound-folder like Vanillasounds @@ -1301,87 +889,68 @@ 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); /** - * Add a Nano Forge Recipe. The Nano Forge's main use is to make nanites/nanorobots. - * Tier 1 Nano Forge - Can make partly biological, partly metal nanites - * TIer 2 Nano Forge - Can make mostly metal nanites with some biological aspects - * TIer 3 Nano Forge - Can make nanites entierly out of metal + * Add a Nano Forge Recipe. The Nano Forge's main use is to make nanites/nanorobots. Tier 1 Nano Forge - Can make + * partly biological, partly metal nanites TIer 2 Nano Forge - Can make mostly metal nanites with some biological + * aspects TIer 3 Nano Forge - Can make nanites entierly out of metal * - * @param aInputs = must not be null - * @param aFluidInputs = can be null - * @param aOutputs = must not be null, the nanite or other output + * @param aInputs = must not be null + * @param aFluidInputs = can be null + * @param aOutputs = must not be null, the nanite or other output * @param aFluidOutputs = can be null - * @param aChances = can be null + * @param aChances = can be null * @param aDuration * @param aEUt * @param aSpecialValue = defines the tier of nano forge required. * */ - boolean addNanoForgeRecipe( - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - ItemStack[] aOutputs, - FluidStack[] aFluidOutputs, - int[] aChances, - int aDuration, - int aEUt, - int aSpecialValue); + boolean addNanoForgeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, + FluidStack[] aFluidOutputs, int[] aChances, int aDuration, int aEUt, int aSpecialValue); /** - * Add a Board Manufacturer Recipe. The Board Manufacturer's main use is to make the circuit boards - * needed to make circuits. + * Add a Board Manufacturer Recipe. The Board Manufacturer's main use is to make the circuit boards needed to make + * circuits. * - * @param aInputs = must not be null - * @param aFluidInputs = must not be null - * @param aOutputs = must not be null + * @param aInputs = must not be null + * @param aFluidInputs = must not be null + * @param aOutputs = must not be null * @param aDuration * @param aEUt * @param aSpecialValue = defines the tier of the board manufacturer required. */ - boolean addPCBFactoryRecipe( - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - ItemStack[] aOutputs, - int aDuration, - int aEUt, - int aSpecialValue); + boolean addPCBFactoryRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, int aDuration, + int aEUt, int aSpecialValue); /** * Add a breeder cell. - * @param input raw stack. should be undamaged. - * @param output breed output + * + * @param input raw stack. should be undamaged. + * @param output breed output * @param heatMultiplier bonus progress per neutron pulse per heat step - * @param heatStep divisor for hull heat - * @param reflector true if also acts as a neutron reflector, false otherwise. + * @param heatStep divisor for hull heat + * @param reflector true if also acts as a neutron reflector, false otherwise. * @param requiredPulses progress required to complete breeding * @return added fake recipe */ - GT_Recipe addIC2ReactorBreederCell( - ItemStack input, ItemStack output, boolean reflector, int heatStep, int heatMultiplier, int requiredPulses); + GT_Recipe addIC2ReactorBreederCell(ItemStack input, ItemStack output, boolean reflector, int heatStep, + int heatMultiplier, int requiredPulses); /** * Add a fuel cell. - * @param input raw stack. should be undamaged. - * @param output depleted stack - * @param aMox true if has mox behavior, false if uranium behavior. - * @param aHeat inherent heat output multiplier of the fuel material. should not add the extra heat from being - * a multi-cell! - * @param aEnergy inherent energy output multiplier of the fuel material. should not add the extra energy from - * being a multi-cell! - * @param aCells cell count + * + * @param input raw stack. should be undamaged. + * @param output depleted stack + * @param aMox true if has mox behavior, false if uranium behavior. + * @param aHeat inherent heat output multiplier of the fuel material. should not add the extra heat from being a + * multi-cell! + * @param aEnergy inherent energy output multiplier of the fuel material. should not add the extra energy from being + * a multi-cell! + * @param aCells cell count * @return added fake recipe */ - GT_Recipe addIC2ReactorFuelCell( - ItemStack input, ItemStack output, boolean aMox, float aHeat, float aEnergy, int aCells); + GT_Recipe addIC2ReactorFuelCell(ItemStack input, ItemStack output, boolean aMox, float aHeat, float aEnergy, + int aCells); } diff --git a/src/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java b/src/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java index 7592ffbe1a..ce9b4c4282 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java @@ -6,7 +6,8 @@ import ic2.api.energy.tile.IEnergySource; import ic2.api.tile.IEnergyStorage; /** - * A simple compound Interface for generic EnergyTileEntities. I don't want to have imports of the IC2-API in my main-code + * A simple compound Interface for generic EnergyTileEntities. I don't want to have imports of the IC2-API in my + * main-code */ public interface IIC2TileEntity extends IEnergyStorage, IEnergySink, IEnergySource, IHasWorldObjectAndCoords { // diff --git a/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java b/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java index 330b9326c2..debbe928fd 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java +++ b/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java @@ -1,41 +1,29 @@ 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 gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; + public interface IThaumcraftCompat { - int RESEARCH_TYPE_NORMAL = 0, - RESEARCH_TYPE_SECONDARY = 1, - RESEARCH_TYPE_FREE = 2, - RESEARCH_TYPE_HIDDEN = 4, - RESEARCH_TYPE_VIRTUAL = 8, - RESEARCH_TYPE_ROUND = 16, - RESEARCH_TYPE_SPECIAL = 32, + + int RESEARCH_TYPE_NORMAL = 0, RESEARCH_TYPE_SECONDARY = 1, RESEARCH_TYPE_FREE = 2, RESEARCH_TYPE_HIDDEN = 4, + RESEARCH_TYPE_VIRTUAL = 8, RESEARCH_TYPE_ROUND = 16, RESEARCH_TYPE_SPECIAL = 32, RESEARCH_TYPE_AUTOUNLOCK = 64; /** * The Research Keys of GT */ - 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", - TRANSNICKEL = "GT_TRANSNICKEL", - TRANSCOBALT = "GT_TRANSCOBALT", - TRANSBISMUTH = "GT_TRANSBISMUTH", - TRANSANTIMONY = "GT_TRANSANTIMONY", - TRANSCUPRONICKEL = "GT_TRANSCUPRONICKEL", - TRANSBATTERYALLOY = "GT_TRANSBATTERYALLOY", - TRANSSOLDERINGALLOY = "GT_TRANSSOLDERINGALLOY", - TRANSBRASS = "GT_TRANSBRASS", - TRANSBRONZE = "GT_TRANSBRONZE", - TRANSINVAR = "GT_TRANSINVAR", - TRANSELECTRUM = "GT_TRANSELECTRUM", - TRANSALUMINIUM = "GT_TRANSALUMINIUM", - CRYSTALLISATION = "GT_CRYSTALLISATION", + 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", TRANSNICKEL = "GT_TRANSNICKEL", + TRANSCOBALT = "GT_TRANSCOBALT", TRANSBISMUTH = "GT_TRANSBISMUTH", TRANSANTIMONY = "GT_TRANSANTIMONY", + TRANSCUPRONICKEL = "GT_TRANSCUPRONICKEL", TRANSBATTERYALLOY = "GT_TRANSBATTERYALLOY", + TRANSSOLDERINGALLOY = "GT_TRANSSOLDERINGALLOY", TRANSBRASS = "GT_TRANSBRASS", + TRANSBRONZE = "GT_TRANSBRONZE", TRANSINVAR = "GT_TRANSINVAR", TRANSELECTRUM = "GT_TRANSELECTRUM", + TRANSALUMINIUM = "GT_TRANSALUMINIUM", CRYSTALLISATION = "GT_CRYSTALLISATION", ADVANCEDENTROPICPROCESSING = "GT_ADVANCEDENTROPICPROCESSING", // unused ADVANCEDMETALLURGY = "GT_ADVANCEDMETALLURGY"; @@ -47,26 +35,10 @@ 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 821aa35f50..7c9d487e05 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java @@ -1,5 +1,5 @@ package gregtech.api.interfaces.internal; -public interface IUETileEntity /*extends IElectrical*/ { +public interface IUETileEntity /* extends IElectrical */ { // } diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index 84c991ade9..76d8d082ef 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -4,6 +4,7 @@ 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; @@ -17,8 +18,8 @@ public interface IConnectable { int HAS_FOAM = 0b11000000; /** - * Try to connect to the Block at the specified side - * returns the connection state. Non-positive values for failed, others for succeeded. + * Try to connect to the Block at the specified side returns the connection state. Non-positive values for failed, + * others for succeeded. */ int connect(byte aSide); diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IFluidLockable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IFluidLockable.java index bac9cffba0..d7574313ac 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IFluidLockable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IFluidLockable.java @@ -5,7 +5,7 @@ import net.minecraftforge.fluids.Fluid; /** * Implement this interface if your MetaTileEntity supports fluid lock mechanism. */ -@SuppressWarnings({"BooleanMethodIsAlwaysInverted"}) +@SuppressWarnings({ "BooleanMethodIsAlwaysInverted" }) public interface IFluidLockable { /** @@ -16,8 +16,8 @@ public interface IFluidLockable { String getLockedFluidName(); /** - * Set fluid lock state. - * Would be useful when you don't necessarily want to change mode when locked fluid is changed. + * Set fluid lock state. Would be useful when you don't necessarily want to change mode when locked fluid is + * changed. */ void lockFluid(boolean lock); diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java index a1c00ebc97..fb7845cfd4 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java @@ -1,6 +1,7 @@ package gregtech.api.interfaces.metatileentity; public interface IMachineCallback<Machinetype extends IMetaTileEntity> { + Machinetype getCallbackBase(); void setCallbackBase(Machinetype callback); diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index 0d1d52edb0..66c85be547 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -1,21 +1,9 @@ package gregtech.api.interfaces.metatileentity; -import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.modularui.IGetGUITextureSet; -import gregtech.api.interfaces.tileentity.IGearEnergyTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -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 gregtech.api.util.GT_Util; 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; @@ -31,38 +19,40 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidTank; +import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Dyes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.modularui.IGetGUITextureSet; +import gregtech.api.interfaces.tileentity.IGearEnergyTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +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 gregtech.api.util.GT_Util; + /** - * Warning, this Interface has just been made to be able to add multiple kinds of MetaTileEntities (Cables, Pipes, Transformers, but not the regular Blocks) + * 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, - IGetGUITextureSet { +public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHandler, IGearEnergyTileEntity, + IMachineBlockUpdateable, IGregtechWailaProvider, IGetGUITextureSet { + /** * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. * <p/> - * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantle - * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle - * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle - * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle - * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle - * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle - * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle - * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle - * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle - * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle - * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle - * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle - * 12 = GT++ - * 13 = GT++ - * 14 = GT++ - * 15 = GT++ + * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantle 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle 2 = + * BaseMetaTileEntity, Wrench lvl 2 to dismantle 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle 4 = + * BaseMetaPipeEntity, Wrench lvl 0 to dismantle 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle 6 = + * BaseMetaPipeEntity, Wrench lvl 2 to dismantle 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle 8 = + * BaseMetaPipeEntity, Cutter lvl 0 to dismantle 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle 10 = + * BaseMetaPipeEntity, Cutter lvl 2 to dismantle 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle 12 = GT++ 13 = + * GT++ 14 = GT++ 15 = GT++ */ byte getTileEntityBaseType(); @@ -103,8 +93,8 @@ public interface IMetaTileEntity void loadNBTData(NBTTagCompound aNBT); /** - * Adds the NBT-Information to the ItemStack, when being dismanteled properly - * Used to store Machine specific Upgrade Data. + * Adds the NBT-Information to the ItemStack, when being dismanteled properly Used to store Machine specific Upgrade + * Data. */ void setItemNBT(NBTTagCompound aNBT); @@ -114,7 +104,8 @@ public interface IMetaTileEntity void onServerStart(); /** - * Called in the registered MetaTileEntity when the Server ticks a World the first time, to load things from the World Save + * Called in the registered MetaTileEntity when the Server ticks a World the first time, to load things from the + * World Save */ void onWorldLoad(File aSaveDirectory); @@ -124,14 +115,14 @@ public interface IMetaTileEntity void onWorldSave(File aSaveDirectory); /** - * Called to set Configuration values for this MetaTileEntity. - * Use aConfig.get(ConfigCategories.machineconfig, "MetaTileEntityName.Ability", DEFAULT_VALUE); to set the Values. + * Called to set Configuration values for this MetaTileEntity. Use aConfig.get(ConfigCategories.machineconfig, + * "MetaTileEntityName.Ability", DEFAULT_VALUE); to set the Values. */ void onConfigLoad(GT_Config aConfig); /** - * If a Cover of that Type can be placed on this Side. - * Also Called when the Facing of the Block Changes and a Cover is on said Side. + * If a Cover of that Type can be placed on this Side. Also Called when the Facing of the Block Changes and a Cover + * is on said Side. */ boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack); @@ -153,8 +144,8 @@ public interface IMetaTileEntity /** * 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 @@ -167,21 +158,19 @@ public interface IMetaTileEntity void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity); /** - * The Tick before all the generic handling happens, what gives a slightly faster reaction speed. - * Don't use this if you really don't need to. @onPostTick is better suited for ticks. - * This happens still after the Cover handling. + * The Tick before all the generic handling happens, what gives a slightly faster reaction speed. Don't use this if + * you really don't need to. @onPostTick is better suited for ticks. This happens still after the Cover handling. */ void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick); /** - * The Tick after all the generic handling happened. - * Recommended to use this like updateEntity. + * The Tick after all the generic handling happened. Recommended to use this like updateEntity. */ void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick); /** - * Called when this MetaTileEntity gets (intentionally) disconnected from the BaseMetaTileEntity. - * Doesn't get called when this thing is moved by Frames or similar hacks. + * Called when this MetaTileEntity gets (intentionally) disconnected from the BaseMetaTileEntity. Doesn't get called + * when this thing is moved by Frames or similar hacks. */ void inValidate(); @@ -232,11 +221,13 @@ public interface IMetaTileEntity boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack); /** - * @return if aIndex is a valid Slot. false for things like HoloSlots. Is used for determining if an Item is dropped upon Block destruction and for Inventory Access Management + * @return if aIndex is a valid Slot. false for things like HoloSlots. Is used for determining if an Item is dropped + * upon Block destruction and for Inventory Access Management */ boolean isValidSlot(int aIndex); - /** Check if the item at the specified index should be dropped + /** + * Check if the item at the specified index should be dropped * * @param index Index that will be checked * @return True if the item at the index should be dropped, else false @@ -269,17 +260,15 @@ public interface IMetaTileEntity boolean isAccessAllowed(EntityPlayer aPlayer); /** - * a Player rightclicks the Machine - * Sneaky rightclicks are not getting passed to this! + * a Player rightclicks the Machine Sneaky rightclicks are not getting passed to this! * * @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 - * Sneaky leftclicks are getting passed to this unlike with the rightclicks. + * a Player leftclicks the Machine Sneaky leftclicks are getting passed to this unlike with the rightclicks. */ void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer); @@ -289,11 +278,12 @@ public interface IMetaTileEntity void onValueUpdate(byte aValue); /** - * return a small bit of Data, like a secondary Facing for example with this Function, for the Client. - * The BaseMetaTileEntity detects changes to this Value and will then send an Update. - * This is only for Information, which is visible as Texture to the outside. + * return a small bit of Data, like a secondary Facing for example with this Function, for the Client. The + * BaseMetaTileEntity detects changes to this Value and will then send an Update. This is only for Information, + * which is visible as Texture to the outside. * <p/> - * If you just want to have an Active/Redstone State then set the Active State inside the BaseMetaTileEntity instead. + * If you just want to have an Active/Redstone State then set the Active State inside the BaseMetaTileEntity + * instead. */ byte getUpdateData(); @@ -303,9 +293,8 @@ public interface IMetaTileEntity void receiveClientEvent(byte aEventID, byte aValue); /** - * Called to actually play the Sound. - * Do not insert Client/Server checks. That is already done for you. - * Do not use @playSoundEffect, Minecraft doesn't like that at all. Use @playSound instead. + * Called to actually play the Sound. Do not insert Client/Server checks. That is already done for you. Do not + * use @playSoundEffect, Minecraft doesn't like that at all. Use @playSound instead. */ void doSound(byte aIndex, double aX, double aY, double aZ); @@ -343,16 +332,16 @@ public interface IMetaTileEntity /** * If there should be a Lag Warning if something laggy happens during this Tick. * <p/> - * The Advanced Pump uses this to not cause the Lag Message, while it scans for all close Fluids. - * The Item Pipes and Retrievers neither send this Message, when scanning for Pipes. + * The Advanced Pump uses this to not cause the Lag Message, while it scans for all close Fluids. The Item Pipes and + * Retrievers neither send this Message, when scanning for Pipes. */ boolean doTickProfilingMessageDuringThisTick(); /** * 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 @@ -370,16 +359,14 @@ public interface IMetaTileEntity * @param aSide is the Side of the Block * @param aFacing is the direction the Block is facing (or a Bitmask of all Connections in case of Pipes) * @param aColorIndex The Minecraft Color the Block is having - * @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!!!) + * @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. @@ -387,8 +374,8 @@ public interface IMetaTileEntity // public ITexture[] getItemTexture(ItemStack aStack); /** - * Register Icons here. This gets called when the Icons get initialized by the Base Block - * Best is you put your Icons in a static Array for quick and easy access without relying on the MetaTileList. + * Register Icons here. This gets called when the Icons get initialized by the Base Block Best is you put your Icons + * in a static Array for quick and easy access without relying on the MetaTileList. * * @param aBlockIconRegister The Block Icon Register */ @@ -441,14 +428,8 @@ public interface IMetaTileEntity 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); @@ -466,9 +447,9 @@ public interface IMetaTileEntity boolean shouldJoinIc2Enet(); /** - * The Machine Update, which is called when the Machine needs an Update of its Parts. - * I suggest to wait 1-5 seconds before actually checking the Machine Parts. - * RP-Frames could for example cause Problems when you instacheck the Machine Parts. + * The Machine Update, which is called when the Machine needs an Update of its Parts. I suggest to wait 1-5 seconds + * before actually checking the Machine Parts. RP-Frames could for example cause Problems when you instacheck the + * Machine Parts. * * just do stuff since we are already in meta tile... */ diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java index 6b83ab4dba..62df2e713f 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java @@ -2,12 +2,14 @@ package gregtech.api.interfaces.metatileentity; 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 5375ea85ee..b60088a41b 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java @@ -2,12 +2,14 @@ package gregtech.api.interfaces.metatileentity; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import java.util.Map; + 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 { + /** * @return if this Pipe can still be used. */ @@ -36,9 +38,9 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { boolean insertItemStackIntoTileEntity(Object aSender, byte aSide); /** - * Can be used to make flow control Pipes, like Redpowers Restriction Tubes. - * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities. - * Negative Numbers to "suck" Items into a certain direction are also possible. + * Can be used to make flow control Pipes, like Redpowers Restriction Tubes. Every normal Pipe returns a Value of + * 32768, so you can easily insert lower Numbers to set Routing priorities. Negative Numbers to "suck" Items into a + * certain direction are also possible. */ int getStepSize(); @@ -46,15 +48,12 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { * Utility for the Item Network */ class Util { + /** * @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) { @@ -63,12 +62,13 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { byte oppositeSide; for (byte side : ALL_VALID_SIDES) { if (aMetaTileEntity instanceof IConnectable - && !((IConnectable) aMetaTileEntity).isConnectedAtSide(side)) continue; + && !((IConnectable) aMetaTileEntity).isConnectedAtSide(side)) + continue; oppositeSide = GT_Utility.getOppositeSide(side); if (aSuckItems) { if (aBaseMetaTileEntity.getCoverInfoAtSide(side).letsItemsIn(-2)) { - final IGregTechTileEntity tItemPipe = - aBaseMetaTileEntity.getIGregTechTileEntityAtSide(side); + final IGregTechTileEntity tItemPipe = aBaseMetaTileEntity + .getIGregTechTileEntityAtSide(side); if (aBaseMetaTileEntity.getColorization() >= 0) { final byte tColor = tItemPipe.getColorization(); if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { @@ -78,9 +78,7 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { if (tItemPipe instanceof BaseMetaPipeEntity) { final IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); if (tMetaTileEntity instanceof IMetaTileEntityItemPipe - && tItemPipe - .getCoverInfoAtSide(oppositeSide) - .letsItemsOut(-2)) { + && tItemPipe.getCoverInfoAtSide(oppositeSide).letsItemsOut(-2)) { scanPipes( (IMetaTileEntityItemPipe) tMetaTileEntity, aMap, @@ -92,8 +90,8 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { } } else { if (aBaseMetaTileEntity.getCoverInfoAtSide(side).letsItemsOut(-2)) { - final IGregTechTileEntity tItemPipe = - aBaseMetaTileEntity.getIGregTechTileEntityAtSide(side); + final IGregTechTileEntity tItemPipe = aBaseMetaTileEntity + .getIGregTechTileEntityAtSide(side); if (tItemPipe != null) { if (aBaseMetaTileEntity.getColorization() >= 0) { final byte tColor = tItemPipe.getColorization(); @@ -104,9 +102,7 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { if (tItemPipe instanceof BaseMetaPipeEntity) { final IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); if (tMetaTileEntity instanceof IMetaTileEntityItemPipe - && tItemPipe - .getCoverInfoAtSide(oppositeSide) - .letsItemsIn(-2)) { + && tItemPipe.getCoverInfoAtSide(oppositeSide).letsItemsIn(-2)) { scanPipes( (IMetaTileEntityItemPipe) tMetaTileEntity, aMap, diff --git a/src/main/java/gregtech/api/interfaces/modularui/IAddGregtechLogo.java b/src/main/java/gregtech/api/interfaces/modularui/IAddGregtechLogo.java index d90d310dc8..12ac32c143 100644 --- a/src/main/java/gregtech/api/interfaces/modularui/IAddGregtechLogo.java +++ b/src/main/java/gregtech/api/interfaces/modularui/IAddGregtechLogo.java @@ -3,5 +3,6 @@ package gregtech.api.interfaces.modularui; import com.gtnewhorizons.modularui.api.screen.ModularWindow; public interface IAddGregtechLogo { + default void addGregTechLogo(ModularWindow.Builder builder) {} } diff --git a/src/main/java/gregtech/api/interfaces/modularui/IAddInventorySlots.java b/src/main/java/gregtech/api/interfaces/modularui/IAddInventorySlots.java index 70e33aa2c8..4111848ecb 100644 --- a/src/main/java/gregtech/api/interfaces/modularui/IAddInventorySlots.java +++ b/src/main/java/gregtech/api/interfaces/modularui/IAddInventorySlots.java @@ -4,6 +4,7 @@ import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.screen.ModularWindow; public interface IAddInventorySlots { + default void add1by1Slot(ModularWindow.Builder builder, IDrawable... background) {} default void add2by2Slots(ModularWindow.Builder builder, IDrawable... background) {} diff --git a/src/main/java/gregtech/api/interfaces/modularui/IAddUIWidgets.java b/src/main/java/gregtech/api/interfaces/modularui/IAddUIWidgets.java index 7b70fd724c..1fa317b17f 100644 --- a/src/main/java/gregtech/api/interfaces/modularui/IAddUIWidgets.java +++ b/src/main/java/gregtech/api/interfaces/modularui/IAddUIWidgets.java @@ -4,5 +4,6 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; public interface IAddUIWidgets { + default void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {} } diff --git a/src/main/java/gregtech/api/interfaces/modularui/IGetGUITextureSet.java b/src/main/java/gregtech/api/interfaces/modularui/IGetGUITextureSet.java index 409523b008..59aa2723c3 100644 --- a/src/main/java/gregtech/api/interfaces/modularui/IGetGUITextureSet.java +++ b/src/main/java/gregtech/api/interfaces/modularui/IGetGUITextureSet.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces.modularui; import gregtech.api.gui.modularui.GUITextureSet; public interface IGetGUITextureSet { + default GUITextureSet getGUITextureSet() { return null; } diff --git a/src/main/java/gregtech/api/interfaces/modularui/IGetTitleColor.java b/src/main/java/gregtech/api/interfaces/modularui/IGetTitleColor.java index a1f79d1568..76d94ee299 100644 --- a/src/main/java/gregtech/api/interfaces/modularui/IGetTitleColor.java +++ b/src/main/java/gregtech/api/interfaces/modularui/IGetTitleColor.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Dyes; import gregtech.api.util.GT_Util; public interface IGetTitleColor { + default int getTitleColor() { return GT_Util.getRGBaInt(Dyes.dyeWhite.getRGBA()); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java b/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java index 7b0bc9c690..44b59ffce1 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java @@ -4,16 +4,16 @@ package gregtech.api.interfaces.tileentity; * Interface for internal Code, which is mainly used for independent Energy conversion. */ public interface IBasicEnergyContainer extends IEnergyConnected { + /** - * Gets if that Amount of Energy is stored inside the Machine. - * It is used for checking the contained Energy before consuming it. - * If this returns false, it will also give a Message inside the Scanner, that this Machine doesn't have enough Energy. + * Gets if that Amount of Energy is stored inside the Machine. It is used for checking the contained Energy before + * consuming it. If this returns false, it will also give a Message inside the Scanner, that this Machine doesn't + * have enough Energy. */ boolean isUniversalEnergyStored(long aEnergyAmount); /** - * Gets the stored electric, kinetic or steam Energy (with EU as reference Value) - * Always returns the largest one. + * Gets the stored electric, kinetic or steam Energy (with EU as reference Value) Always returns the largest one. */ long getUniversalEnergyStored(); @@ -43,12 +43,14 @@ public interface IBasicEnergyContainer extends IEnergyConnected { long getInputVoltage(); /** - * Decreases the Amount of stored universal Energy. If ignoring too less Energy, then it just sets the Energy to 0 and returns false. + * Decreases the Amount of stored universal Energy. If ignoring too less Energy, then it just sets the Energy to 0 + * and returns false. */ boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy); /** - * Increases the Amount of stored electric Energy. If ignoring too much Energy, then the Energy Limit is just being ignored. + * Increases the Amount of stored electric Energy. If ignoring too much Energy, then the Energy Limit is just being + * ignored. */ boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy); @@ -97,8 +99,8 @@ public interface IBasicEnergyContainer extends IEnergyConnected { * @param aEnergy The Energy to add to the Machine. * @param aIgnoreTooMuchEnergy if it shall ignore if it has too much Energy. * @return if it was successful - * <p/> - * And yes, you can't directly decrease the Steam of a Machine. That is done by decreaseStoredEnergyUnits + * <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; diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java index 3bcf441128..3a17df4717 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Dyes; import gregtech.api.util.GT_Util; public interface IColoredTileEntity { + /** * @return 0 - 15 are Colors, while -1 means uncolored */ @@ -20,7 +21,7 @@ public interface IColoredTileEntity { * @return Actual color shown on GUI */ default int getGUIColorization() { - return GT_Util.getRGBInt( - (getColorization() != -1 ? Dyes.get(getColorization()) : Dyes.MACHINE_METAL).getRGBA()); + return GT_Util + .getRGBInt((getColorization() != -1 ? Dyes.get(getColorization()) : Dyes.MACHINE_METAL).getRGBA()); } } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java b/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java index df131c84c2..f23c5a64c9 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java @@ -1,13 +1,15 @@ package gregtech.api.interfaces.tileentity; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; + import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.ISerializableObject; import gregtech.common.covers.CoverInfo; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEnergyContainer { + boolean canPlaceCoverIDAtSide(byte aSide, int aID); boolean canPlaceCoverItemAtSide(byte aSide, ItemStack aCover); @@ -53,20 +55,19 @@ public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEn } /** - * For use by the regular MetaTileEntities. Returns the Cover Manipulated input Redstone. - * Don't use this if you are a Cover Behavior. Only for MetaTileEntities. + * For use by the regular MetaTileEntities. Returns the Cover Manipulated input Redstone. Don't use this if you are + * a Cover Behavior. Only for MetaTileEntities. */ byte getInternalInputRedstoneSignal(byte aSide); /** - * For use by the regular MetaTileEntities. This makes it not conflict with Cover based Redstone Signals. - * Don't use this if you are a Cover Behavior. Only for MetaTileEntities. + * For use by the regular MetaTileEntities. This makes it not conflict with Cover based Redstone Signals. Don't use + * this if you are a Cover Behavior. Only for MetaTileEntities. */ void setInternalOutputRedstoneSignal(byte aSide, byte aStrength); /** - * Causes a general Cover Texture update. - * Sends 6 Integers to Client + causes @issueTextureUpdate() + * Causes a general Cover Texture update. Sends 6 Integers to Client + causes @issueTextureUpdate() */ void issueCoverUpdate(byte aSide); @@ -77,10 +78,11 @@ 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 4e3b03d970..5208944d66 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java @@ -1,18 +1,17 @@ package gregtech.api.interfaces.tileentity; import java.util.ArrayList; + import net.minecraft.entity.player.EntityPlayer; public interface IDebugableTileEntity { + /** * Returns a Debug Message, for a generic DebugItem * * @param aPlayer the Player, who rightclicked with his Debug Item - * @param aLogLevel the Log Level of the Debug Item. - * 0 = Obvious - * 1 = Visible for the regular Scanner - * 2 = Only visible to more advanced Scanners - * 3 = Debug ONLY + * @param aLogLevel the Log Level of the Debug Item. 0 = Obvious 1 = Visible for the regular Scanner 2 = Only + * visible to more advanced Scanners 3 = Debug ONLY * @return a String-Array containing the DebugInfo, every Index is a separate line (0 = first Line) */ ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aLogLevel); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java b/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java index 9d19e7cef0..9a08e65b78 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java @@ -6,16 +6,17 @@ import net.minecraft.item.ItemStack; * You are allowed to include this File in your Download, as i will not change it. */ public interface IDigitalChest extends IHasWorldObjectAndCoords { + /** - * Is this even a TileEntity of a Digital Chest? - * I need things like this Function for MetaTileEntities, you MUST check this!!! - * Do not assume that it's a Digital Chest or similar Device, when it just implements this Interface. + * Is this even a TileEntity of a Digital Chest? I need things like this Function for MetaTileEntities, you MUST + * check this!!! Do not assume that it's a Digital Chest or similar Device, when it just implements this Interface. */ boolean isDigitalChest(); /** - * Gives an Array of Stacks with Size (of all the Data-stored Items) of the correspondent Item kinds (regular QChests have only one) - * Does NOT include the 64 "ready" Items inside the Slots, and neither the 128 Items in the overflow Buffer. + * Gives an Array of Stacks with Size (of all the Data-stored Items) of the correspondent Item kinds (regular + * QChests have only one) Does NOT include the 64 "ready" Items inside the Slots, and neither the 128 Items in the + * overflow Buffer. */ ItemStack[] getStoredItemData(); @@ -25,7 +26,8 @@ public interface IDigitalChest extends IHasWorldObjectAndCoords { void setItemCount(int aCount); /** - * Gets the maximum Item count for this QChest alike Storage. This applies to the Data-Storage, not for the up to 192 buffered Items! + * Gets the maximum Item count for this QChest alike Storage. This applies to the Data-Storage, not for the up to + * 192 buffered Items! */ int getMaxItemCount(); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java index 5a35e1ea52..f136434c54 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java @@ -8,6 +8,7 @@ import gregtech.api.enums.Materials; * Not all Data might be reliable. This is just for Information sake. */ public interface IEnergyConductor extends IEnergyConnected { + /** * @return if this is actually a Cable. (you must check this) */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index c1ecc2b153..d046418ea6 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -1,26 +1,29 @@ package gregtech.api.interfaces.tileentity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + import cofh.api.energy.IEnergyReceiver; import gregtech.api.GregTech_API; import gregtech.api.util.GT_Utility; import ic2.api.energy.tile.IEnergySink; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; /** * Interface for getting Connected to the GregTech Energy Network. * <p/> - * This is all you need to connect to the GT Network. - * IColoredTileEntity is needed for not connecting differently coloured Blocks to each other. - * IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does implement most of that Interface. + * This is all you need to connect to the GT Network. IColoredTileEntity is needed for not connecting differently + * coloured Blocks to each other. IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does + * implement most of that Interface. */ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAndCoords { + /** * Inject Energy Call for Electricity. Gets called by EnergyEmitters to inject Energy into your Block * <p/> * Note: you have to check for @inputEnergyFrom because the Network won't check for that by itself. * - * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do Side checks for this Side) + * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do + * Side checks for this Side) * @return amount of used Amperes. 0 if not accepted anything. */ long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage); @@ -47,6 +50,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd * Utility for the Network */ final class Util { + /** * Emits Energy to the E-net. Also compatible with adjacent IC2 TileEntities. * @@ -69,15 +73,14 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd } else if (tTileEntity instanceof IEnergySink) { if (((IEnergySink) tTileEntity) .acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { - while (aAmperage > rUsedAmperes - && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 + while (aAmperage > rUsedAmperes && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 && ((IEnergySink) tTileEntity) - .injectEnergy(ForgeDirection.getOrientation(j), aVoltage, aVoltage) - < aVoltage) rUsedAmperes++; + .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 936de80b3e..8eb481f150 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java @@ -1,28 +1,31 @@ package gregtech.api.interfaces.tileentity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + import cofh.api.energy.IEnergyReceiver; import gregtech.api.enums.SubTag; import gregtech.api.util.GT_Utility; import ic2.api.energy.tile.IEnergySink; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; /** * THIS IS GOING TO BE USED IN 1.8 * <p/> * Interface for getting Connected to the GregTech Energy Network. * <p/> - * This is all you need to connect to the GT Network. - * IColoredTileEntity is needed for not connecting differently coloured Blocks to each other. - * IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does implement most of that Interface. + * This is all you need to connect to the GT Network. IColoredTileEntity is needed for not connecting differently + * coloured Blocks to each other. IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does + * implement most of that Interface. */ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasWorldObjectAndCoords { + /** * Inject Energy Call for Electricity. Gets called by EnergyEmitters to inject Energy into your Block * <p/> * Note: you have to check for @inputEnergyFrom because the Network won't check for that by itself. * - * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do Side checks for this Side) + * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do + * Side checks for this Side) * @return amount of used Amperes. 0 if not accepted anything. */ long injectEnergy(SubTag aEnergyType, byte aSide, long aPrimary, long aSecondary); @@ -41,6 +44,7 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW * Utility for the Network */ class Util { + public static int RF_PER_EU = 4; private static boolean RF_ENERGY = false, IC_ENERGY = false, CHECK_ALL = true; @@ -65,12 +69,13 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW } /** - * Emits Energy to the adjacent Blocks. Also compatible with adjacent IC2 TileEntities when electric and RF TileEntities when RedstoneFlux. + * Emits Energy to the adjacent Blocks. Also compatible with adjacent IC2 TileEntities when electric and RF + * TileEntities when RedstoneFlux. * * @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++) @@ -84,24 +89,24 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW } rUsedSecondary += ((IExperimentalEnergyTileEntity) tTileEntity) .injectEnergy(aEnergyType, j, aPrimary, aSecondary - rUsedSecondary); - } else if (IC_ENERGY - && aEnergyType == SubTag.ENERGY_ELECTRICITY + } 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) + 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); - } + < 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); + } } return rUsedSecondary; } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java index 713fe73f22..a301c21a76 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * This File has just internal Information about the Fibre Redstone State of a TileEntity */ public interface IFibreConnected extends IColoredTileEntity, IHasWorldObjectAndCoords { + /** * If this Blocks accepts Fibre from this Side */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java index 54fe151cb1..31e9b51719 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java @@ -1,15 +1,16 @@ package gregtech.api.interfaces.tileentity; public interface IGearEnergyTileEntity { + /** - * If Rotation Energy can be accepted on this Side. - * This means that the Gear/Axle will connect to this Side, and can cause the Gear/Axle to stop if the Energy isn't accepted. + * If Rotation Energy can be accepted on this Side. This means that the Gear/Axle will connect to this Side, and can + * cause the Gear/Axle to stop if the Energy isn't accepted. */ boolean acceptsRotationalEnergy(byte aSide); /** - * Inject Energy Call for Rotational Energy. - * Rotation Energy can't be stored, this is just for things like internal Dynamos, which convert it into Energy, or into Progress. + * Inject Energy Call for Rotational Energy. Rotation Energy can't be stored, this is just for things like internal + * Dynamos, which convert it into Energy, or into Progress. * * @param aSpeed Positive = Clockwise, Negative = Counterclockwise */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java index 221e290220..001ed44825 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java @@ -4,16 +4,17 @@ package gregtech.api.interfaces.tileentity; * You are allowed to include this File in your Download, as i will not change it. */ public interface IGregTechDeviceInformation { + /** - * Is this even a TileEntity which allows GregTech Sensor Kits? - * I need things like this Function for MetaTileEntities, you MUST check this!!! - * Do not assume that it's a Information returning Device, when it just implements this Interface. + * Is this even a TileEntity which allows GregTech Sensor Kits? I need things like this Function for + * MetaTileEntities, you MUST check this!!! Do not assume that it's a Information returning Device, when it just + * implements this Interface. */ boolean isGivingInformation(); /** - * Up to 8 Strings can be returned. - * Note: If you insert "\\\\" in the String it tries to translate seperate Parts of the String instead of the String as a whole. + * Up to 8 Strings can be returned. Note: If you insert "\\\\" in the String it tries to translate seperate Parts of + * the String instead of the String as a whole. * * @return an Array of Information Strings. Don't return null! */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java index 16fbe4f327..a561c3ebe1 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java @@ -1,15 +1,9 @@ package gregtech.api.interfaces.tileentity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.interfaces.IDescribable; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.modularui.IAddInventorySlots; -import gregtech.api.interfaces.modularui.IGetGUITextureSet; -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; @@ -18,6 +12,14 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.fluids.IFluidHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.interfaces.IDescribable; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.modularui.IAddInventorySlots; +import gregtech.api.interfaces.modularui.IGetGUITextureSet; +import gregtech.common.blocks.GT_Block_Machines; + /** * A simple compound Interface for all my TileEntities. * <p/> @@ -25,20 +27,10 @@ import net.minecraftforge.fluids.IFluidHandler; * <p/> * It can cause Problems to include this Interface! */ -public interface IGregTechTileEntity - extends ITexturedTileEntity, - IGearEnergyTileEntity, - ICoverable, - IFluidHandler, - ITurnable, - IGregTechDeviceInformation, - IUpgradableMachine, - IDigitalChest, - IDescribable, - IMachineBlockUpdateable, - IGregtechWailaProvider, - IGetGUITextureSet, - IAddInventorySlots { +public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTileEntity, ICoverable, IFluidHandler, + ITurnable, IGregTechDeviceInformation, IUpgradableMachine, IDigitalChest, IDescribable, IMachineBlockUpdateable, + IGregtechWailaProvider, IGetGUITextureSet, IAddInventorySlots { + /** * gets the Error displayed on the GUI */ @@ -65,9 +57,9 @@ public interface IGregTechTileEntity IMetaTileEntity getMetaTileEntity(); /** - * Sets the MetaTileEntity. - * Even though this uses the Universal Interface, certain BaseMetaTileEntities only accept one kind of MetaTileEntity - * so only use this if you are sure its the correct one or you will get a Class cast Error. + * Sets the MetaTileEntity. Even though this uses the Universal Interface, certain BaseMetaTileEntities only accept + * one kind of MetaTileEntity so only use this if you are sure its the correct one or you will get a Class cast + * Error. * * @param aMetaTileEntity */ @@ -144,7 +136,8 @@ public interface IGregTechTileEntity ArrayList<ItemStack> getDrops(); - /** Check if the item at the specific index should be dropped or not + /** + * Check if the item at the specific index should be dropped or not * * @param index Index that will be checked * @return True if it should drop, else false @@ -156,14 +149,8 @@ public interface IGregTechTileEntity */ 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); @@ -184,8 +171,7 @@ public interface IGregTechTileEntity */ @Override default boolean isMachineBlockUpdateRecursive() { - return !isDead() - && getMetaTileEntity() != null + return !isDead() && getMetaTileEntity() != null && getMetaTileEntity().getBaseMetaTileEntity() == this && getMetaTileEntity().isMachineBlockUpdateRecursive(); } @@ -195,8 +181,8 @@ public interface IGregTechTileEntity } /** - * A randomly called display update to be able to add particles or other items for display - * The event is proxied by the {@link GT_Block_Machines#randomDisplayTick} + * A randomly called display update to be able to add particles or other items for display The event is proxied by + * the {@link GT_Block_Machines#randomDisplayTick} */ @SideOnly(Side.CLIENT) default void onRandomDisplayTick() { diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java index a463cc91df..19835cd03c 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java @@ -1,8 +1,10 @@ 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; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -10,15 +12,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public interface IGregtechWailaProvider { - 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 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) {} } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java index 74ad58c407..bee1756217 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java @@ -18,18 +18,20 @@ public interface IHasInventory extends ISidedInventory, IHasWorldObjectAndCoords boolean isValidSlot(int aIndex); /** - * Tries to add a Stack to the Slot. - * It doesn't matter if the Slot is valid or invalid as described at the Function above. + * Tries to add a Stack to the Slot. It doesn't matter if the Slot is valid or invalid as described at the Function + * above. * - * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and then true if aStack has been added + * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and + * then true if aStack has been added */ boolean addStackToSlot(int aIndex, ItemStack aStack); /** - * Tries to add X Items of a Stack to the Slot. - * It doesn't matter if the Slot is valid or invalid as described at the Function above. + * Tries to add X Items of a Stack to the Slot. It doesn't matter if the Slot is valid or invalid as described at + * the Function above. * - * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and then true if aStack has been added + * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and + * then true if aStack has been added */ boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java index 7f31d17d11..f02672365e 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java @@ -11,13 +11,16 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.fluids.IFluidHandler; /** - * This is a bunch of Functions my TileEntities provide, to make life much easier, and to get rid of internal TileEntity stuff. + * This is a bunch of Functions my TileEntities provide, to make life much easier, and to get rid of internal TileEntity + * stuff. * <p/> * This also makes access to adjacent TileEntities more Efficient. * <p/> - * Note: It doesn't have to be a TileEntity in certain cases! And only certain cases, such as the Recipe checking of the findRecipe Function. + * Note: It doesn't have to be a TileEntity in certain cases! And only certain cases, such as the Recipe checking of the + * findRecipe Function. */ public interface IHasWorldObjectAndCoords { + World getWorld(); int getXCoord(); @@ -132,7 +135,8 @@ public interface IHasWorldObjectAndCoords { boolean isDead(); /** - * Sends a Block Event to the Client TileEntity, the byte Parameters are only for validation as Minecraft doesn't properly write Packet Data. + * Sends a Block Event to the Client TileEntity, the byte Parameters are only for validation as Minecraft doesn't + * properly write Packet Data. */ void sendBlockEvent(byte aID, byte aValue); @@ -142,8 +146,8 @@ public interface IHasWorldObjectAndCoords { long getTimer(); /** - * Sets the Light Level of this Block on a Scale of 0 - 15 - * It could be that it doesn't work. This is just for convenience. + * Sets the Light Level of this Block on a Scale of 0 - 15 It could be that it doesn't work. This is just for + * convenience. */ void setLightValue(byte aLightValue); @@ -164,6 +168,7 @@ public interface IHasWorldObjectAndCoords { /** * Opens the GUI with this ID of this MetaTileEntity + * * @deprecated Use ModularUI */ @Deprecated @@ -173,6 +178,7 @@ public interface IHasWorldObjectAndCoords { /** * Opens the GUI with the ID = 0 of this TileEntity + * * @deprecated Use ModularUI */ @Deprecated diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java b/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java index 2593f1f3b5..971558c092 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * IC2 Energy Compat */ public interface IIC2Enet { + /** * Should this tile/block join the ic2 enet */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java b/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java index b8ce51a212..f772c1ee69 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java @@ -1,16 +1,17 @@ package gregtech.api.interfaces.tileentity; /** - * You are allowed to include this File in your Download, as i will not change it. - * Simple Interface for Machines, which need my Machine Blocks for MultiBlockStructures. + * You are allowed to include this File in your Download, as i will not change it. Simple Interface for Machines, which + * need my Machine Blocks for MultiBlockStructures. * <p/> * Every Machine implementing this Interface will conduct Machine updates. */ public interface IMachineBlockUpdateable { + /** - * The Machine Update, which is called when the Machine needs an Update of its Parts. - * I suggest to wait 1-5 seconds before actually checking the Machine Parts. - * RP-Frames could for example cause Problems when you instacheck the Machine Parts. + * The Machine Update, which is called when the Machine needs an Update of its Parts. I suggest to wait 1-5 seconds + * before actually checking the Machine Parts. RP-Frames could for example cause Problems when you instacheck the + * Machine Parts. */ void onMachineBlockUpdate(); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java b/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java index 54fa90218a..bcd213b4ff 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * For Machines which have Progress */ public interface IMachineProgress extends IHasWorldObjectAndCoords { + /** * returns the Progress this Machine has made. Warning, this can also be negative! */ @@ -25,8 +26,8 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { boolean hasThingsToDo(); /** - * returns if the Machine just got enableWorking called after being disabled. - * Used for Translocators, which need to check if they need to transfer immediately. + * returns if the Machine just got enableWorking called after being disabled. Used for Translocators, which need to + * check if they need to transfer immediately. */ boolean hasWorkJustBeenEnabled(); @@ -46,16 +47,15 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { boolean isAllowedToWork(); /** - * 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. + * 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; } /** - * used to control Machines via Redstone Signal Strength by special Covers - * only Values between 0 and 15! + * used to control Machines via Redstone Signal Strength by special Covers only Values between 0 and 15! */ default void setWorkDataValue(byte aValue) {} @@ -71,7 +71,7 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { /** * Indicates if the object in question was forced to shut down (i.e. loss of power) - * */ + */ default boolean wasShutdown() { return false; } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java index c7590e98ed..3cc3c6404d 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces.tileentity; import gregtech.api.interfaces.ITexture; public interface IPipeRenderedTileEntity extends ICoverable, ITexturedTileEntity { + float getThickNess(); byte getConnections(); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java index fc5aa460bf..fba20ee79d 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * This File has just internal Information about the Redstone State of a TileEntity */ public interface IRedstoneEmitter extends IHasWorldObjectAndCoords { + /** * gets the Redstone Level the TileEntity should emit to the given Output Side */ @@ -12,8 +13,9 @@ public interface IRedstoneEmitter extends IHasWorldObjectAndCoords { /** * sets the Redstone Level the TileEntity should emit to the given Output Side * <p/> - * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine internal Output Redstone, so that it doesnt conflict with Cover Redstone. - * This sets the true Redstone Output Signal. Only Cover Behaviors should use it, not MetaTileEntities. + * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine + * internal Output Redstone, so that it doesnt conflict with Cover Redstone. This sets the true Redstone Output + * Signal. Only Cover Behaviors should use it, not MetaTileEntities. */ void setOutputRedstoneSignal(byte aSide, byte aStrength); @@ -25,8 +27,9 @@ public interface IRedstoneEmitter extends IHasWorldObjectAndCoords { /** * sets the Redstone Level the TileEntity should emit to the given Output Side * <p/> - * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine internal Output Redstone, so that it doesnt conflict with Cover Redstone. - * This sets the true Redstone Output Signal. Only Cover Behaviors should use it, not MetaTileEntities. + * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine + * internal Output Redstone, so that it doesnt conflict with Cover Redstone. This sets the true Redstone Output + * Signal. Only Cover Behaviors should use it, not MetaTileEntities. */ void setStrongOutputRedstoneSignal(byte aSide, byte aStrength); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java index acee525137..d5fb814c52 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java @@ -4,11 +4,13 @@ package gregtech.api.interfaces.tileentity; * This File has just internal Information about the Redstone State of a TileEntity */ public interface IRedstoneReceiver extends IHasWorldObjectAndCoords { + /** * gets the Redstone Level of the TileEntity to the given Input Side * <p/> - * Do not use this if ICoverable is implemented. ICoverable has @getInternalInputRedstoneSignal for Machine internal Input Redstone - * This returns the true incoming Redstone Signal. Only Cover Behaviors should check it, not MetaTileEntities. + * Do not use this if ICoverable is implemented. ICoverable has @getInternalInputRedstoneSignal for Machine internal + * Input Redstone This returns the true incoming Redstone Signal. Only Cover Behaviors should check it, not + * MetaTileEntities. */ byte getInputRedstoneSignal(byte aSide); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java index 452699a172..1deb5f1d7c 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java @@ -4,14 +4,14 @@ package gregtech.api.interfaces.tileentity; * This File has just internal Information about the Redstone State of a TileEntity */ public interface IRedstoneTileEntity extends IRedstoneEmitter, IRedstoneReceiver { + /** * enables/disables Redstone Output in general. */ void setGenericRedstoneOutput(boolean aOnOff); /** - * Causes a general Block update. - * Sends nothing to Client, just causes a Block Update. + * Causes a general Block update. Sends nothing to Client, just causes a Block Update. */ void issueBlockUpdate(); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java index fd1600903e..d6024b612e 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java @@ -1,9 +1,11 @@ package gregtech.api.interfaces.tileentity; -import gregtech.api.interfaces.ITexture; import net.minecraft.block.Block; +import gregtech.api.interfaces.ITexture; + public interface ITexturedTileEntity { + /** * @return the Textures rendered by the GT Rendering */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java b/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java index e05fd44637..e54a85090e 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java @@ -6,6 +6,7 @@ import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; * Implemented by all my Machines. However without any security checks, if the Players are even allowed to rotate it. */ public interface ITurnable { + /** * Get the block's facing. * diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java b/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java index cc59a4af34..546ada0c9d 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * To access my Machines a bit easier */ public interface IUpgradableMachine extends IMachineProgress { + /** * Accepts Upgrades. Some Machines have an Upgrade Limit. */ 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 d37f0479ef..1226520eff 100644 --- a/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java +++ b/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java @@ -1,15 +1,7 @@ package gregtech.api.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -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; @@ -23,7 +15,18 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +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; + public class GT_Block_LongDistancePipe extends GT_Generic_Block { + public IIconContainer[] mIcons; public GT_Block_LongDistancePipe() { @@ -38,9 +41,8 @@ public class GT_Block_LongDistancePipe extends GT_Generic_Block { 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 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 05b73d730c..3371a1a261 100644 --- a/src/main/java/gregtech/api/items/GT_BreederCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_BreederCell_Item.java @@ -2,14 +2,9 @@ package gregtech.api.items; import static gregtech.api.util.GT_Utility.formatNumbers; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -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; @@ -17,12 +12,20 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Utility; +import ic2.api.reactor.IReactor; +import ic2.api.reactor.IReactorComponent; +import ic2.core.IC2Potion; + /** * A {@link ic2.core.item.reactor.ItemReactorLithiumCell}, but can be used to produce anything! * * @author glee8e */ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComponent { + protected final int mHeatBonusStep; protected final int mHeatBonusMultiplier; protected ItemStack mProduct; @@ -30,14 +33,8 @@ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComp protected boolean hidden = false; protected boolean neiAdded = false; - 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; @@ -47,7 +44,12 @@ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComp mProduct = aProduct.get(); if (!hidden && !neiAdded) { GT_Values.RA.addIC2ReactorBreederCell( - new ItemStack(this), mProduct, deflector, mHeatBonusStep, mHeatBonusMultiplier, getMaxDamage()); + new ItemStack(this), + mProduct, + deflector, + mHeatBonusStep, + mHeatBonusMultiplier, + getMaxDamage()); neiAdded = true; } }); @@ -90,10 +92,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 + formatNumbers(aStack.getItemDamage()) + EnumChatFormatting.RESET, - "" + formatNumbers(getMaxDamage()))); + aList.add( + String.format( + transItem("020", "Progress: %s/%s"), + "" + color2 + formatNumbers(aStack.getItemDamage()) + EnumChatFormatting.RESET, + "" + formatNumbers(getMaxDamage()))); if (aStack.getItemDamage() > 0) aList.add(EnumChatFormatting.RED + transItem("021", "Radiation Hazard")); } @@ -106,15 +109,8 @@ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComp 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()); 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 eb37b50ea6..73d3dc3be8 100644 --- a/src/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java @@ -1,10 +1,12 @@ package gregtech.api.items; +import net.minecraft.item.ItemStack; + 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 GT_CoolantCellIC_Item(String aUnlocalized, String aEnglish, int aMaxStore) { super(aUnlocalized, aEnglish, aMaxStore); } @@ -13,15 +15,8 @@ public class GT_CoolantCellIC_Item extends GT_CoolantCell_Item implements IReact 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 e698491b7d..b6530df95c 100644 --- a/src/main/java/gregtech/api/items/GT_CoolantCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_CoolantCell_Item.java @@ -1,15 +1,18 @@ 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 gregtech.api.GregTech_API; +import ic2.core.util.StackUtil; + public class GT_CoolantCell_Item extends GT_Generic_Item { + protected int heatStorage; public GT_CoolantCell_Item(String aUnlocalized, String aEnglish, int aMaxStore) { @@ -74,8 +77,9 @@ public class GT_CoolantCell_Item extends GT_Generic_Item { 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 7b4ac6afb8..c31ba0cc82 100644 --- a/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java +++ b/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java @@ -2,15 +2,10 @@ 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; @@ -28,24 +23,22 @@ import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingFallEvent; +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; + 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, + 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); @@ -123,8 +116,7 @@ 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); } @@ -146,8 +138,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; @@ -172,8 +164,7 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { } if ((mSpecials & 256) != 0) { - if (GT_ModHandler.canUseElectricItem(aStack, 100) - && aPlayer.isSprinting() + 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); @@ -217,21 +208,21 @@ 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); } + */ // } } } @@ -305,9 +296,8 @@ 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; @@ -318,17 +308,15 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { } @Override - public ISpecialArmor.ArmorProperties getProperties( - EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slotIndex) { + 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); + mDamageEnergyCost > 0 ? 25 + * GT_ModHandler + .dischargeElectricItem(armor, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true) + / mDamageEnergyCost : 0); } @Override @@ -337,10 +325,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 912841c145..7aaef6d5ca 100644 --- a/src/main/java/gregtech/api/items/GT_Generic_Block.java +++ b/src/main/java/gregtech/api/items/GT_Generic_Block.java @@ -2,13 +2,15 @@ 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 cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.util.GT_LanguageManager; + public class GT_Generic_Block extends Block { + protected final String mUnlocalizedName; protected GT_Generic_Block(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) { 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 e139914de1..2f1e642e34 100644 --- a/src/main/java/gregtech/api/items/GT_Generic_Item.java +++ b/src/main/java/gregtech/api/items/GT_Generic_Item.java @@ -3,17 +3,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; -import gregtech.api.GregTech_API; -import gregtech.api.enums.SubTag; -import gregtech.api.interfaces.IProjectileItem; -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; @@ -30,10 +21,22 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.SubTag; +import gregtech.api.interfaces.IProjectileItem; +import gregtech.api.util.GT_Config; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + /** * Extended by most Items, also used as a fallback Item, to prevent the accidental deletion when Errors occur. */ public class GT_Generic_Item extends Item implements IProjectileItem { + private final String mName, mTooltip; protected IIcon mIcon; @@ -41,14 +44,13 @@ 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); + if (GT_Utility.isStringValid(aEnglishTooltip)) GT_LanguageManager + .addStringLocalization(mTooltip = mName + ".tooltip_main", aEnglishTooltip, aWriteToolTipIntoLangFile); else mTooltip = null; setCreativeTab(GregTech_API.TAB_GREGTECH); GameRegistry.registerItem(this, mName, MOD_ID); @@ -122,14 +124,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; } @@ -158,6 +160,7 @@ public class GT_Generic_Item extends Item implements IProjectileItem { } public static class GT_Item_Dispense extends BehaviorProjectileDispense { + @Override public ItemStack dispenseStack(IBlockSource aSource, ItemStack aStack) { return ((GT_Generic_Item) aStack.getItem()).onDispense(aSource, aStack); 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 efc8f88be1..42c356fd88 100644 --- a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java +++ b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java @@ -4,19 +4,10 @@ import static gregtech.api.enums.GT_Values.D1; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.util.GT_Utility.formatNumbers; -import gregtech.api.enums.SubTag; -import gregtech.api.interfaces.IItemBehaviour; -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 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; @@ -31,16 +22,27 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; +import gregtech.api.enums.SubTag; +import gregtech.api.interfaces.IItemBehaviour; +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 ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IElectricItemManager; +import ic2.api.item.ISpecialElectricItem; + 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. * - * @param aUnlocalized The Unlocalized Name of this Item. + * @param aUnlocalized The Unlocalized Name of this Item. */ public GT_MetaBase_Item(String aUnlocalized) { super(aUnlocalized, "Generated Item", null, false); @@ -59,8 +61,8 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item */ 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; } @@ -72,51 +74,46 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item @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); } @@ -126,12 +123,11 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item 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; - } + 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; @@ -143,27 +139,17 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item } @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; - } + 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; @@ -175,27 +161,17 @@ public abstract class GT_MetaBase_Item extends GT_Generic_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) { 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; - } + 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; @@ -212,9 +188,8 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item 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); + 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); } @@ -232,31 +207,28 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item Long[] tStats = getElectricStats(aStack); if (tStats != null) { if (tStats[3] > 0) { - aList.add(EnumChatFormatting.AQUA - + String.format( + aList.add( + EnumChatFormatting.AQUA + String.format( transItem("009", "Contains %s EU Tier: %s"), formatNumbers(tStats[3]), - "" + (tStats[2] >= 0 ? tStats[2] : 0)) - + EnumChatFormatting.GRAY); + "" + (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"), - formatNumbers(tCharge), - 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"), + formatNumbers(tCharge), + formatNumbers(Math.abs(tStats[0])), + "" + V[(int) (tStats[2] >= 0 + ? tStats[2] < V.length ? tStats[2] : V.length - 1 + : 1)]) + + EnumChatFormatting.GRAY); } } } @@ -264,23 +236,19 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item 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( + 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 : formatNumbers(tFluid.amount)), - "" + formatNumbers(tStats[0])) - + EnumChatFormatting.GRAY); + "" + formatNumbers(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); } @@ -288,9 +256,8 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item @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 @@ -315,37 +282,28 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item } @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 + if (tStats == null || tStats[2] > aTier || !(tStats[3] == -1 || tStats[3] == -3 || (tStats[3] < 0 && aCharge == Integer.MAX_VALUE)) - || aStack.stackSize != 1) return 0; + || 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; @@ -354,14 +312,8 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item 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; } @@ -419,90 +371,41 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item } /* - - @Override - public final int getMaxCharge(ItemStack aStack) { - Long[] tStats = getElectricStats(aStack); - if (tStats == null) return 0; - return (int)Math.abs(tStats[0]); - } - - @Override - public final int getTransferLimit(ItemStack aStack) { - Long[] tStats = getElectricStats(aStack); - if (tStats == null) return 0; - return (int)Math.max(tStats[1], tStats[3]); - } - - @Override - public final int charge(ItemStack aStack, int 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; - long tChargeBefore = getRealCharge(aStack), tNewCharge = aCharge==Integer.MAX_VALUE?Long.MAX_VALUE:Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit?aCharge:Math.min(tStats[1], aCharge))); - if (!aSimulate) setCharge(aStack, tNewCharge); - return (int)(tNewCharge-tChargeBefore); - } - - @Override - public final int discharge(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreTransferLimit, boolean aSimulate) { - Long[] tStats = getElectricStats(aStack); - if (tStats == null || tStats[2] > aTier) return 0; - if (tStats[3] > 0) { - if (aCharge < tStats[3] || aStack.stackSize < 1) return 0; - if (!aSimulate) aStack.stackSize--; - return (int)(long)tStats[3]; - } - long tChargeBefore = getRealCharge(aStack), tNewCharge = Math.max(0, tChargeBefore - (aIgnoreTransferLimit?aCharge:Math.min(tStats[1], aCharge))); - if (!aSimulate) setCharge(aStack, tNewCharge); - return (int)(tChargeBefore-tNewCharge); - } - - @Override - public final int getCharge(ItemStack aStack) { - return (int)Math.min(Integer.MAX_VALUE, getRealCharge(aStack)); - } - - @Override - public final boolean canUse(ItemStack aStack, int aAmount) { - return getRealCharge(aStack) >= aAmount; - } - - @Override - public final boolean use(ItemStack aStack, int aAmount, EntityLivingBase aPlayer) { - chargeFromArmor(aStack, aPlayer); - if (aPlayer instanceof EntityPlayer && ((EntityPlayer)aPlayer).capabilities.isCreativeMode) return true; - int tTransfer = discharge(aStack, aAmount, Integer.MAX_VALUE, true, true); - if (tTransfer == aAmount) { - discharge(aStack, aAmount, Integer.MAX_VALUE, true, false); - chargeFromArmor(aStack, aPlayer); - return true; - } - discharge(aStack, aAmount, Integer.MAX_VALUE, true, false); - chargeFromArmor(aStack, aPlayer); - return false; - } - - @Override - public final void chargeFromArmor(ItemStack aStack, EntityLivingBase aPlayer) { - if (aPlayer == null || aPlayer.worldObj.isRemote) return; - for (int i = 1; i < 5; i++) { - ItemStack tArmor = aPlayer.getEquipmentInSlot(i); - if (GT_ModHandler.isElectricItem(tArmor)) { - IElectricItem tArmorItem = (IElectricItem)tArmor.getItem(); - if (tArmorItem.canProvideEnergy(tArmor) && tArmorItem.getTier(tArmor) >= getTier(aStack)) { - int tCharge = ElectricItem.manager.discharge(tArmor, charge(aStack, Integer.MAX_VALUE-1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, false); - if (tCharge > 0) { - charge(aStack, tCharge, Integer.MAX_VALUE, true, false); - if (aPlayer instanceof EntityPlayer) { - Container tContainer = ((EntityPlayer)aPlayer).openContainer; - if (tContainer != null) tContainer.detectAndSendChanges(); - } - } - } - } - } - } - */ + * @Override public final int getMaxCharge(ItemStack aStack) { Long[] tStats = getElectricStats(aStack); if (tStats + * == null) return 0; return (int)Math.abs(tStats[0]); } + * @Override public final int getTransferLimit(ItemStack aStack) { Long[] tStats = getElectricStats(aStack); if + * (tStats == null) return 0; return (int)Math.max(tStats[1], tStats[3]); } + * @Override public final int charge(ItemStack aStack, int 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; + * long tChargeBefore = getRealCharge(aStack), tNewCharge = + * aCharge==Integer.MAX_VALUE?Long.MAX_VALUE:Math.min(Math.abs(tStats[0]), tChargeBefore + + * (aIgnoreTransferLimit?aCharge:Math.min(tStats[1], aCharge))); if (!aSimulate) setCharge(aStack, tNewCharge); + * return (int)(tNewCharge-tChargeBefore); } + * @Override public final int discharge(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreTransferLimit, + * boolean aSimulate) { Long[] tStats = getElectricStats(aStack); if (tStats == null || tStats[2] > aTier) return 0; + * if (tStats[3] > 0) { if (aCharge < tStats[3] || aStack.stackSize < 1) return 0; if (!aSimulate) + * aStack.stackSize--; return (int)(long)tStats[3]; } long tChargeBefore = getRealCharge(aStack), tNewCharge = + * Math.max(0, tChargeBefore - (aIgnoreTransferLimit?aCharge:Math.min(tStats[1], aCharge))); if (!aSimulate) + * setCharge(aStack, tNewCharge); return (int)(tChargeBefore-tNewCharge); } + * @Override public final int getCharge(ItemStack aStack) { return (int)Math.min(Integer.MAX_VALUE, + * getRealCharge(aStack)); } + * @Override public final boolean canUse(ItemStack aStack, int aAmount) { return getRealCharge(aStack) >= aAmount; } + * @Override public final boolean use(ItemStack aStack, int aAmount, EntityLivingBase aPlayer) { + * chargeFromArmor(aStack, aPlayer); if (aPlayer instanceof EntityPlayer && + * ((EntityPlayer)aPlayer).capabilities.isCreativeMode) return true; int tTransfer = discharge(aStack, aAmount, + * Integer.MAX_VALUE, true, true); if (tTransfer == aAmount) { discharge(aStack, aAmount, Integer.MAX_VALUE, true, + * false); chargeFromArmor(aStack, aPlayer); return true; } discharge(aStack, aAmount, Integer.MAX_VALUE, true, + * false); chargeFromArmor(aStack, aPlayer); return false; } + * @Override public final void chargeFromArmor(ItemStack aStack, EntityLivingBase aPlayer) { if (aPlayer == null || + * aPlayer.worldObj.isRemote) return; for (int i = 1; i < 5; i++) { ItemStack tArmor = + * aPlayer.getEquipmentInSlot(i); if (GT_ModHandler.isElectricItem(tArmor)) { IElectricItem tArmorItem = + * (IElectricItem)tArmor.getItem(); if (tArmorItem.canProvideEnergy(tArmor) && tArmorItem.getTier(tArmor) >= + * getTier(aStack)) { int tCharge = ElectricItem.manager.discharge(tArmor, charge(aStack, Integer.MAX_VALUE-1, + * Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, false); if (tCharge > 0) { charge(aStack, tCharge, + * Integer.MAX_VALUE, true, false); if (aPlayer instanceof EntityPlayer) { Container tContainer = + * ((EntityPlayer)aPlayer).openContainer; if (tContainer != null) tContainer.detectAndSendChanges(); } } } } } } + */ public final long getRealCharge(ItemStack aStack) { Long[] tStats = getElectricStats(aStack); if (tStats == null) return 0; @@ -561,11 +464,8 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item } 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); 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 bf472101de..ba1f4abda9 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java @@ -2,6 +2,24 @@ package gregtech.api.items; import static gregtech.api.enums.GT_Values.*; +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; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import squeek.applecore.api.food.FoodValues; +import squeek.applecore.api.food.IEdible; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Optional; import cpw.mods.fml.relauncher.Side; @@ -21,45 +39,32 @@ 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; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import squeek.applecore.api.food.FoodValues; -import squeek.applecore.api.food.IEdible; /** * @author Gregorius Techneticies * <p/> * One Item for everything! * <p/> - * This brilliant Item Class is used for automatically generating all possible variations of Material Items, like Dusts, Ingots, Gems, Plates and similar. - * It saves me a ton of work, when adding Items, because I always have to make a new Item SubType for each OreDict Prefix, when adding a new Material. + * This brilliant Item Class is used for automatically generating all possible variations of Material Items, + * like Dusts, Ingots, Gems, Plates and similar. It saves me a ton of work, when adding Items, because I always + * have to make a new Item SubType for each OreDict Prefix, when adding a new Material. * <p/> - * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom defined, just to save space and MetaData. + * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom + * defined, just to save space and MetaData. * <p/> - * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike Item. + * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike + * Item. */ @Optional.Interface(iface = "squeek.applecore.api.food.IEdible", modid = MOD_ID_APC) public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements IEdible { + /** - * 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. + * 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_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 ---------- */ @@ -96,10 +101,10 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements /** * This adds a Custom Item to the ending Range. * - * @param aID The Id of the assigned Item [0 - mItemAmount] (The MetaData gets auto-shifted by +mOffset) - * @param aEnglish The Default Localized Name of the created Item - * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip - * @param aRandomData The OreDict Names you want to give the Item. Also used for TC Aspects and some other things. + * @param aID The Id of the assigned Item [0 - mItemAmount] (The MetaData gets auto-shifted by +mOffset) + * @param aEnglish The Default Localized Name of the created Item + * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip + * @param aRandomData The OreDict Names you want to give the Item. Also used for TC Aspects and some other things. * @return An ItemStack containing the newly created Item. */ public final ItemStack addItem(int aID, String aEnglish, String aToolTip, Object... aRandomData) { @@ -112,64 +117,60 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements GT_LanguageManager.addStringLocalization(getUnlocalizedName(rStack) + ".tooltip", aToolTip); List<TC_AspectStack> tAspects = new ArrayList<TC_AspectStack>(); // Important Stuff to do first - for (Object tRandomData : aRandomData) - if (tRandomData instanceof SubTag) { - if (tRandomData == SubTag.INVISIBLE) { - mVisibleItems.set(aID, false); - continue; - } - if (tRandomData == SubTag.NO_UNIFICATION) { - GT_OreDictUnificator.addToBlacklist(rStack); - continue; - } + for (Object tRandomData : aRandomData) if (tRandomData instanceof SubTag) { + if (tRandomData == SubTag.INVISIBLE) { + mVisibleItems.set(aID, false); + continue; + } + if (tRandomData == SubTag.NO_UNIFICATION) { + GT_OreDictUnificator.addToBlacklist(rStack); + continue; } + } // now check for the rest - for (Object tRandomData : aRandomData) - if (tRandomData != null) { - boolean tUseOreDict = true; - if (tRandomData instanceof IFoodStat) { - setFoodBehavior(mOffset + aID, (IFoodStat) tRandomData); - 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); - } - tUseOreDict = false; - } - if (tRandomData instanceof IItemBehaviour) { - addItemBehavior(mOffset + aID, (IItemBehaviour<GT_MetaBase_Item>) tRandomData); - tUseOreDict = false; - } - if (tRandomData instanceof IItemContainer) { - ((IItemContainer) tRandomData).set(rStack); - tUseOreDict = false; - } - if (tRandomData instanceof SubTag) { - continue; - } - if (tRandomData instanceof TC_AspectStack) { - ((TC_AspectStack) tRandomData).addToAspectList(tAspects); - continue; - } - if (tRandomData instanceof ItemData) { - if (GT_Utility.isStringValid(tRandomData)) - GT_OreDictUnificator.registerOre(tRandomData, rStack); - else GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData); - continue; - } - if (tUseOreDict) { - GT_OreDictUnificator.registerOre(tRandomData, rStack); - continue; + for (Object tRandomData : aRandomData) if (tRandomData != null) { + boolean tUseOreDict = true; + if (tRandomData instanceof IFoodStat) { + setFoodBehavior(mOffset + aID, (IFoodStat) tRandomData); + 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); } + tUseOreDict = false; + } + if (tRandomData instanceof IItemBehaviour) { + addItemBehavior(mOffset + aID, (IItemBehaviour<GT_MetaBase_Item>) tRandomData); + tUseOreDict = false; } + if (tRandomData instanceof IItemContainer) { + ((IItemContainer) tRandomData).set(rStack); + tUseOreDict = false; + } + if (tRandomData instanceof SubTag) { + continue; + } + if (tRandomData instanceof TC_AspectStack) { + ((TC_AspectStack) tRandomData).addToAspectList(tAspects); + continue; + } + if (tRandomData instanceof ItemData) { + if (GT_Utility.isStringValid(tRandomData)) GT_OreDictUnificator.registerOre(tRandomData, rStack); + else GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData); + continue; + } + if (tUseOreDict) { + GT_OreDictUnificator.registerOre(tRandomData, rStack); + continue; + } + } if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); return rStack; @@ -210,43 +211,37 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior) * @param aTransferLimit Transfer Limit. * @param aTier The electric Tier. - * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0). - * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this) - * Use -2 if you want to make this Battery dischargeable. - * Use -3 if you want to make this Battery charge/discharge-able. + * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0). Use -1 if you want to + * make this Battery chargeable (the use and canUse Functions will still discharge if you just + * use this) Use -2 if you want to make this Battery dischargeable. 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}); - if (aMetaValue >= mOffset && aUseAnimations) - mIconList[aMetaValue - mOffset] = Arrays.copyOf( - mIconList[aMetaValue - mOffset], Math.max(9, mIconList[aMetaValue - mOffset].length)); + 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)); } return this; } /** * - * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] - * @param aCapacity fluid capacity in L or mb - * @param aStacksize item stack size + * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] + * @param aCapacity fluid capacity in L or mb + * @param aStacksize item stack size * @return the Item itself for convenience in constructing. */ 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; } @@ -304,15 +299,18 @@ 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); } @@ -323,8 +321,7 @@ 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 + return tStat == null ? null : new FoodValues(tStat.getFoodLevel(this, aStack, null), tStat.getSaturation(this, aStack, null)); } @@ -332,36 +329,34 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements @SideOnly(Side.CLIENT) public void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aList) { int j = mEnabledItems.length(); - for (int i = 0; i < j; i++) - if (mVisibleItems.get(i) || (D1 && mEnabledItems.get(i))) { - Long[] tStats = mElectricStats.get((short) (mOffset + i)); - if (tStats != null && tStats[3] < 0) { - ItemStack tStack = new ItemStack(this, 1, mOffset + i); - setCharge(tStack, Math.abs(tStats[0])); - isItemStackUsable(tStack); - aList.add(tStack); - } - if (tStats == null || tStats[3] != -2) { - ItemStack tStack = new ItemStack(this, 1, mOffset + i); - isItemStackUsable(tStack); - aList.add(tStack); - } + for (int i = 0; i < j; i++) if (mVisibleItems.get(i) || (D1 && mEnabledItems.get(i))) { + Long[] tStats = mElectricStats.get((short) (mOffset + i)); + if (tStats != null && tStats[3] < 0) { + ItemStack tStack = new ItemStack(this, 1, mOffset + i); + setCharge(tStack, Math.abs(tStats[0])); + isItemStackUsable(tStack); + aList.add(tStack); + } + if (tStats == null || tStats[3] != -2) { + ItemStack tStack = new ItemStack(this, 1, mOffset + i); + isItemStackUsable(tStack); + aList.add(tStack); } + } } @Override @SideOnly(Side.CLIENT) public final void registerIcons(IIconRegister aIconRegister) { short j = (short) mEnabledItems.length(); - 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][0] = aIconRegister.registerIcon( - RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); + 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][0] = aIconRegister + .registerIcon(RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); + } } @Override 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 62aae22e24..f33d7a4f2e 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 @@ -2,6 +2,13 @@ package gregtech.api.items; import static gregtech.api.enums.GT_Values.M; +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 cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -11,23 +18,21 @@ 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; /** * @author Gregorius Techneticies * <p/> * One Item for everything! * <p/> - * This brilliant Item Class is used for automatically generating all possible variations of Material Items, like Dusts, Ingots, Gems, Plates and similar. - * It saves me a ton of work, when adding Items, because I always have to make a new Item SubType for each OreDict Prefix, when adding a new Material. + * This brilliant Item Class is used for automatically generating all possible variations of Material Items, + * like Dusts, Ingots, Gems, Plates and similar. It saves me a ton of work, when adding Items, because I always + * have to make a new Item SubType for each OreDict Prefix, when adding a new Material. * <p/> - * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom defined, just to save space and MetaData. + * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom + * defined, just to save space and MetaData. * <p/> - * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike Item. + * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike + * Item. */ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { @@ -39,13 +44,13 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { * * @param aUnlocalized The Unlocalized Name of this Item. * @param aGeneratedPrefix The OreDict Prefix you want to have generated. - * @param aIconSetIndex The TextureSet Index to be used. -1 for Defaulting to the Data contained in the Prefix. (this is only to be used for selecting the Icon in getIconContainer, nothing else) + * @param aIconSetIndex The TextureSet Index to be used. -1 for Defaulting to the Data contained in the Prefix. + * (this is only to be used for selecting the Icon in getIconContainer, nothing else) */ public GT_MetaGenerated_Item_X01(String aUnlocalized, OrePrefixes aGeneratedPrefix, int aIconSetIndex) { super(aUnlocalized, (short) 32000, (short) 766); mPrefix = aGeneratedPrefix; - mIconSetIndex = aIconSetIndex >= 0 - ? aIconSetIndex + mIconSetIndex = aIconSetIndex >= 0 ? aIconSetIndex : aGeneratedPrefix.mTextureIndex >= 0 ? aGeneratedPrefix.mTextureIndex : 0; for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) { @@ -57,11 +62,11 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { ItemStack tStack = new ItemStack(this, 1, i); GT_LanguageManager.addStringLocalization( getUnlocalizedName(tStack) + ".name", - GT_LanguageManager.i18nPlaceholder - ? getDefaultLocalizationFormat(tPrefix, tMaterial, i) + GT_LanguageManager.i18nPlaceholder ? getDefaultLocalizationFormat(tPrefix, tMaterial, i) : getDefaultLocalization(tPrefix, tMaterial, i)); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M)); + getUnlocalizedName(tStack) + ".tooltip", + tMaterial.getToolTip(tPrefix.mMaterialAmount / M)); String tOreName = getOreDictString(tPrefix, tMaterial); tPrefix = OrePrefixes.getOrePrefix(tOreName); if (tPrefix != null && tPrefix.mIsUnificatable) { @@ -98,7 +103,8 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { /** * @param aPrefix always != null * @param aMaterial always != null - * @param aDoShowAllItems this is the Configuration Setting of the User, if he wants to see all the Stuff like Tiny Dusts or Crushed Ores as well. + * @param aDoShowAllItems this is the Configuration Setting of the User, if he wants to see all the Stuff like Tiny + * Dusts or Crushed Ores as well. * @return if this Item should be visible in NEI or Creative */ public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { @@ -142,30 +148,31 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { 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; + && 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; + && 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)) { - ItemStack tStack = new ItemStack(this, 1, i); - isItemStackUsable(tStack); - aList.add(tStack); - } + 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); + } super.getSubItems(aItem, aCreativeTab, aList); } @@ -179,15 +186,13 @@ 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] + 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) + return getDamage(aStack) < mOffset ? Math.min(super.getItemStackLimit(aStack), mPrefix.mDefaultStackSize) : super.getItemStackLimit(aStack); } 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 c0f7b6b3c9..a3c5814dbf 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 @@ -2,6 +2,14 @@ package gregtech.api.items; import static gregtech.api.enums.GT_Values.M; +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 cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -13,24 +21,21 @@ 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; /** * @author Gregorius Techneticies * <p/> * One Item for everything! * <p/> - * This brilliant Item Class is used for automatically generating all possible variations of Material Items, like Dusts, Ingots, Gems, Plates and similar. - * It saves me a ton of work, when adding Items, because I always have to make a new Item SubType for each OreDict Prefix, when adding a new Material. + * This brilliant Item Class is used for automatically generating all possible variations of Material Items, + * like Dusts, Ingots, Gems, Plates and similar. It saves me a ton of work, when adding Items, because I always + * have to make a new Item SubType for each OreDict Prefix, when adding a new Material. * <p/> - * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom defined, just to save space and MetaData. + * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom + * defined, just to save space and MetaData. * <p/> - * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike Item. + * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike + * Item. */ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { @@ -55,19 +60,18 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { ItemStack tStack = new ItemStack(this, 1, i); GT_LanguageManager.addStringLocalization( getUnlocalizedName(tStack) + ".name", - GT_LanguageManager.i18nPlaceholder - ? getDefaultLocalizationFormat(tPrefix, tMaterial, i) + GT_LanguageManager.i18nPlaceholder ? getDefaultLocalizationFormat(tPrefix, tMaterial, i) : getDefaultLocalization(tPrefix, tMaterial, i)); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M)); + 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.Lead || tMaterial == Materials.Tin || tMaterial == Materials.SolderingAlloy)) { GregTech_API.sSolderingMetalList.add(tStack); GT_ModHandler.registerBoxableItemToToolBox(tStack); @@ -128,15 +132,16 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { */ 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; + && mGeneratedPrefixList[aMetaData / 1000].mTextureIndex >= 0 + ? aMaterial.mIconSet.mTextures[mGeneratedPrefixList[aMetaData / 1000].mTextureIndex] + : null; } /** * @param aPrefix always != null * @param aMaterial always != null - * @param aDoShowAllItems this is the Configuration Setting of the User, if he wants to see all the Stuff like Tiny Dusts or Crushed Ores as well. + * @param aDoShowAllItems this is the Configuration Setting of the User, if he wants to see all the Stuff like Tiny + * Dusts or Crushed Ores as well. * @return if this Item should be visible in NEI or Creative */ public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { @@ -168,15 +173,13 @@ 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 + 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 + return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null ? null : GregTech_API.sGeneratedMaterials[aMetaData % 1000].renderer; } 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 ec28d04eb9..7ee4b23628 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java @@ -3,32 +3,15 @@ package gregtech.api.items; import static gregtech.api.util.GT_Utility.formatNumbers; 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; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import crazypants.enderio.api.tool.ITool; -import forestry.api.arboriculture.IToolGrafter; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enchants.Enchantment_Radioactivity; -import gregtech.api.enums.Materials; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.interfaces.IDamagableItem; -import gregtech.api.interfaces.IToolStats; -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 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 mrtjp.projectred.api.IScrewdriver; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -55,28 +38,50 @@ import net.minecraftforge.common.IShearable; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.event.world.BlockEvent; +import buildcraft.api.tools.IToolWrench; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import crazypants.enderio.api.tool.ITool; +import forestry.api.arboriculture.IToolGrafter; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enchants.Enchantment_Radioactivity; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.interfaces.IDamagableItem; +import gregtech.api.interfaces.IToolStats; +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 gregtech.common.tools.GT_Tool_Turbine; + /** * 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); + * 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 = "ForestryAPI|arboriculture"), - @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = "RailcraftAPI|items"), - @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraftAPI|tools"), - @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIOAPI|Tools"), - @Optional.Interface(iface = "mrtjp.projectred.api.IScrewdriver", modid = "ProjRed|Core"), - }) + @Optional.Interface( + iface = "forestry.api.arboriculture.IToolGrafter", + modid = "ForestryAPI|arboriculture"), + @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = "RailcraftAPI|items"), + @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraftAPI|tools"), + @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIOAPI|Tools"), + @Optional.Interface(iface = "mrtjp.projectred.api.IScrewdriver", modid = "ProjRed|Core"), }) public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements IDamagableItem, IToolGrafter, IToolCrowbar, IToolWrench, ITool, IScrewdriver { + /** - * 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. + * 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 ---------- */ @@ -149,23 +154,27 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item /** * This adds a Custom Item to the ending Range. * - * @param aID The Id of the assigned Tool Class [0 - 32765] (only even Numbers allowed! Uneven ID's are empty electric Items) + * @param aID The Id of the assigned Tool Class [0 - 32765] (only even Numbers allowed! Uneven + * ID's are empty electric Items) * @param aEnglish The Default Localized Name of the created Item - * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip + * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no + * ToolTip * @param aToolStats The Food Value of this Item. Can be null as well. - * @param aOreDictNamesAndAspects The OreDict Names you want to give the Item. Also used to assign Thaumcraft Aspects. + * @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) + ".name", aEnglish + " (Empty)"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + (aID + 1) + ".tooltip", "You need to recharge it"); + getUnlocalizedName() + "." + (aID + 1) + ".tooltip", + "You need to recharge it"); mToolStats.put((short) aID, aToolStats); mToolStats.put((short) (aID + 1), aToolStats); aToolStats.onStatsAddedToTool(this, aID); @@ -193,8 +202,8 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item * @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) { @@ -226,51 +235,31 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item * 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, + 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()); + 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()); } @Mod.EventHandler - public float onBlockBreakSpeedEvent( - float aDefault, - ItemStack aStack, - EntityPlayer aPlayer, - Block aBlock, - int aX, - int aY, - int aZ, - byte aMetaData, - PlayerEvent.BreakSpeed aEvent) { + 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 + return tStats == null ? aDefault : tStats.getMiningSpeed(aBlock, aMetaData, aDefault, aPlayer, aPlayer.worldObj, aX, aY, aZ); } @@ -315,27 +304,23 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item 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 + boolean tCriticalHit = aPlayer.fallDistance > 0.0F && !aPlayer.onGround && !aPlayer.isOnLadder() && !aPlayer.isInWater() && !aPlayer.isPotionActive(Potion.blindness) @@ -346,10 +331,9 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item 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, @@ -368,8 +352,8 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item 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()); } @@ -437,68 +421,63 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item // 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)); + 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 - + formatNumbers(tMaxDamage - getToolDamage(aStack)) + " ", - " " + formatNumbers(tMaxDamage)) - + EnumChatFormatting.GRAY); + EnumChatFormatting.GRAY + String.format( + transItem("001", "Durability: %s/%s"), + "" + EnumChatFormatting.GREEN + formatNumbers(tMaxDamage - getToolDamage(aStack)) + " ", + " " + formatNumbers(tMaxDamage)) + EnumChatFormatting.GRAY); aList.add( tOffset + 1, - EnumChatFormatting.GRAY - + String.format( - transItem("002", "%s lvl %s"), - tMaterial.mLocalizedName + EnumChatFormatting.YELLOW, - "" + getHarvestLevel(aStack, "")) - + EnumChatFormatting.GRAY); + 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); + + "%" + + EnumChatFormatting.GRAY); aList.add( tOffset + 3, - EnumChatFormatting.WHITE - + String.format( - transItem("006", "Optimal Steam flow: %s L/t"), - "" + EnumChatFormatting.GOLD - + formatNumbers(GT_Utility.safeInt((long) (Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() - * getPrimaryMaterial(aStack).mToolSpeed - * (1000 - * getPrimaryMaterial(aStack).mSteamMultiplier - / 20))))) - + EnumChatFormatting.GRAY)); + EnumChatFormatting.WHITE + String.format( + transItem("006", "Optimal Steam flow: %s L/t"), + "" + EnumChatFormatting.GOLD + + formatNumbers( + 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 - + formatNumbers(GT_Utility.safeInt((long) (Math.max( + EnumChatFormatting.WHITE + String.format( + transItem("900", "Energy from Optimal Steam Flow: %s EU/t"), + "" + EnumChatFormatting.GOLD + + formatNumbers( + 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)); + * (1000 * getPrimaryMaterial( + aStack).mSteamMultiplier / 20)) + * (50.0F + (10.0F * getToolCombatDamage(aStack))) + / 200))) + + EnumChatFormatting.GRAY)); { long[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); int aOptFlowLoose = (int) calculatedFlow[0]; @@ -506,65 +485,65 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item aList.add( tOffset + 5, - EnumChatFormatting.AQUA - + String.format( - transItem("500", "Turbine Efficiency (Loose): %s"), - "" + EnumChatFormatting.BLUE + aBaseEffLoose / 100 + "%" - + EnumChatFormatting.GRAY)); + 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 - + formatNumbers((aOptFlowLoose - * getPrimaryMaterial(aStack).mSteamMultiplier)) - + EnumChatFormatting.GRAY)); + EnumChatFormatting.AQUA + String.format( + transItem("501", "Optimal Steam flow (Loose): %s L/t"), + "" + EnumChatFormatting.GOLD + + formatNumbers( + (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 - + formatNumbers((aOptFlowLoose - * getPrimaryMaterial(aStack).mSteamMultiplier - / 10000) - * (aBaseEffLoose / 2)) - + EnumChatFormatting.GRAY)); + EnumChatFormatting.AQUA + String.format( + transItem("901", "Energy from Optimal Steam Flow (Loose): %s EU/t"), + "" + EnumChatFormatting.GOLD + + formatNumbers( + (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 - + formatNumbers(GT_Utility.safeInt((long) (Math.max( + EnumChatFormatting.LIGHT_PURPLE + String.format( + transItem("007", "Energy from Optimal Gas Flow: %s EU/t"), + "" + EnumChatFormatting.GOLD + + formatNumbers( + 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)); + * (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 - + formatNumbers(GT_Utility.safeInt((long) (Math.max( + EnumChatFormatting.LIGHT_PURPLE + String.format( + transItem("008", "Energy from Optimal Plasma Flow: %s EU/t"), + "" + EnumChatFormatting.GOLD + + formatNumbers( + 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)); + * (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)"); @@ -579,29 +558,23 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item } aList.add( tOffset + 11, - EnumChatFormatting.LIGHT_PURPLE - + String.format( - transItem("502", "Overflow Efficiency Tier: %s"), - "" + EnumChatFormatting.GOLD + overflowMultiplier + EnumChatFormatting.GRAY)); + EnumChatFormatting.LIGHT_PURPLE + String.format( + transItem("502", "Overflow Efficiency Tier: %s"), + "" + EnumChatFormatting.GOLD + overflowMultiplier + EnumChatFormatting.GRAY)); } else { aList.add( tOffset, - EnumChatFormatting.WHITE - + String.format( - transItem("001", "Durability: %s/%s"), - "" + EnumChatFormatting.GREEN - + formatNumbers(tMaxDamage - getToolDamage(aStack)) + " ", - " " + formatNumbers(tMaxDamage)) - + EnumChatFormatting.GRAY); + EnumChatFormatting.WHITE + String.format( + transItem("001", "Durability: %s/%s"), + "" + EnumChatFormatting.GREEN + formatNumbers(tMaxDamage - getToolDamage(aStack)) + " ", + " " + formatNumbers(tMaxDamage)) + EnumChatFormatting.GRAY); aList.add( tOffset + 1, - EnumChatFormatting.WHITE - + String.format( - transItem("002", "%s lvl %s"), - tMaterial.mLocalizedName + EnumChatFormatting.YELLOW, - "" + getHarvestLevel(aStack, "")) - + EnumChatFormatting.GRAY); + EnumChatFormatting.WHITE + String.format( + transItem("002", "%s lvl %s"), + tMaterial.mLocalizedName + EnumChatFormatting.YELLOW, + "" + getHarvestLevel(aStack, "")) + EnumChatFormatting.GRAY); aList.add( tOffset + 2, EnumChatFormatting.WHITE @@ -638,7 +611,9 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item aList.add( tOffset + 3, - EnumChatFormatting.RED + "Heat: " + aNBT.getInteger("Heat") + " K" + EnumChatFormatting.RED + "Heat: " + + aNBT.getInteger("Heat") + + " K" + EnumChatFormatting.GRAY); } } @@ -656,13 +631,8 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item NBTTagCompound aNBT = aStack.getTagCompound(); 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") - }; + if (aNBT != null && aNBT.getBoolean("Electric")) return new Long[] { aNBT.getLong("MaxCharge"), + aNBT.getLong("Voltage"), aNBT.getLong("Tier"), aNBT.getLong("SpecialData") }; } return null; } @@ -732,14 +702,15 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item } @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; } @@ -780,8 +751,7 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item @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) + return tStats != null && tStats.isGrafter() ? Math.min(100.0F, (1 + getHarvestLevel(aStack, "")) * 20.0F) : 0.0F; } @@ -920,43 +890,40 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item } Enchantment[] tEnchants = tStats.getEnchantments(aStack); int[] tLevels = tStats.getEnchantmentLevels(aStack); - 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])); - } + 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])); + } for (Entry<Integer, Integer> tEntry : tMap.entrySet()) { - if (tEntry.getKey() == 33 - || (tEntry.getKey() == 20 && tEntry.getValue() > 2) + 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) { - case weapon: - if (tStats.isWeapon()) tResult.put(tEntry.getKey(), tEntry.getValue()); - break; - case all: - tResult.put(tEntry.getKey(), tEntry.getValue()); - break; - case armor: - case armor_feet: - case armor_head: - case armor_legs: - case armor_torso: - break; - case bow: - if (tStats.isRangedWeapon()) tResult.put(tEntry.getKey(), tEntry.getValue()); - break; - case breakable: - break; - case fishing_rod: - break; - case digger: - if (tStats.isMiningTool()) tResult.put(tEntry.getKey(), tEntry.getValue()); - break; - } + else switch (Enchantment.enchantmentsList[tEntry.getKey()].type) { + case weapon: + if (tStats.isWeapon()) tResult.put(tEntry.getKey(), tEntry.getValue()); + break; + case all: + tResult.put(tEntry.getKey(), tEntry.getValue()); + break; + case armor: + case armor_feet: + case armor_head: + case armor_legs: + case armor_torso: + break; + case bow: + if (tStats.isRangedWeapon()) tResult.put(tEntry.getKey(), tEntry.getValue()); + break; + case breakable: + break; + case fishing_rod: + break; + case digger: + if (tStats.isMiningTool()) tResult.put(tEntry.getKey(), tEntry.getValue()); + break; + } } EnchantmentHelper.setEnchantments(tResult, aStack); return true; 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 95c584fd6a..3abfad3347 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java @@ -1,18 +1,21 @@ package gregtech.api.items; +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 gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.util.GT_Utility; import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; import ic2.core.IC2Potion; -import java.util.ArrayList; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implements IReactorComponent { + private static final int MYSTERIOUS_MULTIPLIER_HEAT = 4; public final int numberOfCells; public final float sEnergy; @@ -21,16 +24,8 @@ 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; @@ -43,14 +38,18 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement if (aDepleted != null && aEnergy > 0 && aHeat > 0) { // avoid adding depleted cells to recipe map GT_Values.RA.addIC2ReactorFuelCell( - new ItemStack(this), aDepleted, aMox, aHeat * MYSTERIOUS_MULTIPLIER_HEAT, aEnergy, aCellcount); + new ItemStack(this), + aDepleted, + aMox, + aHeat * MYSTERIOUS_MULTIPLIER_HEAT, + aEnergy, + aCellcount); } } 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)) + if ((other != null) && ((other.getItem() instanceof IReactorComponent)) && (((IReactorComponent) other.getItem()) .acceptUraniumPulse(reactor, other, me, x, y, mex, mey, heatrun))) { return 1; @@ -79,7 +78,7 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement + 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) * MYSTERIOUS_MULTIPLIER_HEAT; @@ -95,13 +94,12 @@ 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); } @@ -129,23 +127,15 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement 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)) + 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) { + 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(); @@ -194,6 +184,7 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement } private class ItemStackCoord { + public ItemStack stack; public int x; public int y; 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 61353c7c2a..4ec9ce1990 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java @@ -2,16 +2,19 @@ package gregtech.api.items; import static gregtech.api.util.GT_Utility.formatNumbers; -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 gregtech.common.items.GT_DepletetCell_Item; +import ic2.api.item.IBoxable; +import ic2.core.util.StackUtil; + public class GT_RadioactiveCell_Item extends GT_Generic_Item implements IBoxable { + protected int cellCount; protected int maxDmg; protected int dura; @@ -150,10 +153,10 @@ public class GT_RadioactiveCell_Item extends GT_Generic_Item implements IBoxable color2 = EnumChatFormatting.DARK_GRAY; break; } - EnumChatFormatting color1 = - this instanceof GT_DepletetCell_Item ? color2 = EnumChatFormatting.DARK_GRAY : EnumChatFormatting.WHITE; - aList.add(color1 - + String.format( + EnumChatFormatting color1 = this instanceof GT_DepletetCell_Item ? color2 = EnumChatFormatting.DARK_GRAY + : EnumChatFormatting.WHITE; + aList.add( + color1 + String.format( transItem("001", "Durability: %s/%s"), "" + color2 + formatNumbers(this.maxDmg - getDurabilityOfStack(aStack)) + color1, "" + formatNumbers(this.maxDmg))); 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 f62eed1a6e..41581b94f8 100644 --- a/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java +++ b/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java @@ -2,18 +2,21 @@ 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 gregtech.api.GregTech_API; +import gregtech.api.enums.ToolDictNames; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; + public class GT_SolderingTool_Item extends GT_Tool_Item { - public GT_SolderingTool_Item( - String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDischargedGTID) { + + public GT_SolderingTool_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, + int aDischargedGTID) { super( aUnlocalized, aEnglish, @@ -25,32 +28,27 @@ public class GT_SolderingTool_Item extends GT_Tool_Item { 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<String> 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 23bf3d87ad..7614ea2fe9 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 @@ -1,64 +1,51 @@ package gregtech.api.items; -import gregtech.api.enums.SoundResource; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import gregtech.api.enums.SoundResource; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + 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); /* - addToEffectiveList(EntityCaveSpider.class.getName()); - addToEffectiveList(EntitySpider.class.getName()); - addToEffectiveList("EntityTFHedgeSpider"); - addToEffectiveList("EntityTFKingSpider"); - addToEffectiveList("EntityTFSwarmSpider"); - addToEffectiveList("EntityTFTowerBroodling"); - addToEffectiveList("EntityTFFireBeetle"); - addToEffectiveList("EntityTFSlimeBeetle"); - setCraftingSound(Sounds.IC2_TOOLS_PAINTER); - setBreakingSound(Sounds.IC2_TOOLS_PAINTER); - setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); - setUsageAmounts(8, 4, 1);*/ + super( + aUnlocalized, + aEnglish, + "A very 'buggy' Spray", + aMaxDamage, + aEntityDamage, + true); /* + * addToEffectiveList(EntityCaveSpider.class.getName()); + * addToEffectiveList(EntitySpider.class.getName()); addToEffectiveList("EntityTFHedgeSpider"); + * addToEffectiveList("EntityTFKingSpider"); addToEffectiveList("EntityTFSwarmSpider"); + * addToEffectiveList("EntityTFTowerBroodling"); addToEffectiveList("EntityTFFireBeetle"); + * addToEffectiveList("EntityTFSlimeBeetle"); setCraftingSound(Sounds.IC2_TOOLS_PAINTER); + * setBreakingSound(Sounds.IC2_TOOLS_PAINTER); setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); + * setUsageAmounts(8, 4, 1); + */ } /* + * @Override public void onHitEntity(Entity aEntity) { if (aEntity instanceof EntityLiving) { + * ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 60, 1, false)); + * ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.confusion.getId(), 600, 1, false)); } } + * @Override public ItemStack getEmptiedItem(ItemStack aStack) { return ItemList.Spray_Empty.get(1); } + */ @Override - public void onHitEntity(Entity aEntity) { - if (aEntity instanceof EntityLiving) { - ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 60, 1, false)); - ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.confusion.getId(), 600, 1, false)); - } - } - - @Override - public ItemStack getEmptiedItem(ItemStack aStack) { - return ItemList.Spray_Empty.get(1); - } - */ - @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 { @@ -71,7 +58,7 @@ public class GT_Spray_Bug_Item extends GT_Tool_Item { } } } catch (Throwable e) { - /*Do nothing*/ + /* 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 c2d4ff1231..ca77340b34 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 @@ -2,11 +2,6 @@ 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; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -16,58 +11,42 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.enums.SoundResource; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + 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); /* - setCraftingSound(Sounds.IC2_TOOLS_PAINTER); - setBreakingSound(Sounds.IC2_TOOLS_PAINTER); - setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); - setUsageAmounts(25, 3, 1);*/ + super( + aUnlocalized, + aEnglish, + "Precision Spray", + aMaxDamage, + aEntityDamage, + true); /* + * setCraftingSound(Sounds.IC2_TOOLS_PAINTER); setBreakingSound(Sounds.IC2_TOOLS_PAINTER); + * setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); setUsageAmounts(25, 3, 1); + */ } /* + * @Override public ItemStack getEmptiedItem(ItemStack aStack) { return ItemList.Spray_Empty.get(1); } public void + * switchMode(ItemStack aStack, EntityPlayer aPlayer) { setMode(aStack, (getMode(aStack) + 1) % 3); switch + * (getMode(aStack)) { case 0: GT_Utility.sendChatToPlayer(aPlayer, "Single Block Mode"); break; case 1: + * GT_Utility.sendChatToPlayer(aPlayer, "4m Line Mode"); break; case 2: GT_Utility.sendChatToPlayer(aPlayer, + * "3mx3m Area Mode"); break; } } + * @Override public void addAdditionalToolTips(List aList, ItemStack aStack) { super.addAdditionalToolTips(aList, + * aStack); switch (getMode(aStack)) { case 0: aList.add("Single Block Mode"); break; case 1: + * aList.add("4m Line Mode"); break; case 2: aList.add("3mx3m Area Mode"); break; } } + * @Override public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { if + * (aPlayer.isSneaking()) switchMode(aStack, aPlayer); return super.onItemRightClick(aStack, aWorld, aPlayer); } + */ @Override - public ItemStack getEmptiedItem(ItemStack aStack) { - return ItemList.Spray_Empty.get(1); - } - - public void switchMode(ItemStack aStack, EntityPlayer aPlayer) { - setMode(aStack, (getMode(aStack) + 1) % 3); - switch (getMode(aStack)) { - case 0: GT_Utility.sendChatToPlayer(aPlayer, "Single Block Mode"); break; - case 1: GT_Utility.sendChatToPlayer(aPlayer, "4m Line Mode"); break; - case 2: GT_Utility.sendChatToPlayer(aPlayer, "3mx3m Area Mode"); break; - } - } - - @Override - public void addAdditionalToolTips(List aList, ItemStack aStack) { - super.addAdditionalToolTips(aList, aStack); - switch (getMode(aStack)) { - case 0: aList.add("Single Block Mode"); break; - case 1: aList.add("4m Line Mode"); break; - case 2: aList.add("3mx3m Area Mode"); break; - } - } - - @Override - public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - if (aPlayer.isSneaking()) switchMode(aStack, aPlayer); - return super.onItemRightClick(aStack, aWorld, aPlayer); - } - */ - @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) { @@ -75,7 +54,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 { @@ -142,10 +121,15 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { 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); + 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); + aX, + aY, + aZ, + GT_Utility.getBlockFromStack(tStack), + tStack.getItemDamage(), + 3); } else { if (i == 0) return false; break; @@ -156,8 +140,7 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { } return true; case 2: - boolean temp = false, - tXFactor = (ForgeDirection.getOrientation(tSide).offsetX == 0), + boolean temp = false, tXFactor = (ForgeDirection.getOrientation(tSide).offsetX == 0), tYFactor = (ForgeDirection.getOrientation(tSide).offsetY == 0), tZFactor = (ForgeDirection.getOrientation(tSide).offsetZ == 0); @@ -165,29 +148,34 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { aY -= (tYFactor ? 1 : 0); aZ -= (tZFactor ? 1 : 0); - 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_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); - temp = true; - } else { - break; - } + 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_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); + temp = true; + } else { + break; } } + } return temp; } } 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 bbcd170db0..b5902f2d52 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 @@ -2,11 +2,6 @@ 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; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -14,34 +9,37 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import gregtech.api.enums.SoundResource; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + 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); /* - setCraftingSound(Sounds.IC2_TOOLS_PAINTER); - setBreakingSound(Sounds.IC2_TOOLS_PAINTER); - setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); - setUsageAmounts(16, 3, 1);*/ + super( + aUnlocalized, + aEnglish, + "Construction Foam Hardener", + aMaxDamage, + aEntityDamage, + true); /* + * setCraftingSound(Sounds.IC2_TOOLS_PAINTER); setBreakingSound(Sounds.IC2_TOOLS_PAINTER); + * setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); setUsageAmounts(16, 3, 1); + */ } @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 { @@ -61,8 +59,7 @@ public class GT_Spray_Hardener_Item extends GT_Tool_Item { ItemStack tStack1 = GT_ModHandler.getIC2Item("constructionFoam", 1), tStack2 = GT_ModHandler.getIC2Item("constructionFoamWall", 1); - if (tStack1 != null - && tStack1.isItemEqual(new ItemStack(aBlock)) + if (tStack1 != null && tStack1.isItemEqual(new ItemStack(aBlock)) && tStack2 != null && tStack2.getItem() instanceof ItemBlock) { if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { @@ -76,8 +73,8 @@ public class GT_Spray_Hardener_Item extends GT_Tool_Item { && (((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 e219220034..9056a6a90d 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 @@ -1,43 +1,41 @@ package gregtech.api.items; -import gregtech.api.enums.SoundResource; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import gregtech.api.enums.SoundResource; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + 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); /* - setCraftingSound(Sounds.IC2_TOOLS_PAINTER); - setBreakingSound(Sounds.IC2_TOOLS_PAINTER); - setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); - setUsageAmounts(20, 3, 1);*/ + 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); setUsageAmounts(20, 3, 1); + */ } @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 { @@ -50,7 +48,7 @@ public class GT_Spray_Hydration_Item extends GT_Tool_Item { return true; } } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } if (aTileEntity instanceof IGregTechTileEntity) { 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 cb21ce60b6..9ccc442b53 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 @@ -2,12 +2,8 @@ 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; @@ -15,51 +11,48 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +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; + 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); /* - addToEffectiveList(EntitySlime.class.getName()); - addToEffectiveList("BlueSlime"); - addToEffectiveList("SlimeClone"); - addToEffectiveList("MetalSlime"); - addToEffectiveList("EntityTFFireBeetle"); - addToEffectiveList("EntityTFMazeSlime"); - addToEffectiveList("EntityTFSlimeBeetle"); - setCraftingSound(Sounds.IC2_TOOLS_PAINTER); - setBreakingSound(Sounds.IC2_TOOLS_PAINTER); - setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); - setUsageAmounts(4, 16, 1);*/ + super( + aUnlocalized, + aEnglish, + "Very effective against Slimes", + aMaxDamage, + aEntityDamage, + true); /* + * addToEffectiveList(EntitySlime.class.getName()); addToEffectiveList("BlueSlime"); + * addToEffectiveList("SlimeClone"); addToEffectiveList("MetalSlime"); + * addToEffectiveList("EntityTFFireBeetle"); addToEffectiveList("EntityTFMazeSlime"); + * addToEffectiveList("EntityTFSlimeBeetle"); setCraftingSound(Sounds.IC2_TOOLS_PAINTER); + * setBreakingSound(Sounds.IC2_TOOLS_PAINTER); 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}); + 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; @@ -70,7 +63,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 685da248a1..a70ebb4bfb 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,62 +1,62 @@ 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 gregtech.api.util.GT_LanguageManager; + 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); /* - setCraftingSound(GregTech_API.sSoundList.get(102)); - setBreakingSound(GregTech_API.sSoundList.get(102)); - setEntityHitSound(GregTech_API.sSoundList.get(102)); - setUsageAmounts(1, 8, 1);*/ + 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)); setUsageAmounts(1, 8, 1); + */ } @Override public void addAdditionalToolTips(List<String> 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 78df3c9171..9689964396 100644 --- a/src/main/java/gregtech/api/items/GT_Tool_Item.java +++ b/src/main/java/gregtech/api/items/GT_Tool_Item.java @@ -1,31 +1,21 @@ package gregtech.api.items; -import gregtech.api.util.GT_ModHandler; import net.minecraft.item.ItemStack; +import gregtech.api.util.GT_ModHandler; + /** * 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, + + 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) { + public GT_Tool_Item(String aUnlocalized, String aEnglish, String aTooltip, int aMaxDamage, int aEntityDamage, + boolean aSwingIfUsed, int aChargedGTID, int aDisChargedGTID) { this( aUnlocalized, aEnglish, @@ -39,17 +29,8 @@ public class GT_Tool_Item extends GT_Generic_Item { 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) { + 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, diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java index 31a341040e..335639c9e3 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java @@ -3,6 +3,24 @@ package gregtech.api.metatileentity; import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.GT_Values.NW; +import java.util.*; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.SoundResource; @@ -23,22 +41,6 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.covers.CoverInfo; -import java.util.*; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -47,16 +49,12 @@ import net.minecraftforge.fluids.IFluidHandler; */ 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, + 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; @@ -147,7 +145,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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); @@ -199,8 +197,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity // 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); + mConnections = (byte) ((mConnections & ~IConnectable.HAS_FRESHFOAM) + | IConnectable.HAS_HARDENEDFOAM); } if (mTickTimer > 12 && oldConnections != mConnections) GregTech_API.causeCableUpdate(worldObj, xCoord, yCoord, zCoord); @@ -236,8 +234,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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) + 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) @@ -259,17 +256,24 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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) + 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()); + 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; @@ -306,18 +310,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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; @@ -391,13 +385,15 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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) { @@ -409,26 +405,30 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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"); - return mMetaTileEntity != null - ? mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList) + return mMetaTileEntity != null ? mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList) : new ArrayList<>(); } @@ -469,9 +469,9 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity public void setInventorySlotContents(int aIndex, ItemStack aStack) { markDirty(); mInventoryChanged = true; - if (canAccessData()) - mMetaTileEntity.setInventorySlotContents( - aIndex, worldObj.isRemote ? aStack : GT_OreDictUnificator.setStack(true, aStack)); + if (canAccessData()) mMetaTileEntity.setInventorySlotContents( + aIndex, + worldObj.isRemote ? aStack : GT_OreDictUnificator.setStack(true, aStack)); } @Override @@ -489,18 +489,17 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity @Override public void openInventory() { - /*Do nothing*/ + /* Do nothing */ } @Override public void closeInventory() { - /*Do nothing*/ + /* Do nothing */ } @Override public boolean isUseableByPlayer(EntityPlayer aPlayer) { - return hasValidMetaTileEntity() - && mTickTimer > 40 + return hasValidMetaTileEntity() && mTickTimer > 40 && getTileEntityOffset(0, 0, 0) == this && aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 && mMetaTileEntity.isAccessAllowed(aPlayer); @@ -606,7 +605,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity @Override public void setWorkDataValue(byte aValue) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -626,7 +625,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity @Override public void setActive(boolean aActive) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -707,7 +706,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity @Override public ITexture[] getTexture(Block aBlock, byte aSide) { final ITexture rIcon = getCoverTexture(aSide); - if (rIcon != null) return new ITexture[] {rIcon}; + if (rIcon != null) return new ITexture[] { rIcon }; return getTextureUncovered(aSide); } @@ -737,14 +736,13 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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), - tConnections == 0 || (tConnections & (1 << aSide)) != 0, - getOutputRedstoneSignal(aSide) > 0); + if (hasValidMetaTileEntity()) return mMetaTileEntity.getTexture( + this, + aSide, + tConnections, + (byte) (mColor - 1), + tConnections == 0 || (tConnections & (1 << aSide)) != 0, + getOutputRedstoneSignal(aSide) > 0); return Textures.BlockIcons.ERROR_RENDERING; } @@ -785,8 +783,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity if (isClientSide()) { // 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 (getCoverInfoAtSide(tSide).hasCoverGUI()); } else if (getCoverBehaviorAtSideNew(aSide).onCoverRightclickClient(aSide, this, aPlayer, aX, aY, aZ)) { return true; @@ -808,7 +806,13 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity mMetaTileEntity.markDirty(); GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); GT_Utility.sendSoundToPlayers( - worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } return true; } @@ -821,16 +825,29 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity mMetaTileEntity.onScrewdriverRightClick(tSide, aPlayer, aX, aY, aZ); mMetaTileEntity.markDirty(); GT_Utility.sendSoundToPlayers( - worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } } else { if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { setCoverDataAtSide( - aSide, getCoverInfoAtSide(aSide).onCoverScrewdriverClick(aPlayer, aX, aY, aZ)); + aSide, + getCoverInfoAtSide(aSide).onCoverScrewdriverClick(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); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } } return true; @@ -838,7 +855,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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, + // GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(1), 1.0F, -1, xCoord, yCoord, // zCoord); // } return true; @@ -852,11 +869,16 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity GT_Utility.sendChatToPlayer( aPlayer, GT_Utility.trans("090", "Machine Processing: ") - + (isAllowedToWork() - ? GT_Utility.trans("088", "Enabled") + + (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); + worldObj, + SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } return true; } @@ -866,7 +888,13 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity mMetaTileEntity.markDirty(); // logic handled internally GT_Utility.sendSoundToPlayers( - worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } doEnetUpdate(); return true; @@ -877,20 +905,30 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity mMetaTileEntity.markDirty(); // logic handled internally GT_Utility.sendSoundToPlayers( - worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 1.0F, -1, xCoord, yCoord, zCoord); + 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("091", "Redstone Output at Side ") + tSide + GT_Utility.trans("092", " set to: ") - + ((mStrongRedstone & (1 << tSide)) != 0 - ? GT_Utility.trans("093", "Strong") + + ((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); + worldObj, + SoundResource.IC2_TOOLS_BATTERY_USE, + 3.0F, + -1, + xCoord, + yCoord, + zCoord); issueBlockUpdate(); } doEnetUpdate(); @@ -905,13 +943,19 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity if (coverInfo.getCoverID() == 0) { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCovers.keySet())) { if (GregTech_API.getCoverBehaviorNew(tCurrentItem) - .isCoverPlaceable(coverSide, tCurrentItem, this) + .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); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } return true; } @@ -919,7 +963,13 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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); + worldObj, + SoundResource.RANDOM_BREAK, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); dropCover(coverSide, aSide, false); mMetaTileEntity.markDirty(); } @@ -990,8 +1040,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity } /** - * returns all valid Inventory Slots, no matter which Side (Unless it's covered). - * The Side Stuff is done in the following two Functions. + * returns all valid Inventory Slots, no matter which Side (Unless it's covered). The Side Stuff is done in the + * following two Functions. */ @Override public int[] getAccessibleSlotsFromSide(int aSide) { @@ -1006,8 +1056,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity */ @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return canAccessData() - && getCoverInfoAtSide((byte) aSide).letsItemsIn(aIndex) + return canAccessData() && getCoverInfoAtSide((byte) aSide).letsItemsIn(aIndex) && mMetaTileEntity.canInsertItem(aIndex, aStack, aSide); } @@ -1016,15 +1065,12 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity */ @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 @@ -1154,21 +1200,20 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity // the pipe if (tTileEntity != null && !mMetaTileEntity.isConnectedAtSide((byte) aSide.ordinal())) return false; - if (isFill - && mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) - && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidIn(aFluid)) return true; + if (isFill && mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) + && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidIn(aFluid)) + return true; - if (!isFill - && mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) - && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidOut(aFluid)) return true; + if (!isFill && mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidOut(aFluid)) + return true; return false; } @Override public int fill(ForgeDirection aSide, FluidStack aFluidStack, boolean doFill) { - if (mTickTimer > 5 - && canAccessData() + if (mTickTimer > 5 && canAccessData() && canMoveFluidOnSide(aSide, aFluidStack == null ? null : aFluidStack.getFluid(), true)) return mMetaTileEntity.fill(aSide, aFluidStack, doFill); return 0; @@ -1176,21 +1221,18 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity @Override public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { - if (mTickTimer > 5 - && canAccessData() + if (mTickTimer > 5 && canAccessData() && canMoveFluidOnSide( aSide, - mMetaTileEntity.getFluid() == null - ? null - : mMetaTileEntity.getFluid().getFluid(), - false)) return mMetaTileEntity.drain(aSide, maxDrain, doDrain); + 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() + if (mTickTimer > 5 && canAccessData() && canMoveFluidOnSide(aSide, aFluidStack == null ? null : aFluidStack.getFluid(), false)) return mMetaTileEntity.drain(aSide, aFluidStack, doDrain); return null; @@ -1213,12 +1255,11 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { final CoverInfo coverInfo = getCoverInfoAtSide((byte) aSide.ordinal()); - if (canAccessData() - && (aSide == ForgeDirection.UNKNOWN - || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) && coverInfo.letsFluidIn(null)) - || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) && coverInfo.letsFluidOut(null)) - // Doesn't need to be connected to get Tank Info -- otherwise things can't connect - )) return mMetaTileEntity.getTankInfo(aSide); + if (canAccessData() && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) && coverInfo.letsFluidIn(null)) + || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) && coverInfo.letsFluidOut(null)) + // Doesn't need to be connected to get Tank Info -- otherwise things can't connect + )) return mMetaTileEntity.getTankInfo(aSide); return new FluidTankInfo[] {}; } @@ -1232,9 +1273,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity 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; @@ -1321,7 +1361,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity // 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. + // (This caused issues with AE2 GTEU p2p connections. ((MetaPipeEntity) meta).setCheckConnections(); } } @@ -1333,14 +1373,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity } @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 1e8ffa0994..7408701f16 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -6,6 +6,35 @@ 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 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; +import net.minecraft.block.BlockFire; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.EnumSkyBlock; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; + import appeng.api.networking.IGridNode; import appeng.api.networking.security.IActionHost; import appeng.api.util.AECableType; @@ -14,10 +43,12 @@ import appeng.me.helpers.AENetworkProxy; 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.IAlignmentProvider; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructableProvider; + import cpw.mods.fml.common.Optional; import cpw.mods.fml.relauncher.ReflectionHelper; import gregtech.GT_Mod; @@ -43,31 +74,6 @@ import gregtech.api.util.*; import gregtech.common.GT_Pollution; import gregtech.common.covers.CoverInfo; 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; -import net.minecraft.block.BlockFire; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.MinecraftServer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.EnumSkyBlock; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -76,27 +82,21 @@ import net.minecraftforge.fluids.FluidTankInfo; */ @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.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; @@ -104,28 +104,14 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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, + private byte mColor = 0, oColor = 0, oStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, oTexturePage = 0; - private byte oLightValueClient = 0, - oLightValue = -1, - mLightValue = 0, - mOtherUpgrades = 0, - mFacing = 0, - oFacing = 0, + private byte oLightValueClient = 0, 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; @@ -184,8 +170,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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}); + ? 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; @@ -208,8 +194,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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"); @@ -219,15 +205,15 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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(); } /** - * Used for ticking special BaseMetaTileEntities, which need that for Energy Conversion - * It's called right before onPostTick() + * Used for ticking special BaseMetaTileEntities, which need that for Energy Conversion It's called right before + * onPostTick() */ public void updateStatus() { // @@ -279,17 +265,13 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity final int precipitationHeightAtSide4 = worldObj.getPrecipitationHeight(xCoord - 1, zCoord); final int precipitationHeightAtSide5 = worldObj.getPrecipitationHeight(xCoord + 1, zCoord); return (getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord) - || (getCoverIDAtSide((byte) 2) == 0 - && precipitationHeightAtSide2 - 1 < yCoord + || (getCoverIDAtSide((byte) 2) == 0 && precipitationHeightAtSide2 - 1 < yCoord && precipitationHeightAtSide2 > -1) - || (getCoverIDAtSide((byte) 3) == 0 - && precipitationHeightAtSide3 - 1 < yCoord + || (getCoverIDAtSide((byte) 3) == 0 && precipitationHeightAtSide3 - 1 < yCoord && precipitationHeightAtSide3 > -1) - || (getCoverIDAtSide((byte) 4) == 0 - && precipitationHeightAtSide4 - 1 < yCoord + || (getCoverIDAtSide((byte) 4) == 0 && precipitationHeightAtSide4 - 1 < yCoord && precipitationHeightAtSide4 > -1) - || (getCoverIDAtSide((byte) 5) == 0 - && precipitationHeightAtSide5 - 1 < yCoord + || (getCoverIDAtSide((byte) 5) == 0 && precipitationHeightAtSide5 - 1 < yCoord && precipitationHeightAtSide5 > -1); } @@ -413,14 +395,14 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } if (mMetaTileEntity.isEnetOutput() && oOutput > 0) { - final long tOutputVoltage = - Math.max(oOutput, oOutput + (1L << Math.max(0, GT_Utility.getTier(oOutput) - 1))); + 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); } @@ -444,21 +426,29 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if (getRandomNumber(10) == 0) { try { GT_Mod.achievements.issueAchievement( - this.getWorldObj() - .getPlayerEntityByName(mOwnerName), + 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!"); + } catch (Exception ignored) {} + 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(); } } @@ -466,18 +456,20 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity mRunningThroughTick = false; return; } - if (GregTech_API.sMachineThunderExplosions - && worldObj.isThundering() + if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getRandomNumber(3) == 0) { try { GT_Mod.achievements.issueAchievement( this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} GT_Log.exp.println( - "Machine at: " + this.getXCoord() + " | " + this.getYCoord() - + " | " + this.getZCoord() + " DIMID: " + "Machine at: " + this.getXCoord() + + " | " + + this.getYCoord() + + " | " + + this.getZCoord() + + " DIMID: " + this.worldObj.provider.dimensionId + " explosion due to Thunderstorm!"); doEnergyExplosion(); @@ -497,19 +489,15 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if (aSideServer) { if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) { for (int i = mMetaTileEntity.dechargerSlotStartIndex(), - k = mMetaTileEntity.dechargerSlotCount() + i; - i < k; - i++) { + 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()) { + if ((getStoredEU() + ic2.api.info.Info.itemEnergy + .getEnergyValue(mMetaTileEntity.mInventory[i])) < getEUCapacity()) { increaseStoredEnergyUnits( - (long) ic2.api.info.Info.itemEnergy.getEnergyValue( - mMetaTileEntity.mInventory[i]), + (long) ic2.api.info.Info.itemEnergy + .getEnergyValue(mMetaTileEntity.mInventory[i]), false); mMetaTileEntity.mInventory[i].stackSize--; mInventoryChanged = true; @@ -526,9 +514,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if (aSideServer) { if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) { for (int i = mMetaTileEntity.rechargerSlotStartIndex(), - k = mMetaTileEntity.rechargerSlotCount() + i; - i < k; - i++) { + k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { chargeItem(mMetaTileEntity.mInventory[i]); if (mMetaTileEntity.mInventory[i].stackSize <= 0) { @@ -559,8 +545,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } if (mTickTimer > 10) { - byte tData = (byte) ((mFacing & 7) - | (mActive ? 8 : 0) + byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0) | (mWorks ? 64 : 0)); @@ -572,13 +557,12 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, oUpdateData = tData); 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 + if (tData != oTexturePage) 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) + 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) @@ -613,25 +597,32 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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) + 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()); + 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().getWailaBody(itemStack, currenttip, accessor, config); } @@ -639,8 +630,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } @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().getWailaNBTData(player, tile, tag, world, x, y, z); @@ -662,13 +653,12 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity getCoverInfoAtSide((byte) 3).getCoverID(), getCoverInfoAtSide((byte) 4).getCoverID(), getCoverInfoAtSide((byte) 5).getCoverID(), - oTextureData = (byte) ((mFacing & 7) - | (mActive ? 8 : 0) + oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0) | (mWorks ? 64 : 0)), - oTexturePage = - (hasValidMetaTileEntity() && mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) + oTexturePage = (hasValidMetaTileEntity() + && mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) ? ((GT_MetaTileEntity_Hatch) mMetaTileEntity).getTexturePage() : 0, oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, @@ -686,18 +676,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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, + 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) { @@ -720,18 +700,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } @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) { + 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, @@ -768,15 +738,15 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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)); + 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)); + ((GT_MetaTileEntity_Hatch) mMetaTileEntity).onTexturePageUpdate((byte) (aValue & 0x7F)); } break; case GregTechTileClientEvents.CHANGE_COLOR: @@ -815,13 +785,15 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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) { @@ -835,36 +807,42 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity // Uncomment this line to print out tick-by-tick times. // 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 + 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)); - if (!mHasEnoughEnergy) - tList.add( - EnumChatFormatting.RED + "ATTENTION: This Device needs more power." + EnumChatFormatting.RESET); + if (!mHasEnoughEnergy) tList.add( + EnumChatFormatting.RED + "ATTENTION: This Device needs more power." + EnumChatFormatting.RESET); } if (joinedIc2Enet) tList.add("Joined IC2 ENet"); return mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList); @@ -923,7 +901,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if (canAccessData()) { markDirty(); mMetaTileEntity.setInventorySlotContents( - aIndex, worldObj.isRemote ? aStack : GT_OreDictUnificator.setStack(true, aStack)); + aIndex, + worldObj.isRemote ? aStack : GT_OreDictUnificator.setStack(true, aStack)); } } @@ -952,8 +931,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity @Override public boolean isUseableByPlayer(EntityPlayer aPlayer) { - return canAccessData() - && playerOwnsThis(aPlayer, false) + return canAccessData() && playerOwnsThis(aPlayer, false) && mTickTimer > 40 && getTileEntityOffset(0, 0, 0) == this && aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 @@ -1093,8 +1071,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity @Override public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { if (!canAccessData()) return false; - return mHasEnoughEnergy = decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) - || decreaseStoredSteam(aEnergy, false) + return mHasEnoughEnergy = decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) || decreaseStoredSteam(aEnergy, false) || (aIgnoreTooLessEnergy && (decreaseStoredSteam(aEnergy, true))); } @@ -1236,9 +1213,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity @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) + 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) { @@ -1328,11 +1304,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if ((mOwnerName.length() == 0) && isServerSide()) { setOwnerName(aPlayer.getDisplayName()); setOwnerUuid(aPlayer.getUniqueID()); - } else - return !privateAccess() - || aPlayer.getDisplayName().equals("Player") - || mOwnerName.equals("Player") - || mOwnerName.equals(aPlayer.getDisplayName()); + } else return !privateAccess() || aPlayer.getDisplayName().equals("Player") + || mOwnerName.equals("Player") + || mOwnerName.equals(aPlayer.getDisplayName()); return true; } @@ -1343,15 +1317,17 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity public void doEnergyExplosion() { if (getUniversalEnergyCapacity() > 0 && getUniversalEnergyStored() >= getUniversalEnergyCapacity() / 5) { - GT_Log.exp.println("Energy Explosion, injected " + getUniversalEnergyStored() + "EU >= " - + getUniversalEnergyCapacity() / 5D + "Capacity of the Machine!"); + GT_Log.exp.println( + "Energy Explosion, injected " + getUniversalEnergyStored() + + "EU >= " + + getUniversalEnergyCapacity() / 5D + + "Capacity of the Machine!"); - doExplosion(oOutput - * (getUniversalEnergyStored() >= getUniversalEnergyCapacity() - ? 4 + doExplosion( + oOutput * (getUniversalEnergyStored() >= getUniversalEnergyCapacity() ? 4 : getUniversalEnergyStored() >= getUniversalEnergyCapacity() / 2 ? 2 : 1)); - GT_Mod.achievements.issueAchievement( - this.getWorldObj().getPlayerEntityByName(mOwnerName), "electricproblems"); + GT_Mod.achievements + .issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "electricproblems"); } } @@ -1363,8 +1339,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity try { mReleaseEnergy = true; IEnergyConnected.Util.emitEnergyToNetwork(V[5], Math.max(1, getStoredEU() / V[5]), this); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } mReleaseEnergy = false; // Normal Explosion Code @@ -1400,8 +1375,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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); @@ -1410,8 +1384,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity tItemEntity.lifespan = 60000; try { if (ENTITY_ITEM_HEALTH_FIELD != null) ENTITY_ITEM_HEALTH_FIELD.setInt(tItemEntity, 99999999); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} this.worldObj.spawnEntityInWorld(tItemEntity); tItem.stackSize = 0; } @@ -1450,8 +1423,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if (isClientSide()) { // 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; @@ -1471,21 +1444,37 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity return true; } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) { - if (aPlayer.isSneaking() - && mMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine + 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); + 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)) { - GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); - GT_Utility.sendSoundToPlayers( - worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); - cableUpdateDelay = 10; - } + 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); + cableUpdateDelay = 10; + } return true; } @@ -1493,19 +1482,24 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 200, aPlayer)) { setCoverDataAtSide( aSide, - getCoverBehaviorAtSideNew(aSide) - .onCoverScrewdriverClick( - aSide, - getCoverIDAtSide(aSide), - getComplexCoverDataAtSide(aSide), - this, - aPlayer, - aX, - aY, - aZ)); + 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); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } return true; } @@ -1514,18 +1508,24 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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 + .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); + worldObj, + SoundResource.RANDOM_ANVIL_USE, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } return true; } @@ -1536,11 +1536,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity else enableWorking(); { String tChat = GT_Utility.trans("090", "Machine Processing: ") - + (isAllowedToWork() - ? GT_Utility.trans("088", "Enabled") + + (isAllowedToWork() ? GT_Utility.trans("088", "Enabled") : GT_Utility.trans("087", "Disabled")); - if (getMetaTileEntity() != null - && getMetaTileEntity().hasAlternativeModeText()) + if (getMetaTileEntity() != null && getMetaTileEntity().hasAlternativeModeText()) tChat = getMetaTileEntity().getAlternativeModeText(); GT_Utility.sendChatToPlayer(aPlayer, tChat); } @@ -1561,19 +1559,29 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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); + 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("091", "Redstone Output at Side ") + tSide + GT_Utility.trans("092", " set to: ") - + ((mStrongRedstone & (1 << tSide)) != 0 - ? GT_Utility.trans("093", "Strong") + + ((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); + worldObj, + SoundResource.IC2_TOOLS_BATTERY_USE, + 3.0F, + -1, + xCoord, + yCoord, + zCoord); issueBlockUpdate(); } doEnetUpdate(); @@ -1586,7 +1594,13 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } doEnetUpdate(); cableUpdateDelay = 10; @@ -1599,12 +1613,18 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if (getCoverIDAtSide(coverSide) == 0) { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCovers.keySet())) { if (GregTech_API.getCoverBehaviorNew(tCurrentItem) - .isCoverPlaceable(coverSide, tCurrentItem, this) + .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); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } return true; } @@ -1612,7 +1632,13 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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); + worldObj, + SoundResource.RANDOM_BREAK, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); dropCover(coverSide, aSide, false); } return true; @@ -1620,29 +1646,26 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } // End item != null } 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 = (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 (!getCoverInfoAtSide(aSide).isGUIClickable()) return false; @@ -1650,7 +1673,13 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity if (ItemList.Upgrade_Muffler.isStackEqual(aPlayer.inventory.getCurrentItem())) { if (addMufflerUpgrade()) { GT_Utility.sendSoundToPlayers( - worldObj, SoundResource.RANDOM_CLICK, 1.0F, -1, xCoord, yCoord, zCoord); + worldObj, + SoundResource.RANDOM_CLICK, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); if (!aPlayer.capabilities.isCreativeMode) aPlayer.inventory.getCurrentItem().stackSize--; } return true; @@ -1661,7 +1690,13 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity setOwnerName(aPlayer.getDisplayName()); setOwnerUuid(aPlayer.getUniqueID()); GT_Utility.sendSoundToPlayers( - worldObj, SoundResource.RANDOM_CLICK, 1.0F, -1, xCoord, yCoord, zCoord); + worldObj, + SoundResource.RANDOM_CLICK, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); if (!aPlayer.capabilities.isCreativeMode) aPlayer.inventory.getCurrentItem().stackSize--; } return true; @@ -1726,8 +1761,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } /** - * returns all valid Inventory Slots, no matter which Side (Unless it's covered). - * The Side Stuff is done in the following two Functions. + * returns all valid Inventory Slots, no matter which Side (Unless it's covered). The Side Stuff is done in the + * following two Functions. */ @Override public int[] getAccessibleSlotsFromSide(int aSide) { @@ -1742,8 +1777,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity */ @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return canAccessData() - && (mRunningThroughTick || !mInputDisabled) + return canAccessData() && (mRunningThroughTick || !mInputDisabled) && getCoverInfoAtSide((byte) aSide).letsItemsIn(aIndex) && mMetaTileEntity.canInsertItem(aIndex, aStack, aSide); } @@ -1753,15 +1787,13 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity */ @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) + return canAccessData() && (mRunningThroughTick || !mOutputDisabled) + && getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + aIndex, + this) && mMetaTileEntity.canExtractItem(aIndex, aStack, aSide); } @@ -1915,13 +1947,13 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity @Override public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (!canAccessData() - || !mMetaTileEntity.isElectric() + if (!canAccessData() || !mMetaTileEntity.isElectric() || !inputEnergyFrom(aSide) || aAmperage <= 0 || aVoltage <= 0 || getStoredEU() >= getEUCapacity() - || mMetaTileEntity.maxAmperesIn() <= mAcceptedAmperes) return 0; + || mMetaTileEntity.maxAmperesIn() <= mAcceptedAmperes) + return 0; if (aVoltage > getInputVoltage()) { GT_Log.exp.println( "Energy Explosion, injected " + aVoltage + "EU/t in a " + getInputVoltage() + "EU/t Machine!"); @@ -1929,12 +1961,11 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity return 0; } if (increaseStoredEnergyUnits( - aVoltage - * (aAmperage = Math.min( - aAmperage, - Math.min( - mMetaTileEntity.maxAmperesIn() - mAcceptedAmperes, - 1 + ((getEUCapacity() - getStoredEU()) / aVoltage)))), + aVoltage * (aAmperage = Math.min( + aAmperage, + Math.min( + mMetaTileEntity.maxAmperesIn() - mAcceptedAmperes, + 1 + ((getEUCapacity() - getStoredEU()) / aVoltage)))), true)) { mAverageEUInput[mAverageEUInputIndex] += aVoltage * aAmperage; mAcceptedAmperes += aAmperage; @@ -1945,10 +1976,10 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity @Override public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (!canAccessData() - || !mMetaTileEntity.isElectric() + if (!canAccessData() || !mMetaTileEntity.isElectric() || !outputsEnergyTo(aSide) - || getStoredEU() - (aVoltage * aAmperage) < mMetaTileEntity.getMinimumStoredEU()) return false; + || getStoredEU() - (aVoltage * aAmperage) < mMetaTileEntity.getMinimumStoredEU()) + return false; if (decreaseStoredEU(aVoltage * aAmperage, false)) { mAverageEUOutput[mAverageEUOutputIndex] += aVoltage * aAmperage; return true; @@ -1970,68 +2001,53 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity @Override public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - if (mTickTimer > 5 - && canAccessData() + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mInputDisabled) - && (aSide == ForgeDirection.UNKNOWN - || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) - && getCoverInfoAtSide((byte) aSide.ordinal()) - .letsFluidIn(aFluid == null ? null : aFluid.getFluid())))) + && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) + && getCoverInfoAtSide((byte) aSide.ordinal()) + .letsFluidIn(aFluid == null ? null : aFluid.getFluid())))) return mMetaTileEntity.fill(aSide, aFluid, doFill); return 0; } @Override public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { - if (mTickTimer > 5 - && canAccessData() + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) - && (aSide == ForgeDirection.UNKNOWN - || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) - && getCoverInfoAtSide((byte) aSide.ordinal()) - .letsFluidOut( - mMetaTileEntity.getFluid() == null - ? null - : mMetaTileEntity - .getFluid() - .getFluid())))) + && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidOut( + mMetaTileEntity.getFluid() == null ? null : mMetaTileEntity.getFluid().getFluid())))) return mMetaTileEntity.drain(aSide, maxDrain, doDrain); return null; } @Override public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { - if (mTickTimer > 5 - && canAccessData() + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) - && (aSide == ForgeDirection.UNKNOWN - || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) - && getCoverInfoAtSide((byte) aSide.ordinal()) - .letsFluidOut(aFluid == null ? null : aFluid.getFluid())))) + && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverInfoAtSide((byte) aSide.ordinal()) + .letsFluidOut(aFluid == null ? null : aFluid.getFluid())))) return mMetaTileEntity.drain(aSide, aFluid, doDrain); return null; } @Override public boolean canFill(ForgeDirection aSide, Fluid aFluid) { - if (mTickTimer > 5 - && canAccessData() + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mInputDisabled) - && (aSide == ForgeDirection.UNKNOWN - || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) - && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidIn(aFluid)))) + && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) + && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidIn(aFluid)))) return mMetaTileEntity.canFill(aSide, aFluid); return false; } @Override public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { - if (mTickTimer > 5 - && canAccessData() + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) - && (aSide == ForgeDirection.UNKNOWN - || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) - && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidOut(aFluid)))) + && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverInfoAtSide((byte) aSide.ordinal()).letsFluidOut(aFluid)))) return mMetaTileEntity.canDrain(aSide, aFluid); return false; } @@ -2040,12 +2056,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { final byte tSide = (byte) aSide.ordinal(); - if (canAccessData() - && (aSide == ForgeDirection.UNKNOWN - || (mMetaTileEntity.isLiquidInput(tSide) - && getCoverInfoAtSide(tSide).letsFluidIn(null)) - || (mMetaTileEntity.isLiquidOutput(tSide) - && getCoverInfoAtSide(tSide).letsFluidOut(null)))) + if (canAccessData() && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidInput(tSide) && getCoverInfoAtSide(tSide).letsFluidIn(null)) + || (mMetaTileEntity.isLiquidOutput(tSide) && getCoverInfoAtSide(tSide).letsFluidOut(null)))) return mMetaTileEntity.getTankInfo(aSide); return new FluidTankInfo[] {}; } @@ -2157,9 +2170,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity 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; @@ -2216,14 +2228,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } @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); } @@ -2238,9 +2244,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } /** - * Shifts the machine Inventory index according to the change in Input/Output Slots. - * This is NOT done automatically. If you want to change slot count for a machine this method needs to be adapted. - * Currently this method only works for GT_MetaTileEntity_BasicMachine + * Shifts the machine Inventory index according to the change in Input/Output Slots. This is NOT done automatically. + * If you want to change slot count for a machine this method needs to be adapted. Currently this method only works + * for GT_MetaTileEntity_BasicMachine * * @param slotIndex The original Inventory index * @param nbtVersion The GregTech version in which the original Inventory Index was saved. @@ -2256,9 +2262,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity final int configCircuitAdditionVersion = GT_Mod.calculateTotalGTVersion(509, 40); final int wireAdditionVersion = GT_Mod.calculateTotalGTVersion(509, 41); // 4 is old GT_MetaTileEntity_BasicMachine.OTHER_SLOT_COUNT - if (nbtVersion < configCircuitAdditionVersion - && getMetaTileEntity() instanceof GT_MetaTileEntity_BasicMachine - && slotIndex >= 4) slotIndex += 1; + if (nbtVersion < configCircuitAdditionVersion && getMetaTileEntity() instanceof GT_MetaTileEntity_BasicMachine + && slotIndex >= 4) + slotIndex += 1; if (mID >= 211 && mID <= 218) { // Assembler if (nbtVersion < chemistryUpdateVersion) { oldInputSize = 2; diff --git a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java index 23a247468a..31d388cf71 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java @@ -7,6 +7,33 @@ 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 java.util.Arrays; +import java.util.List; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.Supplier; + +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidHandler; + import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; @@ -22,6 +49,7 @@ import com.gtnewhorizons.modularui.common.widget.MultiChildWidget; import com.gtnewhorizons.modularui.common.widget.SlotGroup; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.GT_Mod; import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; @@ -43,61 +71,33 @@ import gregtech.api.util.GT_Utility; import gregtech.common.gui.modularui.uifactory.SelectItemUIFactory; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.ThreadLocalRandom; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Supplier; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MathHelper; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.IFluidHandler; /** * The Functions my old TileEntities and my BaseMetaTileEntities have in common. * <p/> * Basically everything a TileEntity should have. */ -public abstract class BaseTileEntity extends TileEntity - implements IHasWorldObjectAndCoords, - IIC2Enet, - IGTEnet, - ITileWithModularUI, - IAddGregtechLogo, - IGetGUITextureSet, - IAddInventorySlots { +public abstract class BaseTileEntity extends TileEntity implements IHasWorldObjectAndCoords, IIC2Enet, IGTEnet, + ITileWithModularUI, IAddGregtechLogo, IGetGUITextureSet, IAddInventorySlots { + protected boolean mInventoryChanged = false; /** * Buffers adjacent TileEntities for faster access * <p/> - * "this" means that there is no TileEntity, while "null" means that it doesn't know if there is even a TileEntity and still needs to check that if needed. + * "this" means that there is no TileEntity, while "null" means that it doesn't know if there is even a TileEntity + * and still needs to check that if needed. */ private final TileEntity[] mBufferedTileEntities = new TileEntity[6]; /** - * If this TileEntity checks for the Chunk to be loaded before returning World based values. - * The AdvPump hacks this to false to ensure everything runs properly even when far Chunks are not actively loaded. - * But anything else should not cause worfin' Chunks, uhh I mean orphan Chunks. + * If this TileEntity checks for the Chunk to be loaded before returning World based values. The AdvPump hacks this + * to false to ensure everything runs properly even when far Chunks are not actively loaded. But anything else + * should not cause worfin' Chunks, uhh I mean orphan Chunks. */ public boolean ignoreUnloadedChunks = true; /** - * This Variable checks if this TileEntity is dead, because Minecraft is too stupid to have proper TileEntity unloading. + * This Variable checks if this TileEntity is dead, because Minecraft is too stupid to have proper TileEntity + * unloading. */ public boolean isDead = false; @@ -107,8 +107,8 @@ public abstract class BaseTileEntity extends TileEntity 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; @@ -407,9 +407,9 @@ public abstract class BaseTileEntity extends TileEntity 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); } @@ -471,8 +471,7 @@ public abstract class BaseTileEntity extends TileEntity mBufferedTileEntities[aSide] = null; return getTileEntityAtSide(aSide); } - if (mBufferedTileEntities[aSide].xCoord == tX - && mBufferedTileEntities[aSide].yCoord == tY + if (mBufferedTileEntities[aSide].xCoord == tX && mBufferedTileEntities[aSide].yCoord == tY && mBufferedTileEntities[aSide].zCoord == tZ) { return mBufferedTileEntities[aSide]; } @@ -531,8 +530,8 @@ public abstract class BaseTileEntity extends TileEntity // 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 + 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) { @@ -548,7 +547,10 @@ public abstract class BaseTileEntity extends TileEntity @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); + worldObj, + new GT_Packet_Block_Event(xCoord, (short) yCoord, zCoord, aID, aValue), + xCoord, + zCoord); } protected boolean crossedChunkBorder(int aX, int aZ) { @@ -679,8 +681,7 @@ public abstract class BaseTileEntity extends TileEntity public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {} public void bindPlayerInventoryUI(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.bindPlayerInventory( - buildContext.getPlayer(), 7, getGUITextureSet().getItemSlot()); + builder.bindPlayerInventory(buildContext.getPlayer(), 7, getGUITextureSet().getItemSlot()); } public String getLocalName() { @@ -705,29 +706,24 @@ public abstract class BaseTileEntity extends TileEntity int titleWidth = 0, titleHeight = 0; if (NetworkUtils.isClient()) { final FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; - //noinspection unchecked - final List<String> titleLines = - fontRenderer.listFormattedStringToWidth(title, getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2); - titleWidth = titleLines.size() > 1 - ? getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2 + // noinspection unchecked + final List<String> titleLines = fontRenderer + .listFormattedStringToWidth(title, getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2); + titleWidth = titleLines.size() > 1 ? getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2 : fontRenderer.getStringWidth(title); - //noinspection PointlessArithmeticExpression + // noinspection PointlessArithmeticExpression titleHeight = titleLines.size() * fontRenderer.FONT_HEIGHT + (titleLines.size() - 1) * 1; } final DrawableWidget tab = new DrawableWidget(); - final TextWidget text = new TextWidget(title) - .setDefaultColor(getTitleColor()) - .setTextAlignment(Alignment.CenterLeft) - .setMaxWidth(titleWidth); + final TextWidget text = new TextWidget(title).setDefaultColor(getTitleColor()) + .setTextAlignment(Alignment.CenterLeft).setMaxWidth(titleWidth); if (GT_Mod.gregtechproxy.mTitleTabStyle == 1) { - tab.setDrawable(getGUITextureSet().getTitleTabAngular()) - .setPos(0, -(titleHeight + TAB_PADDING) + 1) + tab.setDrawable(getGUITextureSet().getTitleTabAngular()).setPos(0, -(titleHeight + TAB_PADDING) + 1) .setSize(getGUIWidth(), titleHeight + TAB_PADDING * 2); text.setPos(TAB_PADDING + TITLE_PADDING, -titleHeight + TAB_PADDING); } else { - tab.setDrawable(getGUITextureSet().getTitleTabDark()) - .setPos(0, -(titleHeight + TAB_PADDING * 2) + 1) + tab.setDrawable(getGUITextureSet().getTitleTabDark()).setPos(0, -(titleHeight + TAB_PADDING * 2) + 1) .setSize(titleWidth + (TAB_PADDING + TITLE_PADDING) * 2, titleHeight + TAB_PADDING * 2 - 1); text.setPos(TAB_PADDING + TITLE_PADDING, -titleHeight); } @@ -735,15 +731,13 @@ public abstract class BaseTileEntity extends TileEntity } protected void addTitleItemIconStyle(ModularWindow.Builder builder, String title) { - builder.widget(new MultiChildWidget() - .addChild(new DrawableWidget() - .setDrawable(getGUITextureSet().getTitleTabNormal()) - .setPos(0, 0) - .setSize(24, 24)) - .addChild(new ItemDrawable(getStackForm(1)).asWidget().setPos(4, 4)) - .addTooltip(title) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(0, -24 + 3)); + builder.widget( + new MultiChildWidget() + .addChild( + new DrawableWidget().setDrawable(getGUITextureSet().getTitleTabNormal()).setPos(0, 0) + .setSize(24, 24)) + .addChild(new ItemDrawable(getStackForm(1)).asWidget().setPos(4, 4)).addTooltip(title) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(0, -24 + 3)); } @Override @@ -757,10 +751,8 @@ public abstract class BaseTileEntity extends TileEntity @Override public void addGregTechLogo(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(152, 63)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(152, 63)); } protected int getGUIWidth() { @@ -781,14 +773,11 @@ public abstract class BaseTileEntity extends TileEntity if (inventoryHandler == null) return; if (background.length == 0) { - background = new IDrawable[] {getGUITextureSet().getItemSlot()}; + background = new IDrawable[] { getGUITextureSet().getItemSlot() }; } - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 1) - .startFromSlot(0) - .endAtSlot(0) - .background(background) - .build() - .setPos(79, 34)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 1).startFromSlot(0).endAtSlot(0).background(background) + .build().setPos(79, 34)); } @Override @@ -797,14 +786,11 @@ public abstract class BaseTileEntity extends TileEntity if (inventoryHandler == null) return; if (background.length == 0) { - background = new IDrawable[] {getGUITextureSet().getItemSlot()}; + background = new IDrawable[] { getGUITextureSet().getItemSlot() }; } - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 2) - .startFromSlot(0) - .endAtSlot(3) - .background(background) - .build() - .setPos(70, 25)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 2).startFromSlot(0).endAtSlot(3).background(background) + .build().setPos(70, 25)); } @Override @@ -813,14 +799,11 @@ public abstract class BaseTileEntity extends TileEntity if (inventoryHandler == null) return; if (background.length == 0) { - background = new IDrawable[] {getGUITextureSet().getItemSlot()}; + background = new IDrawable[] { getGUITextureSet().getItemSlot() }; } - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 3) - .startFromSlot(0) - .endAtSlot(8) - .background(background) - .build() - .setPos(61, 16)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8).background(background) + .build().setPos(61, 16)); } @Override @@ -829,14 +812,11 @@ public abstract class BaseTileEntity extends TileEntity if (inventoryHandler == null) return; if (background.length == 0) { - background = new IDrawable[] {getGUITextureSet().getItemSlot()}; + background = new IDrawable[] { getGUITextureSet().getItemSlot() }; } - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 4) - .startFromSlot(0) - .endAtSlot(15) - .background(background) - .build() - .setPos(52, 7)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(0).endAtSlot(15).background(background) + .build().setPos(52, 7)); } public void addCoverTabs(ModularWindow.Builder builder, UIBuildContext buildContext) { @@ -859,76 +839,65 @@ public abstract class BaseTileEntity extends TileEntity if (ccs == null) return; final AtomicBoolean dialogOpened = new AtomicBoolean(false); - builder.widget( - new SlotWidget(new BaseSlot(inventoryHandler, ccs.getCircuitSlot(), true)) { - @Override - protected void phantomClick(ClickData clickData, ItemStack cursorStack) { - final ItemStack newCircuit; - if (clickData.shift) { - if (clickData.mouseButton == 0) { - if (NetworkUtils.isClient() && !dialogOpened.get()) { - openSelectCircuitDialog(getContext(), dialogOpened); - } - return; - } else { - newCircuit = null; - } + builder.widget(new SlotWidget(new BaseSlot(inventoryHandler, ccs.getCircuitSlot(), true)) { + + @Override + protected void phantomClick(ClickData clickData, ItemStack cursorStack) { + final ItemStack newCircuit; + if (clickData.shift) { + if (clickData.mouseButton == 0) { + if (NetworkUtils.isClient() && !dialogOpened.get()) { + openSelectCircuitDialog(getContext(), dialogOpened); + } + return; + } else { + newCircuit = null; + } + } else { + final List<ItemStack> tCircuits = ccs.getConfigurationCircuits(); + final int index = GT_Utility.findMatchingStackInList(tCircuits, cursorStack); + if (index < 0) { + int curIndex = GT_Utility + .findMatchingStackInList(tCircuits, inv.getStackInSlot(ccs.getCircuitSlot())) + 1; + if (clickData.mouseButton == 0) { + curIndex += 1; } else { - final List<ItemStack> tCircuits = ccs.getConfigurationCircuits(); - final int index = GT_Utility.findMatchingStackInList(tCircuits, cursorStack); - if (index < 0) { - int curIndex = GT_Utility.findMatchingStackInList( - tCircuits, inv.getStackInSlot(ccs.getCircuitSlot())) - + 1; - if (clickData.mouseButton == 0) { - curIndex += 1; - } else { - curIndex -= 1; - } - curIndex = Math.floorMod(curIndex, tCircuits.size() + 1) - 1; - newCircuit = curIndex < 0 ? null : tCircuits.get(curIndex); - } else { - // set to whatever it is - newCircuit = tCircuits.get(index); - } + curIndex -= 1; } - inv.setInventorySlotContents(ccs.getCircuitSlot(), newCircuit); + curIndex = Math.floorMod(curIndex, tCircuits.size() + 1) - 1; + newCircuit = curIndex < 0 ? null : tCircuits.get(curIndex); + } else { + // set to whatever it is + newCircuit = tCircuits.get(index); } + } + inv.setInventorySlotContents(ccs.getCircuitSlot(), newCircuit); + } - @Override - protected void phantomScroll(int direction) { - phantomClick(new ClickData(direction > 0 ? 1 : 0, false, false, false)); - } + @Override + protected void phantomScroll(int direction) { + phantomClick(new ClickData(direction > 0 ? 1 : 0, false, false, false)); + } - @Override - public List<String> getExtraTooltip() { - return Arrays.asList( - EnumChatFormatting.DARK_GRAY - + EnumChatFormatting.getTextWithoutFormattingCodes( - StatCollector.translateToLocal( - "GT5U.machines.select_circuit.tooltip.1")), - EnumChatFormatting.DARK_GRAY - + EnumChatFormatting.getTextWithoutFormattingCodes( - StatCollector.translateToLocal( - "GT5U.machines.select_circuit.tooltip.2")), - EnumChatFormatting.DARK_GRAY - + EnumChatFormatting.getTextWithoutFormattingCodes( - StatCollector.translateToLocal( - "GT5U.machines.select_circuit.tooltip.3"))); - } - }.setOverwriteItemStackTooltip(list -> { - list.removeIf(line -> - line.contains(StatCollector.translateToLocal("gt.integrated_circuit.tooltip.0")) - || line.contains( - StatCollector.translateToLocal("gt.integrated_circuit.tooltip.1"))); - return list; - }) - .disableShiftInsert() - .setHandlePhantomActionClient(true) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT) - .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.select_circuit.tooltip")) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(ccs.getCircuitSlotX() - 1, ccs.getCircuitSlotY() - 1)); + @Override + public List<String> getExtraTooltip() { + return Arrays.asList( + EnumChatFormatting.DARK_GRAY + EnumChatFormatting.getTextWithoutFormattingCodes( + StatCollector.translateToLocal("GT5U.machines.select_circuit.tooltip.1")), + EnumChatFormatting.DARK_GRAY + EnumChatFormatting.getTextWithoutFormattingCodes( + StatCollector.translateToLocal("GT5U.machines.select_circuit.tooltip.2")), + EnumChatFormatting.DARK_GRAY + EnumChatFormatting.getTextWithoutFormattingCodes( + StatCollector.translateToLocal("GT5U.machines.select_circuit.tooltip.3"))); + } + }.setOverwriteItemStackTooltip(list -> { + list.removeIf( + line -> line.contains(StatCollector.translateToLocal("gt.integrated_circuit.tooltip.0")) + || line.contains(StatCollector.translateToLocal("gt.integrated_circuit.tooltip.1"))); + return list; + }).disableShiftInsert().setHandlePhantomActionClient(true) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT) + .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.select_circuit.tooltip")) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(ccs.getCircuitSlotX() - 1, ccs.getCircuitSlotY() - 1)); } protected void openSelectCircuitDialog(ModularUIContext uiContext, AtomicBoolean dialogOpened) { @@ -939,16 +908,16 @@ public abstract class BaseTileEntity extends TileEntity final IInventory inv = (IInventory) this; final List<ItemStack> circuits = ccs.getConfigurationCircuits(); - uiContext.openClientWindow(player -> new SelectItemUIFactory( + uiContext.openClientWindow( + player -> new SelectItemUIFactory( StatCollector.translateToLocal("GT5U.machines.select_circuit"), getStackForm(0), this::onCircuitSelected, circuits, GT_Utility.findMatchingStackInList(circuits, inv.getStackInSlot(ccs.getCircuitSlot()))) - .setAnotherWindow(true, dialogOpened) - .setGuiTint(getGUIColorization()) - .setCurrentGetter(() -> inv.getStackInSlot(ccs.getCircuitSlot())) - .createWindow(new UIBuildContext(player))); + .setAnotherWindow(true, dialogOpened).setGuiTint(getGUIColorization()) + .setCurrentGetter(() -> inv.getStackInSlot(ccs.getCircuitSlot())) + .createWindow(new UIBuildContext(player))); } protected void onCircuitSelected(ItemStack selected) { diff --git a/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java index e2860d6292..a49071cdcf 100644 --- a/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java @@ -2,9 +2,15 @@ package gregtech.api.metatileentity; import static gregtech.GT_Mod.GT_FML_LOGGER; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.network.Packet; + import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.gui.modularui.GUITextureSet; @@ -18,12 +24,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.Packet; public abstract class CommonMetaTileEntity extends CoverableTileEntity implements IGregTechTileEntity { + protected boolean mNeedsBlockUpdate = true, mNeedsUpdate = true, mSendClientData = false, mInventoryChanged = false; protected boolean createNewMetatileEntity(short aID) { @@ -89,8 +92,8 @@ public abstract class CommonMetaTileEntity extends CoverableTileEntity implement } /** - * Shifts the machine Inventory index according to the change in Input/Output Slots. - * Default implementation does not do anything to the slotIndex. + * Shifts the machine Inventory index according to the change in Input/Output Slots. Default implementation does not + * do anything to the slotIndex. */ protected int migrateInventoryIndex(int slotIndex, int nbtVersion) { return slotIndex; diff --git a/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java b/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java index 69f51730f4..5b469ddb00 100644 --- a/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java @@ -6,6 +6,30 @@ 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 java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +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.client.Minecraft; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidRegistry; + import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; import com.gtnewhorizons.modularui.api.math.MainAxisAlignment; @@ -15,6 +39,7 @@ import com.gtnewhorizons.modularui.api.widget.Widget; import com.gtnewhorizons.modularui.common.widget.ButtonWidget; import com.gtnewhorizons.modularui.common.widget.Column; import com.gtnewhorizons.modularui.common.widget.MultiChildWidget; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; @@ -35,60 +60,33 @@ import gregtech.api.util.ISerializableObject; import gregtech.common.GT_Client; import gregtech.common.covers.CoverInfo; import gregtech.common.covers.GT_Cover_Fluidfilter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -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.client.Minecraft; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidRegistry; 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); + .mapToInt(Enum::ordinal).mapToObj(i -> "mCoverData" + i).toArray(String[]::new); // New Cover Information - protected final CoverInfo[] coverInfos = new CoverInfo[] {null, null, null, null, null, null}; + protected final CoverInfo[] coverInfos = new CoverInfo[] { null, null, null, null, null, null }; - protected byte[] mSidedRedstone = new byte[] {15, 15, 15, 15, 15, 15}; + protected byte[] mSidedRedstone = new byte[] { 15, 15, 15, 15, 15, 15 }; protected boolean mRedstone = false; protected byte mStrongRedstone = 0; /* Deprecated Cover Variables */ @Deprecated 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 - }; + GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, + GregTech_API.sNoBehavior, GregTech_API.sNoBehavior }; @Deprecated - protected int[] mCoverSides = new int[] {0, 0, 0, 0, 0, 0}; + protected int[] mCoverSides = new int[] { 0, 0, 0, 0, 0, 0 }; @Deprecated protected ISerializableObject[] mCoverData = new ISerializableObject[6]; @Deprecated - protected final boolean[] mCoverNeedUpdate = new boolean[] {false, false, false, false, false, false}; + protected final boolean[] mCoverNeedUpdate = new boolean[] { false, false, false, false, false, false }; /* End Deprecated Cover Variables */ protected short mID = 0; @@ -96,7 +94,7 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov protected void writeCoverNBT(NBTTagCompound aNBT, boolean isDrop) { final NBTTagList tList = new NBTTagList(); - final int[] coverSides = new int[] {0, 0, 0, 0, 0, 0}; + final int[] coverSides = new int[] { 0, 0, 0, 0, 0, 0 }; for (byte i = 0; i < coverInfos.length; i++) { final CoverInfo coverInfo = getCoverInfoAtSide(i); @@ -122,9 +120,8 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov protected void readCoverNBT(NBTTagCompound aNBT) { 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"); if (aNBT.hasKey(GT_Values.NBT.COVERS)) { @@ -145,8 +142,8 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov } public void readLegacyCoverInfoNBT(NBTTagCompound aNBT) { - final int[] coverIDs = - aNBT.hasKey("mCoverSides") ? aNBT.getIntArray("mCoverSides") : new int[] {0, 0, 0, 0, 0, 0}; + final int[] coverIDs = aNBT.hasKey("mCoverSides") ? aNBT.getIntArray("mCoverSides") + : new int[] { 0, 0, 0, 0, 0, 0 }; final boolean hasOldCoverData = (aNBT.hasKey("mCoverData", 11) && aNBT.getIntArray("mCoverData").length == 6); final int[] tOldData = hasOldCoverData ? aNBT.getIntArray("mCoverData") : new int[] {}; @@ -162,10 +159,8 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov if (coverBehavior instanceof GT_Cover_Fluidfilter) { final String filterKey = String.format("fluidFilter%d", i); if (aNBT.hasKey(filterKey)) { - coverData = coverInfo - .getCoverBehavior() - .createDataObject( - (tOldData[i] & 7) | (FluidRegistry.getFluidID(aNBT.getString(filterKey)) << 3)); + coverData = coverInfo.getCoverBehavior().createDataObject( + (tOldData[i] & 7) | (FluidRegistry.getFluidID(aNBT.getString(filterKey)) << 3)); } } else { coverData = coverBehavior.createDataObject(tOldData[i]); @@ -241,12 +236,10 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) { return Textures.BlockIcons.HIDDEN_TEXTURE[0]; // See through } - final ITexture coverTexture = (!(this instanceof BaseMetaPipeEntity)) - ? coverInfo.getSpecialCoverFGTexture() + final ITexture coverTexture = (!(this instanceof BaseMetaPipeEntity)) ? coverInfo.getSpecialCoverFGTexture() : coverInfo.getSpecialCoverTexture(); - return coverTexture != null - ? coverTexture + return coverTexture != null ? coverTexture : GregTech_API.sCovers.get(new GT_ItemStack(getCoverIDAtSide(aSide))); } @@ -438,16 +431,12 @@ 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) + return aSide >= 0 && aSide < 6 && (mStrongRedstone & (1 << aSide)) != 0 ? (byte) (mSidedRedstone[aSide] & 15) : 0; } @@ -458,30 +447,26 @@ 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); + .manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this) + ? mSidedRedstone[aSide] + : getGeneralRS(aSide); } protected void updateOutputRedstoneSignal(byte aSide) { @@ -499,8 +484,8 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov } @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) return; final CoverInfo oldCoverInfo = getCoverInfoAtSide(aCoverSide); @@ -521,15 +506,18 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov final CoverInfo coverInfo = getCoverInfoAtSide(i); if (coverInfo.needsUpdate()) { NW.sendPacketToAllPlayersInRange( - worldObj, new GT_Packet_SendCoverData(coverInfo, this), xCoord, zCoord); + worldObj, + new GT_Packet_SendCoverData(coverInfo, this), + xCoord, + zCoord); coverInfo.setNeedsUpdate(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 currentFacing = (byte) accessor.getSide().ordinal(); @@ -541,15 +529,15 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov final ItemStack coverStack = coverInfo.getDisplayStack(); if (coverStack != null) { - currenttip.add(StatCollector.translateToLocalFormatted( - "GT5U.waila.cover", - currentFacing == coverInfo.getSide() - ? StatCollector.translateToLocal("GT5U.waila.cover.current_facing") - : StatCollector.translateToLocal("GT5U.interface.coverTabs." - + ForgeDirection.getOrientation(coverInfo.getSide()) - .toString() - .toLowerCase()), - coverStack.getDisplayName())); + currenttip.add( + StatCollector.translateToLocalFormatted( + "GT5U.waila.cover", + currentFacing == coverInfo.getSide() + ? StatCollector.translateToLocal("GT5U.waila.cover.current_facing") + : StatCollector.translateToLocal( + "GT5U.interface.coverTabs." + ForgeDirection + .getOrientation(coverInfo.getSide()).toString().toLowerCase()), + coverStack.getDisplayName())); final String behaviorDesc = coverInfo.getBehaviorDescription(); if (!Objects.equals(behaviorDesc, E)) currenttip.add(behaviorDesc); } @@ -560,8 +548,8 @@ 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); @@ -572,7 +560,8 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov /** * Add installed cover information, generally called from ItemBlock - * @param aNBT - NBTTagCompound from the stack + * + * @param aNBT - NBTTagCompound from the stack * @param aList - List to add the information to */ public static void addInstalledCoversInformation(NBTTagCompound aNBT, List<String> aList) { @@ -584,9 +573,11 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov final ItemStack coverStack = coverInfo.getDisplayStack(); if (coverStack != null) { - aList.add(String.format( - "Cover on %s side: %s", - getTranslation(FACES[coverInfo.getSide()]), coverStack.getDisplayName())); + aList.add( + String.format( + "Cover on %s side: %s", + getTranslation(FACES[coverInfo.getSide()]), + coverStack.getDisplayName())); } } @@ -599,12 +590,15 @@ 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())); } } } @@ -619,20 +613,16 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov @Override public void addCoverTabs(ModularWindow.Builder builder, UIBuildContext buildContext) { - final int COVER_TAB_LEFT = -16, - COVER_TAB_TOP = 1, - COVER_TAB_HEIGHT = 20, - COVER_TAB_WIDTH = 18, - COVER_TAB_SPACING = 2, - ICON_SIZE = 16; + final int COVER_TAB_LEFT = -16, COVER_TAB_TOP = 1, COVER_TAB_HEIGHT = 20, COVER_TAB_WIDTH = 18, + COVER_TAB_SPACING = 2, ICON_SIZE = 16; final boolean flipHorizontally = GT_Mod.gregtechproxy.mCoverTabsFlipped; final Column columnWidget = new Column(); builder.widget(columnWidget); final int xPos = flipHorizontally ? (getGUIWidth() - COVER_TAB_LEFT - COVER_TAB_WIDTH) : COVER_TAB_LEFT; if (GT_Mod.gregtechproxy.mCoverTabsVisible) { - columnWidget.setPos(xPos, COVER_TAB_TOP).setEnabled(widget -> ((Column) widget) - .getChildren().stream().anyMatch(Widget::isEnabled)); + columnWidget.setPos(xPos, COVER_TAB_TOP) + .setEnabled(widget -> ((Column) widget).getChildren().stream().anyMatch(Widget::isEnabled)); } else { columnWidget.setEnabled(false); } @@ -641,42 +631,34 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { final byte side = (byte) direction.ordinal(); buildContext.addSyncedWindow(side + COVER_WINDOW_ID_START, player -> createCoverWindow(player, side)); - columnWidget.addChild(new MultiChildWidget() + columnWidget.addChild(new MultiChildWidget().addChild(new ButtonWidget() { + + @Override + public IDrawable[] getBackground() { + final List<IDrawable> backgrounds = new ArrayList<>(); + final GUITextureSet tabIconSet = getGUITextureSet(); + + if (getCoverBehaviorAtSideNew(side).hasCoverGUI()) { + if (isHovering()) { + backgrounds.add( + flipHorizontally ? tabIconSet.getCoverTabHighlightFlipped() + : tabIconSet.getCoverTabHighlight()); + } else { + backgrounds.add( + flipHorizontally ? tabIconSet.getCoverTabNormalFlipped() + : tabIconSet.getCoverTabNormal()); + } + } else { + backgrounds.add( + flipHorizontally ? tabIconSet.getCoverTabDisabledFlipped() + : tabIconSet.getCoverTabDisabled()); + } + return backgrounds.toArray(new IDrawable[] {}); + } + }.setOnClick((clickData, widget) -> onTabClicked(clickData, widget, side)) + .dynamicTooltip(() -> getCoverTabTooltip(side)).setSize(COVER_TAB_WIDTH, COVER_TAB_HEIGHT)) .addChild( - new ButtonWidget() { - @Override - public IDrawable[] getBackground() { - final List<IDrawable> backgrounds = new ArrayList<>(); - final GUITextureSet tabIconSet = getGUITextureSet(); - - if (getCoverBehaviorAtSideNew(side).hasCoverGUI()) { - if (isHovering()) { - backgrounds.add( - flipHorizontally - ? tabIconSet.getCoverTabHighlightFlipped() - : tabIconSet.getCoverTabHighlight()); - } else { - backgrounds.add( - flipHorizontally - ? tabIconSet.getCoverTabNormalFlipped() - : tabIconSet.getCoverTabNormal()); - } - } else { - backgrounds.add( - flipHorizontally - ? tabIconSet.getCoverTabDisabledFlipped() - : tabIconSet.getCoverTabDisabled()); - } - return backgrounds.toArray(new IDrawable[] {}); - } - }.setOnClick((clickData, widget) -> onTabClicked(clickData, widget, side)) - .dynamicTooltip(() -> getCoverTabTooltip(side)) - .setSize(COVER_TAB_WIDTH, COVER_TAB_HEIGHT)) - .addChild(new ItemDrawable(() -> { - return getCoverItemAtSide(side); - }) - .asWidget() - .setPos( + new ItemDrawable(() -> { return getCoverItemAtSide(side); }).asWidget().setPos( (COVER_TAB_WIDTH - ICON_SIZE) / 2 + (flipHorizontally ? -1 : 1), (COVER_TAB_HEIGHT - ICON_SIZE) / 2)) .setEnabled(widget -> getCoverItemAtSide(side) != null)); @@ -685,20 +667,15 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov @SideOnly(Side.CLIENT) protected List<String> getCoverTabTooltip(byte side) { - final String[] SIDE_TOOLTIPS = 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" - }; + final String[] SIDE_TOOLTIPS = 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" }; final CoverInfo coverInfo = getCoverInfoAtSide(side); final ItemStack coverItem = coverInfo.getDisplayStack(); if (coverItem == null) return Collections.emptyList(); final boolean coverHasGUI = coverInfo.hasCoverGUI(); - //noinspection unchecked + // noinspection unchecked final List<String> tooltip = coverItem.getTooltip(Minecraft.getMinecraft().thePlayer, true); for (int i = 0; i < tooltip.size(); i++) { if (i == 0) { @@ -726,8 +703,7 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov getWorld().provider.dimensionId, widget.getContext().getPlayer().getEntityId(), 0); - GT_Values.NW.sendToPlayer( - packet, (EntityPlayerMP) widget.getContext().getPlayer()); + GT_Values.NW.sendToPlayer(packet, (EntityPlayerMP) widget.getContext().getPlayer()); } } } diff --git a/src/main/java/gregtech/api/metatileentity/GregTechTileClientEvents.java b/src/main/java/gregtech/api/metatileentity/GregTechTileClientEvents.java index d8e8017060..2f560c5f15 100644 --- a/src/main/java/gregtech/api/metatileentity/GregTechTileClientEvents.java +++ b/src/main/java/gregtech/api/metatileentity/GregTechTileClientEvents.java @@ -1,6 +1,7 @@ package gregtech.api.metatileentity; public final class GregTechTileClientEvents { + public static final byte CHANGE_COMMON_DATA = 0; public static final byte CHANGE_CUSTOM_DATA = 1; public static final byte CHANGE_COLOR = 2; diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index b433e48b6e..3aa0cbfb32 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -3,25 +3,11 @@ 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; -import gnu.trove.list.array.TIntArrayList; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.metatileentity.IConnectable; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IColoredTileEntity; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.util.*; -import gregtech.common.GT_Client; -import gregtech.common.covers.CoverInfo; 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; @@ -41,17 +27,33 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gnu.trove.list.TIntList; +import gnu.trove.list.array.TIntArrayList; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Dyes; +import gregtech.api.interfaces.metatileentity.IConnectable; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IColoredTileEntity; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.util.*; +import gregtech.common.GT_Client; +import gregtech.common.covers.CoverInfo; + /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> - * Extend this Class to add a new MetaPipe - * Call the Constructor with the desired ID at the load-phase (not preload and also not postload!) - * Implement the newMetaEntity-Method to return a new ready instance of your MetaTileEntity + * Extend this Class to add a new MetaPipe Call the Constructor with the desired ID at the load-phase (not preload and + * also not postload!) Implement the newMetaEntity-Method to return a new ready instance of your MetaTileEntity * <p/> - * Call the Constructor like the following example inside the Load Phase, to register it. - * "new GT_MetaTileEntity_E_Furnace(54, "GT_E_Furnace", "Automatic E-Furnace");" + * Call the Constructor like the following example inside the Load Phase, to register it. "new + * GT_MetaTileEntity_E_Furnace(54, "GT_E_Furnace", "Automatic E-Furnace");" */ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { + /** * The Inventory of the MetaTileEntity. Amount of Slots can be larger than 256. HAYO! */ @@ -63,7 +65,8 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { 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. + * 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; @@ -74,16 +77,14 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { private IGregTechTileEntity mBaseMetaTileEntity; /** - * This registers your Machine at the List. - * Use only ID's larger than 2048, because i reserved these ones. - * See also the List in the API, as it has a Description containing all the reservations. + * This registers your Machine at the List. Use only ID's larger than 2048, because i reserved these ones. See also + * the List in the API, as it has a Description containing all the reservations. * * @param aID the ID * @example for Constructor overload. - * <p/> - * public GT_MetaTileEntity_EBench(int aID, String mName, String mNameRegional) { - * super(aID, mName, mNameRegional); - * } + * <p/> + * public GT_MetaTileEntity_EBench(int aID, String mName, String mNameRegional) { super(aID, mName, + * mNameRegional); } */ public MetaPipeEntity(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) { this(aID, aBasicName, aRegionalName, aInvSlotCount, true); @@ -156,10 +157,7 @@ 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) { @@ -199,33 +197,33 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public void onServerStart() { - /*Do nothing*/ + /* Do nothing */ } @Override public void onWorldSave(File aSaveDirectory) { - /*Do nothing*/ + /* Do nothing */ } @Override public void onWorldLoad(File aSaveDirectory) { - /*Do nothing*/ + /* Do nothing */ } @Override public void onConfigLoad(GT_Config aConfig) { - /*Do nothing*/ + /* Do nothing */ } @Override public void setItemNBT(NBTTagCompound aNBT) { - /*Do nothing*/ + /* Do nothing */ } @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -235,48 +233,49 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - /*Do nothing*/ + /* 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*/ + /* Do nothing */ } @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - /*Do nothing*/ + /* Do nothing */ } @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - /*Do nothing*/ + /* Do nothing */ } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isClientSide() && 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. + /* + * 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(); } @@ -284,51 +283,50 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public void inValidate() { - /*Do nothing*/ + /* Do nothing */ } @Override public void onRemoval() { - /*Do nothing*/ + /* Do nothing */ } @Override public void initDefaultModes(NBTTagCompound aNBT) { - /*Do nothing*/ + /* Do nothing */ } /** * When a GUI is opened */ public void onOpenGUI() { - /*Do nothing*/ + /* Do nothing */ } /** * When a GUI is closed */ public void onCloseGUI() { - /*Do nothing*/ + /* Do nothing */ } /** - * a Player rightclicks the Machine - * Sneaky rightclicks are not getting passed to this! + * 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*/ + /* Do nothing */ } @Override public void onValueUpdate(byte aValue) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -338,17 +336,17 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public void doSound(byte aIndex, double aX, double aY, double aZ) { - /*Do nothing*/ + /* Do nothing */ } @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - /*Do nothing*/ + /* Do nothing */ } @Override public void stopSoundLoop(byte aValue, double aX, double aY, double aZ) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -395,8 +393,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; } @@ -472,12 +470,12 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public void onMachineBlockUpdate() { - /*Do nothing*/ + /* Do nothing */ } @Override public void receiveClientEvent(byte aEventID, byte aValue) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -524,7 +522,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } public void setItemCount(int aCount) { - /*Do nothing*/ + /* Do nothing */ } public int getMaxItemCount() { @@ -596,8 +594,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return isValidSlot(aIndex) - && aStack != null + return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && (mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, mInventory[aIndex])) && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); @@ -605,8 +602,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - return isValidSlot(aIndex) - && aStack != null + return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); } @@ -624,7 +620,7 @@ 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()}; + return new FluidTankInfo[] { getInfo() }; } public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { @@ -755,72 +751,43 @@ 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 + 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 + < V[10] ? 13.0F : aExplosionPower - < V[ - 12] - ? 15.0F - : aExplosionPower - < V[ - 12] - * 2 - ? 16.0F + < V[11] ? 14.0F : aExplosionPower - < V[ - 13] - ? 17.0F - : aExplosionPower - < V[ - 14] - ? 18.0F + < V[12] ? 15.0F : aExplosionPower - < V[ - 15] - ? 19.0F - : 20.0F; - int tX = getBaseMetaTileEntity().getXCoord(), - tY = getBaseMetaTileEntity().getYCoord(), + < 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) { - new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder() - .setStrength(tStrength) - .setSmoking(true) - .setPosition(tX + 0.5, tY + 0.5, tZ + 0.5) - .setWorld(tWorld) - .run(); + new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder().setStrength(tStrength).setSmoking(true) + .setPosition(tX + 0.5, tY + 0.5, tZ + 0.5).setWorld(tWorld).run(); } } @@ -830,14 +797,8 @@ 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); } @@ -879,8 +840,8 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { private boolean connectableColor(TileEntity tTileEntity) { // Determine if two entities are connectable based on their colorization: - // Uncolored can connect to anything - // If both are colored they must be the same color to connect. + // Uncolored can connect to anything + // If both are colored they must be the same color to connect. if (tTileEntity instanceof IColoredTileEntity) { if (getBaseMetaTileEntity().getColorization() >= 0) { final byte tColor = ((IColoredTileEntity) tTileEntity).getColorization(); @@ -914,24 +875,22 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { final IMetaTileEntity tPipe = tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() : null; - if (getClass().isInstance(tPipe) - || (tPipe != null && tPipe.getClass().isInstance(this))) { + 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 - connectAtSide(aSide); - return 1; - } - if (!baseMetaTile - .getWorld() - .getChunkProvider() + } 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)) { // Target chunk unloaded return -1; @@ -941,7 +900,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } protected void checkConnections() { - // Verify connections around us. If GT6 style cables are not enabled then revert to old behavior and try + // Verify connections around us. If GT6 style cables are not enabled then revert to old behavior and try // connecting to everything around us for (byte aSide = 0; aSide < 6; aSide++) { if ((!getGT6StyleConnection() || isConnectedAtSide(aSide)) && connect(aSide) == 0) { @@ -962,9 +921,9 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { 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); + if ((this.getClass().isInstance(tPipe) || (tPipe != null && tPipe.getClass().isInstance(this))) + && ((MetaPipeEntity) tPipe).isConnectedAtSide(tSide)) + ((MetaPipeEntity) tPipe).disconnect(tSide); } @Override @@ -972,8 +931,8 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { return (mConnections & (1 << aSide)) != 0; } - 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 false; } @@ -981,8 +940,8 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { return false; } - 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 false; } @@ -990,21 +949,13 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { return false; } - 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 false; } - 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 false; } diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index eb4e797c49..64bc531947 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -2,13 +2,43 @@ package gregtech.api.metatileentity; import static gregtech.api.enums.GT_Values.V; +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.function.Supplier; + +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; + import appeng.api.implementations.IPowerChannelState; import appeng.api.networking.energy.IEnergyGrid; import appeng.api.networking.pathing.IPathingGrid; import appeng.api.util.AECableType; import appeng.core.localization.WailaText; import appeng.me.helpers.AENetworkProxy; + import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Optional; import cpw.mods.fml.relauncher.Side; @@ -36,46 +66,22 @@ import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; import gregtech.common.covers.CoverInfo; -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.function.Supplier; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> - * Extend this Class to add a new MetaMachine - * Call the Constructor with the desired ID at the load-phase (not preload and also not postload!) - * Implement the newMetaEntity-Method to return a new ready instance of your MetaTileEntity + * Extend this Class to add a new MetaMachine Call the Constructor with the desired ID at the load-phase (not preload + * and also not postload!) Implement the newMetaEntity-Method to return a new ready instance of your MetaTileEntity * <p/> - * Call the Constructor like the following example inside the Load Phase, to register it. - * "new GT_MetaTileEntity_E_Furnace(54, "GT_E_Furnace", "Automatic E-Furnace");" + * Call the Constructor like the following example inside the Load Phase, to register it. "new + * GT_MetaTileEntity_E_Furnace(54, "GT_E_Furnace", "Automatic E-Furnace");" */ @SuppressWarnings("unused") public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallback<MetaTileEntity> { + /** - * Only assigned for the MetaTileEntity in the List! Also only used to get the localized Name for the ItemStack and for getInvName. + * Only assigned for the MetaTileEntity in the List! Also only used to get the localized Name for the ItemStack and + * for getInvName. */ public final String mName; /** @@ -108,16 +114,14 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac public long mSoundRequests = 0; /** - * This registers your Machine at the List. - * Use only ID's larger than 2048, because i reserved these ones. - * See also the List in the API, as it has a Description containing all the reservations. + * This registers your Machine at the List. Use only ID's larger than 2048, because i reserved these ones. See also + * the List in the API, as it has a Description containing all the reservations. * * @param aID the ID * @example for Constructor overload. - * <p/> - * public GT_MetaTileEntity_EBench(int aID, String mName, String mNameRegional) { - * super(aID, mName, mNameRegional); - * } + * <p/> + * public GT_MetaTileEntity_EBench(int aID, String mName, String mNameRegional) { super(aID, mName, + * mNameRegional); } */ public MetaTileEntity(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) { if (GregTech_API.sPostloadStarted || !GregTech_API.sPreloadStarted) @@ -147,6 +151,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac /** * This method will only be called on client side + * * @return whether the secondary description should be display. default is false */ @Deprecated @@ -173,10 +178,7 @@ 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()); } @Override @@ -186,33 +188,33 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public void onServerStart() { - /*Do nothing*/ + /* Do nothing */ } @Override public void onWorldSave(File aSaveDirectory) { - /*Do nothing*/ + /* Do nothing */ } @Override public void onWorldLoad(File aSaveDirectory) { - /*Do nothing*/ + /* Do nothing */ } @Override public void onConfigLoad(GT_Config aConfig) { - /*Do nothing*/ + /* Do nothing */ } @Override public void setItemNBT(NBTTagCompound aNBT) { - /*Do nothing*/ + /* Do nothing */ } @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -222,12 +224,12 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - /*Do nothing*/ + /* 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; @@ -236,32 +238,30 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @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) { 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)) { // The tile entity we're facing is a cable, let's try to connect to it - return ((IGregTechTileEntity) tTileEntity) - .getMetaTileEntity() + 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) { + 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)) { // The tile entity we're facing is a cable, let's try to connect to it - return ((IGregTechTileEntity) tTileEntity) - .getMetaTileEntity() + return ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() .onSolderingToolRightClick(aWrenchingSide, tSide, aPlayer, aX, aY, aZ); } return false; @@ -269,28 +269,34 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @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*/ + /* Do nothing */ } @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - /*Do nothing*/ + /* Do nothing */ } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isClientSide() && 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. + /* + * 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(); } @@ -298,55 +304,54 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public void inValidate() { - /*Do nothing*/ + /* Do nothing */ } @Override public void onRemoval() { - /*Do nothing*/ + /* Do nothing */ } @Override public void initDefaultModes(NBTTagCompound aNBT) { - /*Do nothing*/ + /* Do nothing */ } /** * When a GUI is opened */ public void onOpenGUI() { - /*Do nothing*/ + /* Do nothing */ } /** * When a GUI is closed */ public void onCloseGUI() { - /*Do nothing*/ + /* Do nothing */ } /** - * a Player rightclicks the Machine - * Sneaky rightclicks are not getting passed to this! + * a Player rightclicks the Machine Sneaky rightclicks are not getting passed to this! */ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { return false; } @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*/ + /* Do nothing */ } @Override public void onValueUpdate(byte aValue) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -356,17 +361,17 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public void doSound(byte aIndex, double aX, double aY, double aZ) { - /*Do nothing*/ + /* Do nothing */ } @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - /*Do nothing*/ + /* Do nothing */ } @Override public void stopSoundLoop(byte aValue, double aX, double aY, double aZ) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -425,8 +430,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } /** - * @return what type of texture does this machine use for GUI, - * i.e. Bronze, Steel, or Primitive + * @return what type of texture does this machine use for GUI, i.e. Bronze, Steel, or Primitive */ public SteamVariant getSteamVariant() { return SteamVariant.NONE; @@ -468,8 +472,8 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } /** - * @return the amount of E-net Impulses of the maxEUOutput size, which can be outputted by this Device. - * Default is 1 Pulse, this shouldn't be set to smaller Values than 1, as it won't output anything in that Case! + * @return the amount of E-net Impulses of the maxEUOutput size, which can be outputted by this Device. Default is 1 + * Pulse, this shouldn't be set to smaller Values than 1, as it won't output anything in that Case! */ public long maxAmperesOut() { return 1; @@ -570,8 +574,8 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } /** - * @return the amount of EU, which this Device stores before starting to emit Energy. - * useful if you don't want to emit stored Energy until a certain Level is reached. + * @return the amount of EU, which this Device stores before starting to emit Energy. useful if you don't want to + * emit stored Energy until a certain Level is reached. */ public long getMinimumStoredEU() { return 512; @@ -627,8 +631,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; } @@ -683,12 +687,12 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public void onMachineBlockUpdate() { - /*Do nothing*/ + /* Do nothing */ } @Override public void receiveClientEvent(byte aEventID, byte aValue) { - /*Do nothing*/ + /* Do nothing */ } @Override @@ -732,8 +736,8 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } /** - * If this TileEntity makes use of Sided Redstone behaviors. - * Determines only, if the Output Redstone Array is getting filled with 0 for true, or 15 for false. + * If this TileEntity makes use of Sided Redstone behaviors. Determines only, if the Output Redstone Array is + * getting filled with 0 for true, or 15 for false. */ public boolean hasSidedRedstoneOutputBehavior() { return false; @@ -743,15 +747,14 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac * When the Facing gets changed. */ public void onFacingChange() { - /*Do nothing*/ + /* Do nothing */ } /** * if the IC2 Teleporter can drain from this. */ public boolean isTeleporterCompatible() { - return isEnetOutput() - && getBaseMetaTileEntity().getOutputVoltage() >= 128 + return isEnetOutput() && getBaseMetaTileEntity().getOutputVoltage() >= 128 && getBaseMetaTileEntity().getUniversalEnergyCapacity() >= 500000; } @@ -806,7 +809,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } public void setItemCount(int aCount) { - /*Do nothing*/ + /* Do nothing */ } public int getMaxItemCount() { @@ -889,8 +892,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return isValidSlot(aIndex) - && aStack != null + return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && (mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, mInventory[aIndex])) && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); @@ -898,8 +900,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - return isValidSlot(aIndex) - && aStack != null + return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); } @@ -917,7 +918,7 @@ 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()}; + return new FluidTankInfo[] { getInfo() }; } public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { @@ -932,8 +933,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac Integer.MAX_VALUE, Math.min( aFluid.amount / 2, - getBaseMetaTileEntity().getSteamCapacity() - - getBaseMetaTileEntity().getStoredSteam())); + getBaseMetaTileEntity().getSteamCapacity() - getBaseMetaTileEntity().getStoredSteam())); if (tSteam > 0) { markDirty(); if (doFill) getBaseMetaTileEntity().increaseStoredSteam(tSteam, true); @@ -1112,14 +1112,8 @@ 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); } @@ -1186,12 +1180,12 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac // === Waila compat === @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())); if (Loader.isModLoaded("appliedenergistics2") && this instanceof IPowerChannelState) { // adapted from PowerStateWailaDataProvider @@ -1214,8 +1208,8 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @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) { if (Loader.isModLoaded("appliedenergistics2") && this instanceof IPowerChannelState) { // adapted from PowerStateWailaDataProvider final IPowerChannelState state = (IPowerChannelState) this; diff --git a/src/main/java/gregtech/api/metatileentity/TileIC2EnergySink.java b/src/main/java/gregtech/api/metatileentity/TileIC2EnergySink.java index 661dad730f..6d6ec378d4 100644 --- a/src/main/java/gregtech/api/metatileentity/TileIC2EnergySink.java +++ b/src/main/java/gregtech/api/metatileentity/TileIC2EnergySink.java @@ -1,6 +1,10 @@ package gregtech.api.metatileentity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + import com.google.common.collect.Sets; + import gregtech.api.interfaces.metatileentity.IConnectable; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; @@ -8,10 +12,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; import gregtech.api.util.GT_Utility; import ic2.api.energy.tile.IEnergySink; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; public class TileIC2EnergySink extends TileEntity implements IEnergySink { + private IGregTechTileEntity myMeta; private GT_MetaPipeEntity_Cable cableMeta = null; @@ -28,9 +31,7 @@ public class TileIC2EnergySink extends TileEntity implements IEnergySink { zCoord = meta.getZCoord(); } /* - * * IC2 enet compat - IEnergySink - * */ /** @@ -48,17 +49,17 @@ public class TileIC2EnergySink extends TileEntity implements IEnergySink { // 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 + // 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. + // weird. In that case only use one cable, or use a transformer. return (cableMeta.mVoltage * cableMeta.mAmperage); } else return myMeta.getEUCapacity() - myMeta.getStoredEU(); } /** - * Determine the tier of this energy sink. - * 1 = LV, 2 = MV, 3 = HV, 4 = EV etc. + * Determine the tier of this energy sink. 1 = LV, 2 = MV, 3 = HV, 4 = EV etc. + * * @note Return Integer.MAX_VALUE to allow any voltage. * * @return tier of this energy sink @@ -71,18 +72,18 @@ public class TileIC2EnergySink extends TileEntity implements IEnergySink { /** * Transfer energy to the sink. * - * It's highly recommended to accept all energy by letting the internal buffer overflow to - * increase the performance and accuracy of the distribution simulation. + * It's highly recommended to accept all energy by letting the internal buffer overflow to increase the performance + * and accuracy of the distribution simulation. * * @param directionFrom direction from which the energy comes from - * @param amount energy to be transferred + * @param amount energy to be transferred * @return Energy not consumed (leftover) */ @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 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(); @@ -90,16 +91,14 @@ public class TileIC2EnergySink extends TileEntity implements IEnergySink { final long usedAmps; if (cableMeta != null) { - usedAmps = ((IMetaTileEntityCable) metaTile) - .transferElectricity( - (byte) directionFrom.ordinal(), - Math.min(euPerAmp, cableMeta.mVoltage), - amps, - Sets.newHashSet((TileEntity) myMeta)); + 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); + } else usedAmps = myMeta + .injectEnergyUnits((byte) directionFrom.ordinal(), Math.min(euPerAmp, myMeta.getInputVoltage()), amps); return amount - (usedAmps * euPerAmp); // transferElectricity for cables @@ -108,18 +107,18 @@ public class TileIC2EnergySink extends TileEntity implements IEnergySink { /** * Determine if this acceptor can accept current from an adjacent emitter in a direction. * - * The TileEntity in the emitter parameter is what was originally added to the energy net, - * which may be normal in-world TileEntity, a delegate or an IMetaDelegate. + * The TileEntity in the emitter parameter is what was originally added to the energy net, which may be normal + * in-world TileEntity, a delegate or an IMetaDelegate. * - * @param emitter energy emitter, may also be null or an IMetaDelegate + * @param emitter energy emitter, may also be null or an IMetaDelegate * @param direction direction the energy is being received from */ @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; + 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 be1904aaf5..a372a37103 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 @@ -2,6 +2,8 @@ package gregtech.api.metatileentity.examples; import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -10,12 +12,12 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachin import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; /** * 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, @@ -30,66 +32,37 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine "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); } @@ -110,8 +83,8 @@ public class GT_MetaTileEntity_E_Furnace 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) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64, aStack), false, null) != null; } 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 750b50d652..1ea2e3e756 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 @@ -2,6 +2,22 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +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; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import cofh.api.energy.IEnergyReceiver; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; @@ -36,33 +52,16 @@ 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; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; 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, + public int mTransferredAmperage = 0, mTransferredAmperageLast20 = 0, mTransferredAmperageLast20OK = 0, mTransferredAmperageOK = 0; - public long mTransferredVoltageLast20 = 0, - mTransferredVoltage = 0, - mTransferredVoltageLast20OK = 0, + public long mTransferredVoltageLast20 = 0, mTransferredVoltage = 0, mTransferredVoltageLast20OK = 0, mTransferredVoltageOK = 0; public long mRestRF; public int mOverheat; @@ -71,17 +70,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile 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; @@ -92,15 +82,8 @@ 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; @@ -119,87 +102,77 @@ 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); - } - - @Override - 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)) - }; + mName, + mThickNess, + mMaterial, + mCableLossPerMeter, + mAmperage, + mVoltage, + mInsulated, + mCanShock); + } + + @Override + 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)) }; 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.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)) - }; + 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)) - }; + 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)) - }; + 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)) - }; + 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_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)) - }; + 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 + if (mCanShock && (((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) GT_Utility.applyElectricityDamage( - (EntityLivingBase) aEntity, mTransferredVoltageLast20, mTransferredAmperageLast20); + (EntityLivingBase) aEntity, + mTransferredVoltageLast20, + mTransferredAmperageLast20); } @Override @@ -242,8 +215,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @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)); } @@ -275,24 +248,24 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { 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() + 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) { + 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)) { @@ -308,8 +281,8 @@ 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) { + 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)) { @@ -325,34 +298,26 @@ 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); } @@ -374,9 +339,9 @@ 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; @@ -398,15 +363,18 @@ 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); + else 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; + && ((IEnergySink) ic2Energy).acceptsEnergyFrom((TileEntity) baseMetaTile, tDir)) + return true; // IC2 Source Compat if (GT_Mod.gregtechproxy.ic2EnergySourceCompat && (ic2Energy instanceof IEnergySource)) { @@ -416,14 +384,13 @@ 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 @@ -445,16 +412,24 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public String[] getDescription() { return new String[] { - StatCollector.translateToLocal("GT5U.item.cable.max_voltage") + ": %%%" + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mVoltage) + " (" - + GT_Utility.getColoredTierNameFromVoltage(mVoltage) - + EnumChatFormatting.GREEN + ")" + EnumChatFormatting.GRAY, - StatCollector.translateToLocal("GT5U.item.cable.max_amperage") + ": %%%" + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(mAmperage) + EnumChatFormatting.GRAY, - StatCollector.translateToLocal("GT5U.item.cable.loss") + ": %%%" + EnumChatFormatting.RED - + GT_Utility.formatNumbers(mCableLossPerMeter) + EnumChatFormatting.GRAY + "%%% " - + StatCollector.translateToLocal("GT5U.item.cable.eu_volt") - }; + StatCollector.translateToLocal("GT5U.item.cable.max_voltage") + ": %%%" + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mVoltage) + + " (" + + GT_Utility.getColoredTierNameFromVoltage(mVoltage) + + EnumChatFormatting.GREEN + + ")" + + EnumChatFormatting.GRAY, + StatCollector.translateToLocal("GT5U.item.cable.max_amperage") + ": %%%" + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mAmperage) + + EnumChatFormatting.GRAY, + StatCollector.translateToLocal("GT5U.item.cable.loss") + ": %%%" + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(mCableLossPerMeter) + + EnumChatFormatting.GRAY + + "%%% " + + StatCollector.translateToLocal("GT5U.item.cable.eu_volt") }; } @Override @@ -491,21 +466,38 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile 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" - }; + // 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 @@ -557,19 +549,13 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile 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) { final AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -583,20 +569,19 @@ 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; } 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 61d55bfd9b..29237218a1 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 @@ -3,6 +3,25 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.D1; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +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.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +import org.apache.commons.lang3.tuple.MutableTriple; + import cpw.mods.fml.common.Optional; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -21,24 +40,9 @@ import gregtech.common.GT_Client; import gregtech.common.covers.CoverInfo; 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; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; -import org.apache.commons.lang3.tuple.MutableTriple; public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { + public final float mThickNess; public final Materials mMaterial; public final int mCapacity, mHeatResistance, mPipeAmount; @@ -50,28 +54,13 @@ 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; @@ -84,24 +73,13 @@ 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; @@ -120,79 +98,61 @@ 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); + 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) { final 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; - final byte[][] sRestrictionArray = { - {2, 3, 5, 4}, - {2, 3, 4, 5}, - {1, 0, 4, 5}, - {1, 0, 4, 5}, - {1, 0, 2, 3}, - {1, 0, 2, 3} - }; + final byte[][] sRestrictionArray = { { 2, 3, 5, 4 }, { 2, 3, 4, 5 }, { 1, 0, 4, 5 }, { 1, 0, 4, 5 }, + { 1, 0, 2, 3 }, { 1, 0, 2, 3 } }; 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 + // 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) - }; + 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)); - if (aPipeAmount >= 4) - 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)); - if (aThickNess < 0.374F) - 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)); - if (aThickNess < 0.749F) - 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)); + if (aPipeAmount >= 9) 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)); + if (aThickNess < 0.124F) 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)); + if (aThickNess < 0.499F) 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)); + 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)); @@ -277,9 +237,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public void saveNBTData(NBTTagCompound aNBT) { - for (int i = 0; i < mPipeAmount; i++) - if (mFluids[i] != null) - aNBT.setTag("mFluid" + (i == 0 ? "" : i), mFluids[i].writeToNBT(new NBTTagCompound())); + for (int i = 0; i < mPipeAmount; i++) if (mFluids[i] != null) + aNBT.setTag("mFluid" + (i == 0 ? "" : i), mFluids[i].writeToNBT(new NBTTagCompound())); aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom); if (GT_Mod.gregtechproxy.gt6Pipe) { aNBT.setByte("mConnections", mConnections); @@ -305,17 +264,17 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { for (FluidStack tFluid : mFluids) { if (tFluid != null) { final 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)) { - GT_Utility.applyFrostDamage((EntityLivingBase) aEntity, (270 - tTemperature) / 25.0F); - break; - } + } else if (tTemperature < 260 && !isCoverOnSide( + (BaseMetaPipeEntity) getBaseMetaTileEntity(), + (EntityLivingBase) aEntity)) { + GT_Utility.applyFrostDamage((EntityLivingBase) aEntity, (270 - tTemperature) / 25.0F); + break; + } } } } @@ -361,25 +320,33 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { // 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); + + " | " + + 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() + for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity().getWorld() .getEntitiesWithinAABB( EntityLivingBase.class, AxisAlignedBB.getBoundingBox( @@ -396,8 +363,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } } else if (tTemperature < 260) { try { - for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity() - .getWorld() + for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity().getWorld() .getEntitiesWithinAABB( EntityLivingBase.class, AxisAlignedBB.getBoundingBox( @@ -434,8 +400,7 @@ 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 + if (isConnectedAtSide(aSide) && tTank != null && (mLastReceivedFrom & (1 << aSide)) == 0 && getBaseMetaTileEntity().getCoverInfoAtSide(aSide).letsFluidOut(tFluid.getFluid()) && (gTank == null || gTank.getCoverInfoAtSide(tSide).letsFluidIn(tFluid.getFluid()))) { @@ -470,8 +435,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (tEntry.right <= 0) continue; - final int tFilledAmount = - tEntry.left.fill(tEntry.middle, drainFromIndex(tEntry.right, false, index), false); + final int tFilledAmount = tEntry.left + .fill(tEntry.middle, drainFromIndex(tEntry.right, false, index), false); if (tFilledAmount > 0) tEntry.left.fill(tEntry.middle, drainFromIndex(tFilledAmount, true, index), true); @@ -480,8 +445,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } @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) { final byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); final byte tMask = (byte) (1 << tSide); @@ -508,34 +473,26 @@ 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); } @@ -553,14 +510,14 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { public boolean canConnect(byte aSide, TileEntity tTileEntity) { 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; 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; @@ -570,8 +527,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (fTileEntity != null) { final FluidTankInfo[] tInfo = fTileEntity.getTankInfo(ForgeDirection.getOrientation(tSide)); if (tInfo != null) { - return tInfo.length > 0 - || (GregTech_API.mTranslocator && isTranslocator(tTileEntity)) + return tInfo.length > 0 || (GregTech_API.mTranslocator && isTranslocator(tTileEntity)) || gTileEntity != null && gTileEntity.getCoverBehaviorAtSideNew(tSide) instanceof GT_Cover_FluidRegulator; } @@ -603,18 +559,19 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (aIndex == 9) { 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()); + 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()); } } @@ -763,19 +720,25 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { 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 - }; + 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, - EnumChatFormatting.AQUA + "Pipe Amount: %%%" + mPipeAmount + EnumChatFormatting.GRAY - }; + 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 }; } } @@ -848,19 +811,13 @@ 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) { final AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); 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 d50c4fc165..e449921d1d 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 @@ -3,6 +3,9 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.RA; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import gregtech.api.enums.*; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -13,12 +16,11 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_ModHandler.RecipeBits; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; 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."); + + private static final String localizedDescFormat = GT_LanguageManager + .addStringLocalization("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) { @@ -30,7 +32,7 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { GT_ModHandler.addCraftingRecipe( getStackForm(2), RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {"SSS", "SwS", "SSS", 'S', OrePrefixes.stick.get(mMaterial)}); + new Object[] { "SSS", "SwS", "SSS", 'S', OrePrefixes.stick.get(mMaterial) }); } if (!aMaterial.contains(SubTag.NO_RECIPES)) { @@ -60,18 +62,11 @@ 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 @@ -106,23 +101,23 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { @Override public final void saveNBTData(NBTTagCompound aNBT) { - /*Do nothing*/ + /* Do nothing */ } @Override public final void loadNBTData(NBTTagCompound aNBT) { - /*Do nothing*/ + /* 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; } @@ -133,7 +128,7 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { @Override public void disconnect(byte aSide) { - /* Do nothing*/ + /* Do nothing */ } @Override 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 5ae9150a58..5d2211528b 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 @@ -3,6 +3,23 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; import static gregtech.api.enums.Textures.BlockIcons.PIPE_RESTRICTOR; +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; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityDispenser; +import net.minecraft.tileentity.TileEntityHopper; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import gregtech.GT_Mod; import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; @@ -22,23 +39,9 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.GT_Client; import gregtech.common.covers.CoverInfo; -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; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityDispenser; -import net.minecraft.tileentity.TileEntityHopper; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe { + public final float mThickNess; public final Materials mMaterial; public final int mStepSize; @@ -48,16 +51,8 @@ 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; @@ -67,26 +62,13 @@ 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; @@ -103,112 +85,87 @@ 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); + 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) - }; + 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) - }; + 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) - }; + 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) - }; + 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.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.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)) - }; + 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)) - }; + 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)) - }; + 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.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 @@ -268,10 +225,11 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE final ArrayList<IMetaTileEntityItemPipe> tPipeList = new ArrayList<>(); - for (boolean temp = true; temp && !isInventoryEmpty() && pipeCapacityCheck(); ) { + for (boolean temp = true; temp && !isInventoryEmpty() && pipeCapacityCheck();) { temp = false; tPipeList.clear(); - for (IMetaTileEntityItemPipe tTileEntity : GT_Utility.sortMapByValuesAcending( + for (IMetaTileEntityItemPipe tTileEntity : GT_Utility + .sortMapByValuesAcending( IMetaTileEntityItemPipe.Util.scanPipes(this, new HashMap<>(), 0, false, false)) .keySet()) { if (temp) break; @@ -289,8 +247,8 @@ 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) { final byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); if (isConnectedAtSide(tSide)) { @@ -305,34 +263,26 @@ 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); } @@ -353,8 +303,9 @@ 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; @@ -410,18 +361,17 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE 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; + aSender, + tInventory, + (byte) 6, + GT_Utility.getOppositeSide(aSide), + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + 1) > 0; } } } @@ -490,21 +440,14 @@ 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) - }; - else if (mTickTime % 20 == 0) - return new String[] { + if (mTickTime == 20) 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) - }; - else - return new String[] { + "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize) }; + else return new String[] { "Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + mTickTime + "%%% ticks", - "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize) - }; + "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize) }; } private boolean isInventoryEmpty() { @@ -567,19 +510,13 @@ 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) { final 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 c46dbe0bae..7eb396a293 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 @@ -2,10 +2,25 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; +import java.util.List; + +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; import com.gtnewhorizons.modularui.common.widget.SlotGroup; + import gregtech.api.enums.Textures; import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.interfaces.ITexture; @@ -16,44 +31,34 @@ import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import ic2.api.item.IElectricItem; -import java.util.List; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; /** * 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 + * This is the main construct for my Basic Machines such as the Automatic Extractor Extend this class to make a simple + * Machine */ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_TieredMachineBlock implements IAddUIWidgets { + public boolean mCharge = false, mDecharge = false; public int mBatteryCount = 0, mChargeableCount = 0; private long count = 0; 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); } @@ -69,27 +74,18 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier 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]; } @@ -231,11 +227,10 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3; mBatteryCount = 0; mChargeableCount = 0; - for (ItemStack tStack : mInventory) - if (GT_ModHandler.isElectricItem(tStack, mTier)) { - if (GT_ModHandler.isChargerItem(tStack)) mBatteryCount++; - mChargeableCount++; - } + for (ItemStack tStack : mInventory) if (GT_ModHandler.isElectricItem(tStack, mTier)) { + if (GT_ModHandler.isChargerItem(tStack)) mBatteryCount++; + mChargeableCount++; + } } count++; } @@ -244,8 +239,7 @@ 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") + 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") @@ -310,23 +304,24 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier if (storedOverflow) { tStored = Long.MAX_VALUE; } - return new long[] {tStored, tScale}; + return new long[] { tStored, tScale }; } @Override public String[] getInfoData() { updateStorageInfo(); - 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" }; } private void updateStorageInfo() { @@ -339,29 +334,32 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier } @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) { NBTTagCompound tag = accessor.getNBTData(); - currenttip.add(StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.stored", - GT_Utility.formatNumbers(tag.getLong("mStored")), - GT_Utility.formatNumbers(tag.getLong("mMax")))); + currenttip.add( + StatCollector.translateToLocalFormatted( + "GT5U.waila.energy.stored", + GT_Utility.formatNumbers(tag.getLong("mStored")), + GT_Utility.formatNumbers(tag.getLong("mMax")))); long avgIn = tag.getLong("AvgIn"); long avgOut = tag.getLong("AvgOut"); - currenttip.add(StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.avg_in", - GT_Utility.formatNumbers(avgIn), - GT_Utility.getColoredTierNameFromVoltage(avgIn))); - currenttip.add(StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.avg_out", - GT_Utility.formatNumbers(avgOut), - GT_Utility.getColoredTierNameFromVoltage(avgOut))); + currenttip.add( + StatCollector.translateToLocalFormatted( + "GT5U.waila.energy.avg_in", + GT_Utility.formatNumbers(avgIn), + GT_Utility.getColoredTierNameFromVoltage(avgIn))); + currenttip.add( + StatCollector.translateToLocalFormatted( + "GT5U.waila.energy.avg_out", + GT_Utility.formatNumbers(avgOut), + GT_Utility.getColoredTierNameFromVoltage(avgOut))); 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) { updateStorageInfo(); super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setLong("mStored", mStored); @@ -384,60 +382,48 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { switch (mInventory.length) { case 4: - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 2) - .startFromSlot(0) - .endAtSlot(3) - .slotCreator(index -> new BaseSlot(inventoryHandler, index) { - @Override - public int getSlotStackLimit() { - return 1; - } - }) - .background(getGUITextureSet().getItemSlot()) - .build() - .setPos(70, 25)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 2).startFromSlot(0).endAtSlot(3) + .slotCreator(index -> new BaseSlot(inventoryHandler, index) { + + @Override + public int getSlotStackLimit() { + return 1; + } + }).background(getGUITextureSet().getItemSlot()).build().setPos(70, 25)); break; case 9: - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 3) - .startFromSlot(0) - .endAtSlot(8) - .slotCreator(index -> new BaseSlot(inventoryHandler, index) { - @Override - public int getSlotStackLimit() { - return 1; - } - }) - .background(getGUITextureSet().getItemSlot()) - .build() - .setPos(61, 16)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8) + .slotCreator(index -> new BaseSlot(inventoryHandler, index) { + + @Override + public int getSlotStackLimit() { + return 1; + } + }).background(getGUITextureSet().getItemSlot()).build().setPos(61, 16)); break; case 16: - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 4) - .startFromSlot(0) - .endAtSlot(15) - .slotCreator(index -> new BaseSlot(inventoryHandler, index) { - @Override - public int getSlotStackLimit() { - return 1; - } - }) - .background(getGUITextureSet().getItemSlot()) - .build() - .setPos(52, 7)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(0).endAtSlot(15) + .slotCreator(index -> new BaseSlot(inventoryHandler, index) { + + @Override + public int getSlotStackLimit() { + return 1; + } + }).background(getGUITextureSet().getItemSlot()).build().setPos(52, 7)); break; default: - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 1) - .startFromSlot(0) - .endAtSlot(0) - .slotCreator(index -> new BaseSlot(inventoryHandler, index) { - @Override - public int getSlotStackLimit() { - return 1; - } - }) - .background(getGUITextureSet().getItemSlot()) - .build() - .setPos(79, 34)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 1).startFromSlot(0).endAtSlot(0) + .slotCreator(index -> new BaseSlot(inventoryHandler, index) { + + @Override + public int getSlotStackLimit() { + return 1; + } + }).background(getGUITextureSet().getItemSlot()).build().setPos(79, 34)); break; } } 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 ca5f255302..669b3c9495 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 @@ -2,6 +2,13 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; +import net.minecraftforge.fluids.IFluidHandler; + import gregtech.api.enums.ItemList; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; @@ -14,21 +21,16 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Pollution; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; -import net.minecraftforge.fluids.IFluidHandler; 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); } @@ -59,21 +61,11 @@ 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 @@ -91,23 +83,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) { @@ -221,10 +213,11 @@ 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); @@ -262,9 +255,9 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity } } - if (aBaseMetaTileEntity.isServerSide()) - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() - && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); + if (aBaseMetaTileEntity.isServerSide()) aBaseMetaTileEntity.setActive( + aBaseMetaTileEntity.isAllowedToWork() + && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); } /** @@ -279,17 +272,14 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity 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... } } @@ -341,9 +331,8 @@ 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 31420386ee..cb9c670f05 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 @@ -2,37 +2,33 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; 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); } @@ -117,13 +113,8 @@ 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]; } @@ -131,18 +122,15 @@ 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 716d9d2c12..1296d846af 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,29 +4,25 @@ 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 632b8cca8b..501e78ccec 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 @@ -19,6 +19,29 @@ import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; import static gregtech.api.metatileentity.BaseTileEntity.UNUSED_SLOT_TOOLTIP; import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +import org.apache.commons.lang3.tuple.Pair; + import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.api.math.Pos2d; @@ -32,6 +55,7 @@ import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; import com.gtnewhorizons.modularui.common.widget.ProgressBar; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; @@ -55,31 +79,12 @@ import gregtech.common.gui.modularui.widget.FluidDisplaySlotWidget; 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.Collections; -import java.util.List; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; -import org.apache.commons.lang3.tuple.Pair; /** * 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 + * 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, IAddGregtechLogo, IAddUIWidgets { @@ -87,20 +92,14 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B /** * return values for checkRecipe() */ - protected static final int DID_NOT_FIND_RECIPE = 0, - FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, + 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; @@ -109,40 +108,23 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B protected final Power mPower; /** - * Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered + * 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; /** - * @param aOverlays 0 = SideFacingActive - * 1 = SideFacingInactive - * 2 = FrontFacingActive - * 3 = FrontFacingInactive - * 4 = TopFacingActive - * 5 = TopFacingInactive - * 6 = BottomFacingActive - * 7 = BottomFacingInactive - * ----- Not all Array Elements have to be initialised, you can also just use 8 Parameters for the Default Pipe Texture Overlays ----- - * 8 = BottomFacingPipeActive - * 9 = BottomFacingPipeInactive - * 10 = TopFacingPipeActive - * 11 = TopFacingPipeInactive - * 12 = SideFacingPipeActive - * 13 = SideFacingPipeInactive + * @param aOverlays 0 = SideFacingActive 1 = SideFacingInactive 2 = FrontFacingActive 3 = FrontFacingInactive 4 = + * TopFacingActive 5 = TopFacingInactive 6 = BottomFacingActive 7 = BottomFacingInactive ----- Not + * all Array Elements have to be initialised, you can also just use 8 Parameters for the Default + * Pipe Texture Overlays ----- 8 = BottomFacingPipeActive 9 = BottomFacingPipeInactive 10 = + * TopFacingPipeActive 11 = TopFacingPipeInactive 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, + 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, @@ -160,17 +142,8 @@ 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, + 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, @@ -188,16 +161,8 @@ 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)]; @@ -207,16 +172,8 @@ 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)]; @@ -253,12 +210,10 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B ITexture[][][] rTextures = new ITexture[14][17][]; 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]}; - } + 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] }; + } for (byte c = -1; c < 16; c++) { if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); @@ -280,28 +235,16 @@ 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 @@ -326,8 +269,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public boolean isValidSlot(int aIndex) { - return aIndex > 0 - && super.isValidSlot(aIndex) + return aIndex > 0 && super.isValidSlot(aIndex) && aIndex != getCircuitSlot() && aIndex != OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; } @@ -359,9 +301,7 @@ 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 @@ -456,8 +396,7 @@ 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 @@ -556,8 +495,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B aBaseMetaTileEntity, getLocalName(), mGUIName, - GT_Utility.isStringValid(mNEIName) - ? mNEIName + GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : ""); } @@ -565,8 +503,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B 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(); @@ -631,9 +569,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (mProgresstime < 0 || drainEnergyForProcess(mEUt)) { 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; + for (int j = 0; j < mOutputItems.length; j++) 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())) @@ -666,8 +604,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B boolean tRemovedOutputFluid = false; - if (doesAutoOutputFluids() - && getDrainableStack() != null + if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick % 20 == 0)) { IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); @@ -675,22 +612,21 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B FluidStack tDrained = drain(1000, false); if (tDrained != null) { int tFilledAmount = tTank.fill( - ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); - if (tFilledAmount > 0) - tTank.fill( - ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), - drain(tFilledAmount, true), - true); + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), + tDrained, + false); + if (tFilledAmount > 0) tTank.fill( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), + drain(tFilledAmount, true), + true); } } if (getDrainableStack() == null) tRemovedOutputFluid = true; } - if (doesAutoOutput() - && !isOutputEmpty() + if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing - && (tSucceeded - || mOutputBlocked % 300 == 1 + && (tSucceeded || mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0)) { TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); @@ -710,24 +646,21 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B (byte) 64, (byte) 1, tMaxStacks); - // for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && + // for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && // aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) { - // tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, + // 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 (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 + if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() + && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) @@ -764,11 +697,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } // Only using mNeedsSteamVenting right now and assigning it to 64 to space in the range for more single block // machine problems. - // Value | Class | Field - // 1 | GT_MetaTileEntity_BasicMachine | mStuttering - // 64 | GT_MetaTileEntity_BasicMachine_Bronze | mNeedsSteamVenting - aBaseMetaTileEntity.setErrorDisplayID( - (aBaseMetaTileEntity.getErrorDisplayID() & ~127)); // | (mStuttering ? 1 : 0)); + // Value | Class | Field + // 1 | GT_MetaTileEntity_BasicMachine | mStuttering + // 64 | GT_MetaTileEntity_BasicMachine_Bronze | mNeedsSteamVenting + aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127)); // | (mStuttering ? 1 : + // 0)); } protected void doDisplayThings() { @@ -798,8 +731,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()); } } } @@ -818,8 +751,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B /** * Calcualtes overclocked ness using long integers - * @param aEUt - recipe EUt - * @param aDuration - recipe Duration + * + * @param aEUt - recipe EUt + * @param aDuration - recipe Duration */ protected void calculateOverclockedNess(int aEUt, int aDuration) { mPower.computePowerUsageAndDuration(aEUt, aDuration); @@ -842,32 +776,27 @@ 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 + 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; - } + mOutputBlocked++; + return false; + } return true; } 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) { @@ -884,11 +813,10 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B protected boolean isOutputEmpty() { boolean rIsEmpty = true; - for (ItemStack tOutputSlotContent : getAllOutputs()) - if (tOutputSlotContent != null) { - rIsEmpty = false; - break; - } + for (ItemStack tOutputSlotContent : getAllOutputs()) if (tOutputSlotContent != null) { + rIsEmpty = false; + break; + } return rIsEmpty; } @@ -973,22 +901,30 @@ 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" }; } @Override @@ -1002,28 +938,29 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (aPlayer.isSneaking()) { mDisableFilter = !mDisableFilter; GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter." + mDisableFilter)); + aPlayer, + StatCollector.translateToLocal("GT5U.hatch.disableFilter." + mDisableFilter)); } else { mAllowInputFromOutputSide = !mAllowInputFromOutputSide; GT_Utility.sendChatToPlayer( aPlayer, - mAllowInputFromOutputSide - ? GT_Utility.trans("095", "Input from Output Side allowed") + 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) { + 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)); + aPlayer, + StatCollector.translateToLocal("GT5U.hatch.disableMultiStack." + mDisableMultiStack)); return true; } @@ -1045,10 +982,10 @@ 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() + if (aSide == mMainFacing || aIndex < getInputSlot() || aIndex >= getInputSlot() + mInputSlotCount - || (!mAllowInputFromOutputSide && aSide == aBaseMetaTileEntity.getFrontFacing())) return false; + || (!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; @@ -1056,12 +993,12 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } /** - * Test if given stack can be inserted into specified slot. - * 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. + * Test if given stack can be inserted into specified slot. 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; } @@ -1105,7 +1042,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } /** - * Override this to check the Recipes yourself, super calls to this could be useful if you just want to add a special case + * Override this to check the Recipes yourself, super calls to this could be useful if you just want to add a + * special case * <p/> * I thought about Enum too, but Enum doesn't add support for people adding other return Systems. * <p/> @@ -1129,8 +1067,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B /** * * @param skipOC disables OverclockedNess calculation and check - if you do you must implement your own method... - * @return DID_NOT_FIND_RECIPE = 0, - * FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, + * @return DID_NOT_FIND_RECIPE = 0, FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, * FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; */ public int checkRecipe(boolean skipOC) { @@ -1141,13 +1078,12 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mLastRecipe, false, V[mTier], - new FluidStack[] {getFillableStack()}, + new FluidStack[] { getFillableStack() }, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; - if (GT_Mod.gregtechproxy.mLowGravProcessing - && (tRecipe.mSpecialValue == -100 || tRecipe.mSpecialValue == -300) + 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; @@ -1156,26 +1092,25 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } if (tRecipe.mSpecialValue == -200 - && (getCallbackBase() == null - || !(getCallbackBase() instanceof GT_MetaTileEntity_Cleanroom) + && (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); - } - mOutputItems[i] = null; - } + 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) { calculateOverclockedNess(tRecipe); @@ -1187,64 +1122,64 @@ 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(); if (tag.getBoolean("stutteringSingleBlock")) { @@ -1254,35 +1189,40 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (isActive) { int mEUt = tag.getInteger("eut"); if (mEUt > 0) { - currenttip.add(StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.use", - GT_Utility.formatNumbers(mEUt), - GT_Utility.getColoredTierNameFromVoltage(mEUt))); + currenttip.add( + StatCollector.translateToLocalFormatted( + "GT5U.waila.energy.use", + GT_Utility.formatNumbers(mEUt), + GT_Utility.getColoredTierNameFromVoltage(mEUt))); } else if (mEUt < 0) { - currenttip.add(StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.produce", - GT_Utility.formatNumbers(-mEUt), - GT_Utility.getColoredTierNameFromVoltage(-mEUt))); + currenttip.add( + StatCollector.translateToLocalFormatted( + "GT5U.waila.energy.produce", + GT_Utility.formatNumbers(-mEUt), + GT_Utility.getColoredTierNameFromVoltage(-mEUt))); } } - currenttip.add(GT_Waila.getMachineProgressString( - isActive, tag.getInteger("maxProgressSingleBlock"), tag.getInteger("progressSingleBlock"))); + currenttip.add( + GT_Waila.getMachineProgressString( + isActive, + tag.getInteger("maxProgressSingleBlock"), + tag.getInteger("progressSingleBlock"))); } - currenttip.add(String.format( - "Machine Facing: %s", - ForgeDirection.getOrientation(tag.getInteger("mainFacingSingleBlock")) - .name())); + currenttip.add( + String.format( + "Machine Facing: %s", + ForgeDirection.getOrientation(tag.getInteger("mainFacingSingleBlock")).name())); - currenttip.add(String.format( - "Output Facing: %s", - ForgeDirection.getOrientation(tag.getInteger("outputFacingSingleBlock")) - .name())); + currenttip.add( + String.format( + "Output Facing: %s", + ForgeDirection.getOrientation(tag.getInteger("outputFacingSingleBlock")).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); tag.setInteger("progressSingleBlock", mProgresstime); @@ -1324,10 +1264,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (getRecipeList() != null) { getRecipeList().addGregTechLogoUI(builder, new Pos2d(0, 0)); } else { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(152, 63)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17) + .setPos(152, 63)); } } @@ -1342,31 +1281,32 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B builder.widget(createChargerSlot(79, 62)); if (getRecipeList() != null) { - builder.widget(setNEITransferRect( - createProgressBar( - isSteampowered() - ? getRecipeList().getProgressBarTextureSteam(getSteamVariant()) - : getRecipeList().getProgressBarTexture(), - getRecipeList().getProgressBarImageSize(), - getRecipeList().progressBarDirection, - getRecipeList().progressBarPos, - getRecipeList().progressBarSize), - getRecipeList().mNEIName)); + builder.widget( + setNEITransferRect( + createProgressBar( + isSteampowered() ? getRecipeList().getProgressBarTextureSteam(getSteamVariant()) + : getRecipeList().getProgressBarTexture(), + getRecipeList().getProgressBarImageSize(), + getRecipeList().progressBarDirection, + getRecipeList().progressBarPos, + getRecipeList().progressBarSize), + getRecipeList().mNEIName)); addProgressBarSpecialTextures(builder); } - builder.widget(createErrorStatusArea( - builder, - isSteampowered() ? GT_UITextures.PICTURE_STALLED_STEAM : GT_UITextures.PICTURE_STALLED_ELECTRICITY)); + builder.widget( + createErrorStatusArea( + builder, + isSteampowered() ? GT_UITextures.PICTURE_STALLED_STEAM + : GT_UITextures.PICTURE_STALLED_ELECTRICITY)); } /** * Adds item I/O, special item, and fluid I/O slots. */ protected void addIOSlots(ModularWindow.Builder builder) { - final boolean hasFluidInput = - getRecipeList() != null ? (getRecipeList().hasFluidInputs()) : (getCapacity() != 0); - final boolean hasFluidOutput = - getRecipeList() != null && getRecipeList().hasFluidOutputs(); + final boolean hasFluidInput = getRecipeList() != null ? (getRecipeList().hasFluidInputs()) + : (getCapacity() != 0); + final boolean hasFluidOutput = getRecipeList() != null && getRecipeList().hasFluidOutputs(); UIHelper.forEachSlots( (i, backgrounds, pos) -> builder.widget(createItemInputSlot(i, backgrounds, pos)), (i, backgrounds, pos) -> builder.widget(createItemOutputSlot(i, backgrounds, pos)), @@ -1388,59 +1328,48 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B * Override this as needed instead of calling. */ protected SlotWidget createItemInputSlot(int index, IDrawable[] backgrounds, Pos2d pos) { - return (SlotWidget) new SlotWidget(inventoryHandler, getInputSlot() + index) - .setAccess(true, true) - .setBackground(backgrounds) - .setPos(pos); + return (SlotWidget) new SlotWidget(inventoryHandler, getInputSlot() + index).setAccess(true, true) + .setBackground(backgrounds).setPos(pos); } /** * Override this as needed instead of calling. */ protected SlotWidget createItemOutputSlot(int index, IDrawable[] backgrounds, Pos2d pos) { - return (SlotWidget) new SlotWidget(inventoryHandler, getOutputSlot() + index) - .setAccess(true, false) - .setBackground(backgrounds) - .setPos(pos); + return (SlotWidget) new SlotWidget(inventoryHandler, getOutputSlot() + index).setAccess(true, false) + .setBackground(backgrounds).setPos(pos); } /** * Override this as needed instead of calling. */ protected SlotWidget createSpecialSlot(IDrawable[] backgrounds, Pos2d pos) { - return (SlotWidget) new SlotWidget(inventoryHandler, getSpecialSlotIndex()) - .setAccess(true, true) + return (SlotWidget) new SlotWidget(inventoryHandler, getSpecialSlotIndex()).setAccess(true, true) .disableShiftInsert() - .setGTTooltip(() -> mTooltipCache.getData( - getRecipeList() != null && getRecipeList().usesSpecialSlot() - ? SPECIAL_SLOT_TOOLTIP - : UNUSED_SLOT_TOOLTIP)) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setBackground(backgrounds) - .setPos(pos); + .setGTTooltip( + () -> mTooltipCache.getData( + getRecipeList() != null && getRecipeList().usesSpecialSlot() ? SPECIAL_SLOT_TOOLTIP + : UNUSED_SLOT_TOOLTIP)) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setBackground(backgrounds).setPos(pos); } protected FluidDisplaySlotWidget createFluidInputSlot(IDrawable[] backgrounds, Pos2d pos) { return (FluidDisplaySlotWidget) new FluidDisplaySlotWidget( - inventoryHandler, OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length) - .setFluidAccessConstructor(() -> constructFluidAccess(true)) - .setIHasFluidDisplay(this) - .setCanDrain(true) - .setCanFill(true) - .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER) - .setBeforeRealClick((clickData, widget) -> { - if (NetworkUtils.isClient()) { - // propagate display item content to actual fluid stored in this tank - setFillableStack(GT_Utility.getFluidFromDisplayStack( - widget.getMcSlot().getStack())); - } - return true; - }) - .setUpdateFluidDisplayItem(this::updateFluidInputDisplayItem) - .setGTTooltip(() -> mTooltipCache.getData(FLUID_INPUT_TOOLTIP, GT_Utility.formatNumbers(getCapacity()))) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setBackground(backgrounds) - .setPos(pos); + inventoryHandler, + OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length) + .setFluidAccessConstructor(() -> constructFluidAccess(true)).setIHasFluidDisplay(this) + .setCanDrain(true).setCanFill(true).setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER) + .setBeforeRealClick((clickData, widget) -> { + if (NetworkUtils.isClient()) { + // propagate display item content to actual fluid stored in this tank + setFillableStack(GT_Utility.getFluidFromDisplayStack(widget.getMcSlot().getStack())); + } + return true; + }).setUpdateFluidDisplayItem(this::updateFluidInputDisplayItem) + .setGTTooltip( + () -> mTooltipCache + .getData(FLUID_INPUT_TOOLTIP, GT_Utility.formatNumbers(getCapacity()))) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setBackground(backgrounds).setPos(pos); } protected FluidDisplaySlotWidget createFluidOutputSlot(IDrawable[] backgrounds, Pos2d pos) { @@ -1448,9 +1377,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B .setUpdateFluidDisplayItem(this::updateFluidOutputDisplayItem) .setGTTooltip( () -> mTooltipCache.getData(FLUID_OUTPUT_TOOLTIP, GT_Utility.formatNumbers(getCapacity()))) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setBackground(backgrounds) - .setPos(pos); + .setTooltipShowUpDelay(TOOLTIP_DELAY).setBackground(backgrounds).setPos(pos); } @Override @@ -1464,35 +1391,26 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } protected CycleButtonWidget createItemAutoOutputButton() { - return (CycleButtonWidget) new CycleButtonWidget() - .setToggle(() -> mItemTransfer, val -> mItemTransfer = val) + return (CycleButtonWidget) new CycleButtonWidget().setToggle(() -> mItemTransfer, val -> mItemTransfer = val) .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_ITEM) .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setGTTooltip(() -> mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP)) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(25, 62) - .setSize(18, 18); + .setGTTooltip(() -> mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP)).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setPos(25, 62).setSize(18, 18); } protected CycleButtonWidget createFluidAutoOutputButton() { - return (CycleButtonWidget) new CycleButtonWidget() - .setToggle(() -> mFluidTransfer, val -> mFluidTransfer = val) + return (CycleButtonWidget) new CycleButtonWidget().setToggle(() -> mFluidTransfer, val -> mFluidTransfer = val) .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_FLUID) .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setGTTooltip(() -> mTooltipCache.getData(FLUID_TRANSFER_TOOLTIP)) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(7, 62) - .setSize(18, 18); + .setGTTooltip(() -> mTooltipCache.getData(FLUID_TRANSFER_TOOLTIP)).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setPos(7, 62).setSize(18, 18); } - protected ProgressBar createProgressBar( - UITexture texture, int imageSize, ProgressBar.Direction direction, Pos2d pos, Size size) { + protected ProgressBar createProgressBar(UITexture texture, int imageSize, ProgressBar.Direction direction, + Pos2d pos, Size size) { final ProgressBar ret = new ProgressBar(); ret.setProgress(() -> maxProgresstime() != 0 ? (float) getProgresstime() / maxProgresstime() : 0) - .setTexture(texture, imageSize) - .setDirection(direction) - .setPos(pos) - .setSize(size); + .setTexture(texture, imageSize).setDirection(direction).setPos(pos).setSize(size); return ret; } @@ -1505,13 +1423,13 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B final Power powerInfo = getPower(); final String transferRectTooltip; if (isSteampowered()) { - transferRectTooltip = - StatCollector.translateToLocalFormatted(NEI_TRANSFER_STEAM_TOOLTIP, powerInfo.getTierString()); + transferRectTooltip = StatCollector + .translateToLocalFormatted(NEI_TRANSFER_STEAM_TOOLTIP, powerInfo.getTierString()); } else { - transferRectTooltip = StatCollector.translateToLocalFormatted( - NEI_TRANSFER_VOLTAGE_TOOLTIP, powerInfo.getTierString()); + transferRectTooltip = StatCollector + .translateToLocalFormatted(NEI_TRANSFER_VOLTAGE_TOOLTIP, powerInfo.getTierString()); } - widget.setNEITransferRect(transferRectID, new Object[] {powerInfo}, transferRectTooltip); + widget.setNEITransferRect(transferRectID, new Object[] { powerInfo }, transferRectTooltip); } return widget; } @@ -1519,30 +1437,25 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B protected void addProgressBarSpecialTextures(ModularWindow.Builder builder) { if (isSteampowered()) { for (Pair<SteamTexture, Pair<Size, Pos2d>> specialTexture : getRecipeList().specialTexturesSteam) { - builder.widget(new DrawableWidget() - .setDrawable(specialTexture.getLeft().get(getSteamVariant())) - .setSize(specialTexture.getRight().getLeft()) - .setPos(specialTexture.getRight().getRight())); + builder.widget( + new DrawableWidget().setDrawable(specialTexture.getLeft().get(getSteamVariant())) + .setSize(specialTexture.getRight().getLeft()) + .setPos(specialTexture.getRight().getRight())); } } else { for (Pair<IDrawable, Pair<Size, Pos2d>> specialTexture : getRecipeList().specialTextures) { - builder.widget(new DrawableWidget() - .setDrawable(specialTexture.getLeft()) - .setSize(specialTexture.getRight().getLeft()) - .setPos(specialTexture.getRight().getRight())); + builder.widget( + new DrawableWidget().setDrawable(specialTexture.getLeft()) + .setSize(specialTexture.getRight().getLeft()) + .setPos(specialTexture.getRight().getRight())); } } } protected DrawableWidget createErrorStatusArea(ModularWindow.Builder builder, IDrawable picture) { - return (DrawableWidget) new DrawableWidget() - .setDrawable(picture) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setEnabled(widget -> !widget.getTooltip().isEmpty()) - .dynamicTooltip(this::getErrorDescriptions) - .dynamicTooltipShift(this::getErrorDescriptionsShift) - .setPos(79, 44) - .setSize(18, 18) + return (DrawableWidget) new DrawableWidget().setDrawable(picture).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setEnabled(widget -> !widget.getTooltip().isEmpty()).dynamicTooltip(this::getErrorDescriptions) + .dynamicTooltipShift(this::getErrorDescriptionsShift).setPos(79, 44).setSize(18, 18) .attachSyncer( new FakeSyncWidget.BooleanSyncer(() -> mStuttering, val -> mStuttering = val), builder, 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 468566e582..9bccd8f093 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 @@ -4,8 +4,16 @@ import static gregtech.api.enums.GT_Values.D1; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +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 com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; + import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; import gregtech.api.enums.ParticleFX; @@ -22,30 +30,20 @@ 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; /** * 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 + * 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_Bronze extends GT_MetaTileEntity_BasicMachine { + 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) { + public GT_MetaTileEntity_BasicMachine_Bronze(int aID, String aName, String aNameRegional, String aDescription, + int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) { super( aID, aName, @@ -59,23 +57,13 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE ""); } - 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, "", ""); } - 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, "", ""); } @@ -173,51 +161,27 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE @Override public boolean allowToCheckRecipe() { if (mNeedsSteamVenting - && getBaseMetaTileEntity() - .getCoverIDAtSide(getBaseMetaTileEntity().getFrontFacing()) - == 0 + && 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))) { + 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() + 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) + 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) + getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1) + 1, - getBaseMetaTileEntity() - .getOffsetZ( - getBaseMetaTileEntity() - .getFrontFacing(), - 1) + getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1) + 1))) { GT_Utility.applyHeatDamage(tLiving, getSteamDamage()); } @@ -230,11 +194,13 @@ 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)) + 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); @@ -261,27 +227,17 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE if (aIndex == 9) { GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 5, 1.0F, aX, aY, aZ); - new ParticleEventBuilder() - .setIdentifier(ParticleFX.CLOUD) - .setWorld(getBaseMetaTileEntity().getWorld()) + 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( + 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()); + aZ - 0.5 + XSTR_INSTANCE.nextFloat()).run()); } } @@ -302,134 +258,100 @@ 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) }; } @Override @@ -444,9 +366,7 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE @Override public void addGregTechLogo(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(152, 63)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(152, 63)); } } 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 75b055324a..7976ea94c6 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 @@ -6,11 +6,23 @@ 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 java.util.Locale; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.api.math.Pos2d; import com.gtnewhorizons.modularui.api.math.Size; import com.gtnewhorizons.modularui.common.widget.ProgressBar; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -31,23 +43,15 @@ 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; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; /** * 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 + * This is the main construct for my Basic Machines such as the Automatic Extractor Extend this class to make a simple + * Machine */ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_BasicMachine { + private final GT_Recipe.GT_Recipe_Map mRecipes; private final int mTankCapacity; private final SpecialEffects mSpecialEffect; @@ -56,25 +60,10 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ private final byte mGUIParameterA, mGUIParameterB; private FallbackableUITexture progressBarTexture; - 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) { + 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, @@ -87,69 +76,89 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ aGUIName, aRecipes.mNEIName, TextureFactory.of( - TextureFactory.of(new CustomIcon( - "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), + 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()), + .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.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()), + .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.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()), + .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.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()), + .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.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()), + .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.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()), + .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.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()), + .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.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())); + .addIcon( + (new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_BOTTOM_GLOW"))) + .glow().build())); this.mSharedTank = aSharedTank; this.mTankCapacity = aTankCapacity; this.mSpecialEffect = aSpecialEffect; @@ -891,36 +900,19 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ if (!GT_ModHandler.addCraftingRecipe( getStackForm(1), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.BUFFERED + 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()); + 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) { + 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) { this( aID, aName, @@ -944,31 +936,15 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ /** * @inheritDoc - * @deprecated Use {@link #GT_MetaTileEntity_BasicMachine_GT_Recipe( - * int aID, String, String, int, String, GT_Recipe.GT_Recipe_Map, - * int, int, int, int, int, String, ResourceLocation, boolean, - * boolean, SpecialEffects, String , Object[])} + * @deprecated Use {@link #GT_MetaTileEntity_BasicMachine_GT_Recipe( int aID, String, String, int, String, + * GT_Recipe.GT_Recipe_Map, int, int, int, int, int, String, ResourceLocation, boolean, boolean, + * SpecialEffects, String , Object[])} */ @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) { + 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, @@ -990,24 +966,10 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ 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) { + 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) { super(aName, aTier, aAmperage, aDescription, aTextures, aInputSlots, aOutputSlots, aGUIName, aNEIName); this.mSharedTank = aSharedTank; this.mTankCapacity = aTankCapacity; @@ -1019,24 +981,10 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ this.mGUIParameterB = (byte) aGUIParameterB; } - 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) { + 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) { super(aName, aTier, aAmperage, aDescription, aTextures, aInputSlots, aOutputSlots, aGUIName, aNEIName); this.mSharedTank = aSharedTank; this.mTankCapacity = aTankCapacity; @@ -1051,24 +999,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()) - .setProgressBarTexture(this.progressBarTexture); + 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()).setProgressBarTexture(this.progressBarTexture); } public GT_MetaTileEntity_BasicMachine_GT_Recipe setProgressBarTexture(FallbackableUITexture progressBarTexture) { @@ -1097,67 +1044,61 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ aBaseMetaTileEntity, this.getLocalName(), this.mGUIName, - GT_Utility.isStringValid(this.mNEIName) - ? this.mNEIName + 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); - 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.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; 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 (GT_Utility.isStackValid(aStack)) - for (int oreID : OreDictionary.getOreIDs(aStack)) { - if (OreDictionary.getOreName(oreID).startsWith("circuit")) return true; - } + 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; + } } return this.getRecipeList().containsInput(aStack); } @@ -1173,7 +1114,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPreTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isClientSide() && aBaseMetaTileEntity.isActive()) { - //noinspection SwitchStatementWithTooFewBranches + // noinspection SwitchStatementWithTooFewBranches switch (this.mSpecialEffect) { case TOP_SMOKE: final byte topFacing = (byte) ForgeDirection.UP.ordinal(); @@ -1182,15 +1123,13 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { - new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setMotion(0.0D, 0.0D, 0.0D) + 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(); + .setWorld(aBaseMetaTileEntity.getWorld()).run(); } break; default: @@ -1208,7 +1147,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ @Override public void onRandomDisplayTick(IGregTechTileEntity aBaseMetaTileEntity) { - //noinspection SwitchStatementWithTooFewBranches + // noinspection SwitchStatementWithTooFewBranches switch (this.mSpecialEffect) { case MAIN_RANDOM_SPARKS: // Random Sparkles at main face @@ -1216,8 +1155,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ final byte mainFacing = (byte) this.mMainFacing; - if (mainFacing > 1 - && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 + if (mainFacing > 1 && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { final double oX = aBaseMetaTileEntity.getXCoord(); @@ -1253,10 +1191,8 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ mZ = .05D; } - ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()) - .setMotion(mX, 0, mZ) - .setPosition(x, y, z) - .setWorld(getBaseMetaTileEntity().getWorld()); + ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(mX, 0, mZ) + .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.LAVA).run(); } } @@ -1279,8 +1215,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 1 - && this.mSoundResourceLocation != null + if (aIndex == 1 && this.mSoundResourceLocation != null && GT_Utility.isStringValid(this.mSoundResourceLocation.getResourceDomain()) && GT_Utility.isStringValid(this.mSoundResourceLocation.getResourcePath())) GT_Utility.doSoundAtClient(this.mSoundResourceLocation, 100, 1.0F, aX, aY, aZ); @@ -1316,8 +1251,8 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ } @Override - protected ProgressBar createProgressBar( - UITexture texture, int imageSize, ProgressBar.Direction direction, Pos2d pos, Size size) { + protected ProgressBar createProgressBar(UITexture texture, int imageSize, ProgressBar.Direction direction, + Pos2d pos, Size size) { return super.createProgressBar(texture, imageSize, direction, pos, size) .setTexture(progressBarTexture.get(), mRecipes.getProgressBarImageSize()); } @@ -1352,11 +1287,12 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ * Special Effects */ public enum SpecialEffects { + NONE, 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 592d27f74f..3488ab25c1 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 @@ -19,39 +19,24 @@ import gregtech.common.power.SteamPower; /** * 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 + * 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_Steel extends GT_MetaTileEntity_BasicMachine_Bronze implements IGetTitleColor { - 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); } @@ -62,134 +47,100 @@ 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) }; } @Override 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 0207178559..1286c84c9b 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 @@ -1,11 +1,19 @@ package gregtech.api.metatileentity.implementations; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.enums.ItemList; import gregtech.api.gui.GT_Container_BasicTank; import gregtech.api.gui.GT_GUIContainer_BasicTank; @@ -17,12 +25,6 @@ import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import gregtech.common.gui.modularui.widget.FluidDisplaySlotWidget; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -38,35 +40,23 @@ 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); } @@ -135,7 +125,8 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } /** - * If you override this and change the field returned, be sure to override {@link #isDrainableStackSeparate()} as well! + * If you override this and change the field returned, be sure to override {@link #isDrainableStackSeparate()} as + * well! */ public FluidStack getDrainableStack() { return mFluid; @@ -217,8 +208,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); @@ -236,8 +227,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()); } } } @@ -254,11 +245,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 + if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() - || !isFluidInputAllowed(aFluid)) return 0; + || !isFluidInputAllowed(aFluid)) + return 0; if (getFillableStack() == null || getFillableStack().getFluid().getID() <= 0) { if (aFluid.amount <= getCapacity()) { @@ -322,12 +313,10 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { 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) }; } } @@ -347,44 +336,32 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setPos(7, 16) - .setSize(71, 45)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_GAUGE) - .setPos(79, 34) - .setSize(18, 18)) - .widget(new SlotWidget(inventoryHandler, getInputSlot()) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN) - .setPos(79, 16)) - .widget(new SlotWidget(inventoryHandler, getOutputSlot()) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT) - .setPos(79, 52)) - .widget(createDrainableFluidSlot() - .setBackground(GT_UITextures.TRANSPARENT) - .setPos(58, 41)) - .widget(new TextWidget("Liquid Amount") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(10, 20)) - .widget(TextWidget.dynamicString( - () -> GT_Utility.parseNumberToString(mFluid != null ? mFluid.amount : 0)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(10, 30)); + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45)) + .widget(new DrawableWidget().setDrawable(GT_UITextures.PICTURE_GAUGE).setPos(79, 34).setSize(18, 18)) + .widget( + new SlotWidget(inventoryHandler, getInputSlot()) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN) + .setPos(79, 16)) + .widget( + new SlotWidget(inventoryHandler, getOutputSlot()) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT) + .setPos(79, 52)) + .widget(createDrainableFluidSlot().setBackground(GT_UITextures.TRANSPARENT).setPos(58, 41)) + .widget(new TextWidget("Liquid Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20)).widget( + TextWidget + .dynamicString(() -> GT_Utility.parseNumberToString(mFluid != null ? mFluid.amount : 0)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30)); } protected FluidDisplaySlotWidget createDrainableFluidSlot() { return new FluidDisplaySlotWidget(inventoryHandler, getStackDisplaySlot()) - .setFluidAccessConstructor(() -> constructFluidAccess(false)) - .setIHasFluidDisplay(this) - .setCanDrain(true) - .setCanFill(!isDrainableStackSeparate()) - .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER) - .setBeforeRealClick((clickData, widget) -> { + .setFluidAccessConstructor(() -> constructFluidAccess(false)).setIHasFluidDisplay(this) + .setCanDrain(true).setCanFill(!isDrainableStackSeparate()) + .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER).setBeforeRealClick((clickData, widget) -> { if (NetworkUtils.isClient()) { // propagate display item content to actual fluid stored in this tank - setDrainableStack(GT_Utility.getFluidFromDisplayStack( - widget.getMcSlot().getStack())); + setDrainableStack(GT_Utility.getFluidFromDisplayStack(widget.getMcSlot().getStack())); } return true; }); @@ -395,6 +372,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } protected static class BasicTankFluidAccess implements IFluidAccess { + protected final GT_MetaTileEntity_BasicTank mTank; protected final boolean mIsFillableStack; 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 6d327646fe..827f2b2ec9 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 @@ -3,22 +3,26 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.Textures.BlockIcons.*; +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 com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.ButtonWidget; import com.gtnewhorizons.modularui.common.widget.SlotGroup; + import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.gui.modularui.GT_UITextures; 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; 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; private static final int ARROW_DOWN_INDEX = 2; @@ -28,30 +32,27 @@ 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, + 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) { + 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); } @@ -60,37 +61,28 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM ITexture[][][] rTextures = new ITexture[ForgeDirection.VALID_DIRECTIONS.length][17][]; ITexture tIcon = getOverlayIcon(); ITexture tOut = TextureFactory.of(OVERLAY_PIPE_OUT); - ITexture tUp = TextureFactory.of( - TextureFactory.of(ARROW_UP), - TextureFactory.builder().addIcon(ARROW_UP_GLOW).glow().build()); - ITexture tDown = TextureFactory.of( - TextureFactory.of(ARROW_DOWN), - TextureFactory.builder().addIcon(ARROW_DOWN_GLOW).glow().build()); - ITexture tLeft = TextureFactory.of( - TextureFactory.of(ARROW_LEFT), - TextureFactory.builder().addIcon(ARROW_LEFT_GLOW).glow().build()); - ITexture tRight = TextureFactory.of( - TextureFactory.of(ARROW_RIGHT), - TextureFactory.builder().addIcon(ARROW_RIGHT_GLOW).glow().build()); + ITexture tUp = TextureFactory + .of(TextureFactory.of(ARROW_UP), TextureFactory.builder().addIcon(ARROW_UP_GLOW).glow().build()); + ITexture tDown = TextureFactory + .of(TextureFactory.of(ARROW_DOWN), TextureFactory.builder().addIcon(ARROW_DOWN_GLOW).glow().build()); + ITexture tLeft = TextureFactory + .of(TextureFactory.of(ARROW_LEFT), TextureFactory.builder().addIcon(ARROW_LEFT_GLOW).glow().build()); + ITexture tRight = TextureFactory + .of(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]; @@ -278,14 +270,15 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM 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); + 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); @@ -313,10 +306,8 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isAllowedToWork() - && aBaseMetaTileEntity.isServerSide() - && (aBaseMetaTileEntity.hasWorkJustBeenEnabled() - || aBaseMetaTileEntity.hasInventoryBeenModified() + if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide() + && (aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified() || aTimer % 200 == 0 || mSuccess > 0)) { mSuccess--; @@ -337,32 +328,30 @@ 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 (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; @@ -420,8 +409,8 @@ 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; @@ -440,84 +429,73 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM } protected void addEmitEnergyButton(ModularWindow.Builder builder) { - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - bOutput = !bOutput; - if (bOutput) { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("116", "Emit Energy to Outputside")); - } else { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("117", "Don't emit Energy")); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_EMIT_ENERGY) - .setPos(7, 62) + builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> { + bOutput = !bOutput; + if (bOutput) { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("116", "Emit Energy to Outputside")); + } else { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("117", "Don't emit Energy")); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_EMIT_ENERGY).setPos(7, 62) .setSize(18, 18)); } protected void addEmitRedstoneButton(ModularWindow.Builder builder) { - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - bRedstoneIfFull = !bRedstoneIfFull; - if (bRedstoneIfFull) { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), - GT_Utility.trans("118", "Emit Redstone if no Slot is free")); - } else { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("119", "Don't emit Redstone")); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_EMIT_REDSTONE) - .setPos(25, 62) + builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> { + bRedstoneIfFull = !bRedstoneIfFull; + if (bRedstoneIfFull) { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("118", "Emit Redstone if no Slot is free")); + } else { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("119", "Don't emit Redstone")); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_EMIT_REDSTONE).setPos(25, 62) .setSize(18, 18)); } protected void addInvertRedstoneButton(ModularWindow.Builder builder) { - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - bInvert = !bInvert; - if (bInvert) { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("120", "Invert Redstone")); - } else { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("121", "Don't invert Redstone")); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_INVERT_REDSTONE) - .setPos(43, 62) + builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> { + bInvert = !bInvert; + if (bInvert) { + GT_Utility + .sendChatToPlayer(widget.getContext().getPlayer(), GT_Utility.trans("120", "Invert Redstone")); + } else { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("121", "Don't invert Redstone")); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_INVERT_REDSTONE).setPos(43, 62) .setSize(18, 18)); } protected void addStockingModeButton(ModularWindow.Builder builder) { - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - bStockingMode = !bStockingMode; - if (bStockingMode) { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), - GT_Utility.trans( - "217", - "Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); - } else { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), - GT_Utility.trans( - "218", - "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_STOCKING_MODE) - .setPos(61, 62) + builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> { + bStockingMode = !bStockingMode; + if (bStockingMode) { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans( + "217", + "Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); + } else { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans( + "218", + "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_STOCKING_MODE).setPos(61, 62) .setSize(18, 18)); } protected void addInventorySlots(ModularWindow.Builder builder) { - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 9) - .endAtSlot(26) - .build() - .setPos(7, 4)); + builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 9).endAtSlot(26).build().setPos(7, 4)); } } 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 3e3433e52c..830706f8fe 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 @@ -6,62 +6,63 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElement import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_HatchElement.*; +import java.util.List; + +import net.minecraft.item.ItemStack; + import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.IStructureElement; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; 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.item.ItemStack; /** - * 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. + * 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. * <p> - * Note: You cannot use different casing for the same Class. Make a new subclass for it. You also should not change the casing - * dynamically, i.e. it should be a dumb method returning some sort of constant. + * Note: You cannot use different casing for the same Class. Make a new subclass for it. You also should not change the + * casing dynamically, i.e. it should be a dumb method returning some sort of constant. * <p> - * Implementation tips: - * 1. To restrict hatches, override {@link #addDynamoToMachineList(IGregTechTileEntity, int)} and its cousins instead of overriding the whole - * {@link #getStructureDefinition()} or change {@link #checkHatches(IGregTechTileEntity, ItemStack)}. The former is a total overkill, while the later cannot - * stop the structure check early. - * 2. To limit rotation, override {@link #getInitialAlignmentLimits()} + * Implementation tips: 1. To restrict hatches, override {@link #addDynamoToMachineList(IGregTechTileEntity, int)} and + * its cousins instead of overriding the whole {@link #getStructureDefinition()} or change + * {@link #checkHatches(IGregTechTileEntity, ItemStack)}. The former is a total overkill, while the later cannot stop + * the structure check early. 2. To limit rotation, override {@link #getInitialAlignmentLimits()} * * @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(); - } - }; + 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) { @@ -73,7 +74,8 @@ public abstract class GT_MetaTileEntity_CubicMultiBlockBase<T extends GT_MetaTil } /** - * Create a simple 3x3x3 hollow cubic structure made of a single type of machine casing and accepts hatches everywhere. + * 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}. */ @@ -97,8 +99,7 @@ public abstract class GT_MetaTileEntity_CubicMultiBlockBase<T extends GT_MetaTil @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mCasingAmount = 0; - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) - && mCasingAmount >= getRequiredCasingCount() + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) && mCasingAmount >= getRequiredCasingCount() && checkHatches(aBaseMetaTileEntity, aStack); } 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 32f607c0a7..0b1827bcdb 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 @@ -1,5 +1,11 @@ package gregtech.api.metatileentity.implementations; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; @@ -11,25 +17,22 @@ import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; + import cpw.mods.fml.common.network.NetworkRegistry; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -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> - * 1. TecTech style declarative structure check utilizing StructureLib. - * 2. Arbitrarily rotating the whole structure, if allowed to. + * 1. TecTech style declarative structure check utilizing StructureLib. 2. Arbitrarily rotating the whole structure, if + * allowed to. * * @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(); @@ -76,8 +79,8 @@ public abstract class GT_MetaTileEntity_EnhancedMultiBlockBase<T extends GT_Meta } @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 (aWrenchingSide != getBaseMetaTileEntity().getFrontFacing()) return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); if (aPlayer.isSneaking()) { @@ -106,9 +109,9 @@ public abstract class GT_MetaTileEntity_EnhancedMultiBlockBase<T extends GT_Meta } /** - * 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. + * 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(); @@ -149,142 +152,118 @@ public abstract class GT_MetaTileEntity_EnhancedMultiBlockBase<T extends GT_Meta * * 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. + * 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); + 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) { + protected final boolean buildPiece(String piece, ItemStack trigger, boolean hintOnly, 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().buildOrHints( + this, + trigger, + piece, + tTile.getWorld(), + getExtendedFacing(), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + horizontalOffset, + verticalOffset, + depthOffset, + hintOnly); } @Deprecated - protected final int survivialBuildPiece( - String piece, - ItemStack trigger, - int horizontalOffset, - int verticalOffset, - int depthOffset, - int elementsBudget, - IItemSource source, - EntityPlayerMP actor, - boolean 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); + 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, - ISurvivalBuildEnvironment env, - boolean check) { + protected final int survivialBuildPiece(String piece, ItemStack trigger, int horizontalOffset, int verticalOffset, + int depthOffset, int elementsBudget, ISurvivalBuildEnvironment env, 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, - env, - check); + return getCastedStructureDefinition().survivalBuild( + this, + trigger, + piece, + tTile.getWorld(), + getExtendedFacing(), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + horizontalOffset, + verticalOffset, + depthOffset, + elementsBudget, + env, + check); } @Deprecated - protected final int survivialBuildPiece( - String piece, - ItemStack trigger, - int horizontalOffset, - int verticalOffset, - int depthOffset, - int elementsBudget, - IItemSource source, - EntityPlayerMP actor, - boolean 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); + piece, + trigger, + horizontalOffset, + verticalOffset, + depthOffset, + elementsBudget, + source, + actor, + check); if (checkIfPlaced && built > 0) checkStructure(true, getBaseMetaTileEntity()); return built; } - protected final int survivialBuildPiece( - String piece, - ItemStack trigger, - int horizontalOffset, - int verticalOffset, - int depthOffset, - int elementsBudget, - ISurvivalBuildEnvironment env, - boolean check, - boolean checkIfPlaced) { + protected final int survivialBuildPiece(String piece, ItemStack trigger, int horizontalOffset, int verticalOffset, + int depthOffset, int elementsBudget, ISurvivalBuildEnvironment env, boolean check, boolean checkIfPlaced) { int built = survivialBuildPiece( - piece, trigger, horizontalOffset, verticalOffset, depthOffset, elementsBudget, env, check); + piece, + trigger, + horizontalOffset, + verticalOffset, + depthOffset, + elementsBudget, + env, + check); if (checkIfPlaced && built > 0) checkStructure(true, getBaseMetaTileEntity()); return built; } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java index 329ba45df5..11f3eeb9cc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java @@ -2,11 +2,9 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.*; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_ExoticEnergyInputHelper; -import gregtech.api.util.GT_Utility; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -15,11 +13,14 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_ExoticEnergyInputHelper; +import gregtech.api.util.GT_Utility; + /** * Multiblock base class that allows machine to use power over int. */ -public abstract class GT_MetaTileEntity_ExtendedPowerMultiBlockBase< - T extends GT_MetaTileEntity_EnhancedMultiBlockBase<T>> +public abstract class GT_MetaTileEntity_ExtendedPowerMultiBlockBase<T extends GT_MetaTileEntity_EnhancedMultiBlockBase<T>> extends GT_MetaTileEntity_EnhancedMultiBlockBase<T> { public long lEUt; @@ -46,8 +47,8 @@ public abstract class GT_MetaTileEntity_ExtendedPowerMultiBlockBase< } @Override - protected void calculateOverclockedNessMultiInternal( - long aEUt, int aDuration, int mAmperage, long maxInputVoltage, boolean perfectOC) { + protected void calculateOverclockedNessMultiInternal(long aEUt, int aDuration, int mAmperage, long maxInputVoltage, + boolean perfectOC) { // 5% space for cable loss long zMaxInputVoltage = maxInputVoltage / 100L * 95L; long zTime = aDuration; @@ -112,8 +113,8 @@ public abstract class GT_MetaTileEntity_ExtendedPowerMultiBlockBase< } @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); final IGregTechTileEntity tileEntity = getBaseMetaTileEntity(); @@ -145,29 +146,57 @@ public abstract class GT_MetaTileEntity_ExtendedPowerMultiBlockBase< long amps = getMaxInputAmps(); 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(getActualEnergyUsage()) + EnumChatFormatting.RESET + " EU/t", - /* 4*/ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(voltage) + EnumChatFormatting.RESET + " EU/t(*" + amps + " A)" - + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " + EnumChatFormatting.YELLOW - + VN[GT_Utility.getTier(voltage)] + 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 + " %" - }; + /* 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(getActualEnergyUsage()) + + EnumChatFormatting.RESET + + " EU/t", + /* 4 */ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(voltage) + + EnumChatFormatting.RESET + + " EU/t(*" + + amps + + " A)" + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier(voltage)] + + 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 + + " %" }; } @Override 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 f1ccdd04e4..a8e505b806 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 @@ -1,10 +1,11 @@ package gregtech.api.metatileentity.implementations; +import net.minecraft.nbt.NBTTagCompound; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.nbt.NBTTagCompound; /** * Handles texture changes internally. No special calls are necessary other than updateTexture in add***ToMachineList. @@ -26,35 +27,23 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan 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); } @@ -72,35 +61,29 @@ 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 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 texturePointer = (byte) (actualTexture & 0x7F); // just to be sure, from my testing the 8th bit cannot be + // set clientside int textureIndex = texturePointer | (mTexturePage << 7); // Shift seven since one page is 128 textures! 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]); + else 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]); } } } catch (NullPointerException npe) { - return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[0][0]}; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[0][0] }; } } @@ -117,13 +100,15 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan 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 + 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) { @@ -133,7 +118,8 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan /** * Sets texture with page and index, rather unusable, but kept FFS - * @param page page of texure + * + * @param page page of texure * @param index index of texure */ @Deprecated @@ -149,7 +135,8 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan mTexturePage = 0; } - /** Get the maximum amount of amperes to work with, which excludes the additional amps in for loss + /** + * Get the maximum amount of amperes to work with, which excludes the additional amps in for loss * * @return Working amps */ @@ -157,7 +144,8 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan return maxAmperesIn(); } - /** Get the type of connection this hatch allows + /** + * Get the type of connection this hatch allows * * @return Connection type */ @@ -215,13 +203,13 @@ 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. + 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 + 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 } 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 e60ffe0f58..fc25a15beb 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 @@ -2,8 +2,13 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DATA_ACCESS; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; + import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -12,36 +17,39 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_AssemblyLineUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch implements IAddUIWidgets { + 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 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 e9ba5ec512..84c1327a91 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 @@ -2,22 +2,28 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; 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); } @@ -31,12 +37,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 1b4def6dc3..dda6fb5716 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 @@ -2,34 +2,33 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; 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" - }); - } - - public GT_MetaTileEntity_Hatch_Energy( - int aID, - String aName, - String aNameRegional, - int aTier, - int aInvSlotCount, - String[] aDescription, - ITexture... aTextures) { + super( + aID, + aName, + aNameRegional, + aTier, + 0, + new String[] { "Energy Injector for Multiblocks", "Accepts up to 2 Amps" }); + } + + public GT_MetaTileEntity_Hatch_Energy(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, + String[] aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); } @@ -41,19 +40,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, aInvSlotCount, 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 ead36c10ab..4b53946e7a 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 @@ -3,6 +3,11 @@ 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 net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + import gregtech.GT_Mod; import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.interfaces.ITexture; @@ -11,26 +16,32 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; 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[] { - "Fluid Input for Multiblocks", - "Capacity: " + GT_Utility.formatNumbers(8000 * (1 << aTier) / aSlot) + "L", - "Can hold " + aSlot + " types of fluid." - }); + 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." }); } public GT_MetaTileEntity_Hatch_Input(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -41,23 +52,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)}; + ? 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)}; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override @@ -146,10 +157,8 @@ 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) + return aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0 + && (mRecipeMap == null || mRecipeMap.containsInput(aStack) || mRecipeMap.containsInput(GT_Utility.getFluidForFilledItem(aStack, true))); } 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 fdedbad86a..959bcda530 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 @@ -2,8 +2,18 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; + import gregtech.GT_Mod; import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.interfaces.IConfigurationCircuitSupport; @@ -17,16 +27,10 @@ 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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch implements IConfigurationCircuitSupport, IAddUIWidgets { + public GT_Recipe_Map mRecipeMap = null; public boolean disableSort; public boolean disableFilter = true; @@ -36,8 +40,8 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch 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); } @@ -65,23 +69,23 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch 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)}; + ? 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)}; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override @@ -128,8 +132,8 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch @Override public void initDefaultModes(NBTTagCompound aNBT) { 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) disableFilter = !tPreference.isInputBusInitialFilterEnabled(); } } @@ -216,7 +220,8 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch } else { disableFilter = !disableFilter; GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter." + disableFilter)); + aPlayer, + StatCollector.translateToLocal("GT5U.hatch.disableFilter." + disableFilter)); } } @@ -228,8 +233,7 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch @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)); } 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 963aa5a0d7..bcc260fd2e 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 @@ -7,12 +7,21 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_IDL import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DUCTTAPE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MAINTENANCE; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.FakePlayer; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; @@ -30,23 +39,12 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import ic2.core.IHasGui; import ic2.core.item.ItemToolbox; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.FakePlayer; public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch implements IAddUIWidgets { + 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"); @@ -58,26 +56,23 @@ 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), + 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) - }; + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2) }; return sAutoMaintenanceInputs; } @@ -100,31 +95,17 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - 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)}; + 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) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - 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) - }; + 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) }; } @Override @@ -160,13 +141,12 @@ 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) { + 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 instanceof FakePlayer && !aPlayer.getGameProfile().getName().endsWith(".robot")) return false; ItemStack tStack = aPlayer.getCurrentEquippedItem(); if (tStack != null) { if (tStack.getItem() instanceof ItemToolbox) { @@ -213,9 +193,8 @@ 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; @@ -232,9 +211,8 @@ 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; @@ -267,21 +245,21 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch 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")) { @@ -293,8 +271,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer; try { GT_Mod.achievements.issueAchievement(tPlayer, "maintainance"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } } @@ -322,10 +299,10 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override 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)))) - return i == aIndex; + for (int i = 0; i < getSizeInventory(); 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)) @@ -344,34 +321,29 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch if (mAuto) { getBaseMetaTileEntity().add2by2Slots(builder); } else { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.SLOT_MAINTENANCE) - .setPos(78, 33) - .setSize(20, 20)) - .widget( - new SlotWidget(BaseSlot.empty()) { - @Override - public boolean handleDragAndDrop(ItemStack draggedStack, int button) { - return false; - } - - @Override - protected void phantomClick(ClickData clickData, ItemStack cursorStack) { - if (cursorStack == null) return; - onToolClick(cursorStack, getContext().getPlayer()); - if (cursorStack.stackSize < 1) { - getContext().getPlayer().inventory.setItemStack(null); - } - if (getContext().getPlayer() instanceof EntityPlayerMP) { - ((EntityPlayerMP) getContext().getPlayer()).updateHeldItem(); - } - } - }.disableShiftInsert() - .setBackground(GT_UITextures.TRANSPARENT) - .setPos(79, 34)) - .widget(new TextWidget("Click with Tool to repair.") - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(8, 12)); + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.SLOT_MAINTENANCE).setPos(78, 33).setSize(20, 20)) + .widget(new SlotWidget(BaseSlot.empty()) { + + @Override + public boolean handleDragAndDrop(ItemStack draggedStack, int button) { + return false; + } + + @Override + protected void phantomClick(ClickData clickData, ItemStack cursorStack) { + if (cursorStack == null) return; + onToolClick(cursorStack, getContext().getPlayer()); + if (cursorStack.stackSize < 1) { + getContext().getPlayer().inventory.setItemStack(null); + } + if (getContext().getPlayer() instanceof EntityPlayerMP) { + ((EntityPlayerMP) getContext().getPlayer()).updateHeldItem(); + } + } + }.disableShiftInsert().setBackground(GT_UITextures.TRANSPARENT).setPos(79, 34)).widget( + new TextWidget("Click with Tool to repair.").setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(8, 12)); } } } 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 3e1b39c1fd..b41f45e6d2 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 @@ -3,6 +3,13 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MUFFLER; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +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 cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; @@ -15,14 +22,10 @@ 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; @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" @@ -38,27 +41,21 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { super(aID, aName, aNameRegional, aTier, 0, ""); } - public GT_MetaTileEntity_Hatch_Muffler( - int aID, - String aName, - String aNameRegional, - int aTier, - int aInvSlotCount, - String[] aDescription, - ITexture... aTextures) { + public GT_MetaTileEntity_Hatch_Muffler(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_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) { this(aName, aTier, 0, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch_Muffler( - String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, int aInvSlotCount, String[] aDescription, + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); setInValidFacings(ForgeDirection.DOWN); } @@ -70,12 +67,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 @@ -163,30 +160,25 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { } WorldSpawnedEventBuilder.ParticleEventBuilder events = new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setIdentifier(name) - .setWorld(aWorld) - .setMotion(xSpd, ySpd, zSpd); + .setIdentifier(name).setWorld(aWorld).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(); + 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(); + 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(); + xPos + ran3 * 0.5F, + yPos + XSTR_INSTANCE.nextFloat() * 0.5F, + zPos + XSTR_INSTANCE.nextFloat() * 0.5F).run(); } } @@ -207,8 +199,8 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { } /** - * @param mte The multi-block controller's {@link MetaTileEntity} - * MetaTileEntity is passed so newer muffler hatches can do wacky things with the multis + * @param mte The multi-block controller's {@link MetaTileEntity} MetaTileEntity is passed so newer muffler hatches + * can do wacky things with the multis * @return pollution success */ public boolean polluteEnvironment(MetaTileEntity mte) { 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 66c5401bd7..7d95e0b17c 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 @@ -2,11 +2,18 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_INPUT_HATCH_2x2; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; + import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.math.Pos2d; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; + import gregtech.api.enums.ItemList; import gregtech.api.interfaces.IFluidAccess; import gregtech.api.interfaces.ITexture; @@ -16,11 +23,6 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.modularui.widget.FluidDisplaySlotWidget; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_Input implements IAddUIWidgets { @@ -33,8 +35,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; @@ -79,12 +81,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() { @@ -169,11 +171,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 + if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() - || !isFluidInputAllowed(aFluid)) return 0; + || !isFluidInputAllowed(aFluid)) + return 0; if (!hasFluid(aFluid) && getFirstEmptySlot() != -1) { int tFilled = Math.min(aFluid.amount, mCapacityPer); if (doFill) { @@ -295,34 +297,28 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { final int SLOT_NUMBER = 4; - final Pos2d[] positions = new Pos2d[] { - new Pos2d(70, 25), new Pos2d(88, 25), new Pos2d(70, 43), new Pos2d(88, 43), - }; + final Pos2d[] positions = new Pos2d[] { new Pos2d(70, 25), new Pos2d(88, 25), new Pos2d(70, 43), + new Pos2d(88, 43), }; for (int i = 0; i < SLOT_NUMBER; i++) { final int slotId = i; - builder.widget(new FluidDisplaySlotWidget(inventoryHandler, slotId) - .setFluidAccessConstructor(() -> constructFluidAccess(slotId)) - .setIHasFluidDisplay(this) - .setCanDrain(true) - .setCanFill(!isDrainableStackSeparate()) - .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER) - .setBeforeRealClick((clickData, widget) -> { - if (NetworkUtils.isClient()) { - // propagate display item content to actual fluid stored in this tank - setFluid( - GT_Utility.getFluidFromDisplayStack( - widget.getMcSlot().getStack()), - slotId); - } - ItemStack tStackHeld = - widget.getContext().getPlayer().inventory.getItemStack(); - FluidStack tFluidHeld = GT_Utility.getFluidForFilledItem(tStackHeld, true); - return constructFluidAccess(slotId).isMatch(tFluidHeld, slotId); - }) - .setUpdateFluidDisplayItem(() -> updateFluidDisplayItem(slotId)) - .setBackground(ModularUITextures.FLUID_SLOT) - .setPos(positions[slotId])); + builder.widget( + new FluidDisplaySlotWidget(inventoryHandler, slotId) + .setFluidAccessConstructor(() -> constructFluidAccess(slotId)).setIHasFluidDisplay(this) + .setCanDrain(true).setCanFill(!isDrainableStackSeparate()) + .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER) + .setBeforeRealClick((clickData, widget) -> { + if (NetworkUtils.isClient()) { + // propagate display item content to actual fluid stored in this tank + setFluid( + GT_Utility.getFluidFromDisplayStack(widget.getMcSlot().getStack()), + slotId); + } + ItemStack tStackHeld = widget.getContext().getPlayer().inventory.getItemStack(); + FluidStack tFluidHeld = GT_Utility.getFluidForFilledItem(tStackHeld, true); + return constructFluidAccess(slotId).isMatch(tFluidHeld, slotId); + }).setUpdateFluidDisplayItem(() -> updateFluidDisplayItem(slotId)) + .setBackground(ModularUITextures.FLUID_SLOT).setPos(positions[slotId])); } } @@ -331,6 +327,7 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ } protected static class MultiFluidAccess implements IFluidAccess { + private final GT_MetaTileEntity_Hatch_MultiInput mTank; private final int mSlot; 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 2809ab3815..ed29f8fe08 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 @@ -3,6 +3,16 @@ 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 java.lang.ref.WeakReference; + +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 net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.*; + import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; @@ -10,6 +20,7 @@ import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.GT_Mod; import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.gui.modularui.GT_UITextures; @@ -22,28 +33,25 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.gui.modularui.widget.FluidDisplaySlotWidget; -import java.lang.ref.WeakReference; -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 net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.*; public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch implements IFluidLockable, IAddUIWidgets { + private String lockedFluidName = null; private WeakReference<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) { @@ -54,28 +62,30 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl super(aName, aTier, 4, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch_Output( - int aID, String aName, String aNameRegional, int aTier, String[] aDescription, int inventorySize) { + public GT_MetaTileEntity_Hatch_Output(int aID, String aName, String aNameRegional, int aTier, String[] aDescription, + int inventorySize) { super(aID, aName, aNameRegional, aTier, inventorySize, aDescription); } - public GT_MetaTileEntity_Hatch_Output( - String name, int tier, int slots, String[] description, ITexture[][][] textures) { + public GT_MetaTileEntity_Hatch_Output(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(FLUID_OUT_SIGN)} - : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + ? 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)}; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), + TextureFactory.of(FLUID_OUT_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override @@ -113,16 +123,16 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl 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); 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()), @@ -153,8 +163,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl 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(); } } @@ -285,7 +294,8 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl aPlayer, String.format( "%s (%s)", - GT_Utility.trans("151.1", "Outputs items and 1 specific Fluid"), inBrackets)); + GT_Utility.trans("151.1", "Outputs items and 1 specific Fluid"), + inBrackets)); break; case 9: playerThatLockedfluid = new WeakReference<>(aPlayer); @@ -314,8 +324,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl if (tFluid == null && tCurrentItem.getItem() instanceof IFluidContainerItem) tFluid = ((IFluidContainerItem) tCurrentItem.getItem()).getFluid(tCurrentItem); if (tFluid != null) { - if (getLockedFluidName() != null - && !getLockedFluidName().equals(tFluid.getFluid().getName())) { + if (getLockedFluidName() != null && !getLockedFluidName().equals(tFluid.getFluid().getName())) { GT_Utility.sendChatToPlayer( aPlayer, String.format( @@ -326,19 +335,18 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl 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())); - else - GT_Utility.sendChatToPlayer( - aPlayer, - String.format( - "%s (%s)", - GT_Utility.trans("151.2", "Outputs 1 specific Fluid"), tFluid.getLocalizedName())); + if (mMode == 8) 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())); } return true; } @@ -350,8 +358,8 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl } @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 (tryToLockHatch(aPlayer, aSide)) return true; return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); } @@ -425,7 +433,8 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl GT_Utility.sendChatToPlayer( player, String.format( - GT_Utility.trans("151.4", "Successfully locked Fluid to %s"), mFluid.getLocalizedName())); + GT_Utility.trans("151.4", "Successfully locked Fluid to %s"), + mFluid.getLocalizedName())); playerThatLockedfluid = null; } } @@ -437,21 +446,20 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl @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())) }; } @Override @@ -462,36 +470,26 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch impl @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { super.addUIWidgets(builder, buildContext); - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setPos(98, 16) - .setSize(71, 45)) - .widget(new FluidDisplaySlotWidget(inventoryHandler, getLockedDisplaySlot()) - .setIHasFluidDisplay(this) - .setActionRealClick(FluidDisplaySlotWidget.Action.LOCK) - .setActionDragAndDrop(FluidDisplaySlotWidget.Action.LOCK) - .setBeforeClick((clickData, widget) -> { - if (NetworkUtils.isClient()) { - // propagate display item content to actual fluid stored in this tank - setDrainableStack( - GT_Utility.getFluidFromDisplayStack(mInventory[getStackDisplaySlot()])); - } - return true; - }) - .setBackground(GT_UITextures.TRANSPARENT) - .setPos(149, 41)) - .widget(new TextWidget("Locked Fluid") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(101, 20)) + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(98, 16).setSize(71, 45)) + .widget( + new FluidDisplaySlotWidget(inventoryHandler, getLockedDisplaySlot()).setIHasFluidDisplay(this) + .setActionRealClick(FluidDisplaySlotWidget.Action.LOCK) + .setActionDragAndDrop(FluidDisplaySlotWidget.Action.LOCK) + .setBeforeClick((clickData, widget) -> { + if (NetworkUtils.isClient()) { + // propagate display item content to actual fluid stored in this tank + setDrainableStack( + GT_Utility.getFluidFromDisplayStack(mInventory[getStackDisplaySlot()])); + } + return true; + }).setBackground(GT_UITextures.TRANSPARENT).setPos(149, 41)) + .widget(new TextWidget("Locked Fluid").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(101, 20)) .widget(TextWidget.dynamicString(() -> { - final ItemStack lockedDisplayStack = mInventory[getLockedDisplaySlot()]; - return lockedDisplayStack == null ? "None" : lockedDisplayStack.getDisplayName(); - }) - .setSynced(false) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setTextAlignment(Alignment.CenterLeft) - .setMaxWidth(65) - .setPos(101, 30)) + final ItemStack lockedDisplayStack = mInventory[getLockedDisplaySlot()]; + return lockedDisplayStack == null ? "None" : lockedDisplayStack.getDisplayName(); + }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setTextAlignment(Alignment.CenterLeft) + .setMaxWidth(65).setPos(101, 30)) // #updateFluidDisplayItem invalidates locked fluid slot // if lockedFluidName == null or mMode is incorrect .widget(new FakeSyncWidget.StringSyncer(() -> lockedFluidName, val -> lockedFluidName = val)) 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 ad1c799708..094ad29471 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 @@ -4,8 +4,13 @@ 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 net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; + import gregtech.GT_Mod; import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.interfaces.ITexture; @@ -15,11 +20,9 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.api.util.extensions.ArrayExt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch implements IAddUIWidgets { + public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier) { this(aID, aName, aNameRegional, aTier, getSlots(aTier)); } @@ -36,13 +39,13 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch i "Capacity: " + getSlots(tier) + " stack" + (getSlots(tier) >= 2 ? "s" : ""))); } - public GT_MetaTileEntity_Hatch_OutputBus( - int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { + 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); } @@ -57,23 +60,23 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch i 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)}; + ? 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)}; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override @@ -108,11 +111,11 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch i } /** - * Attempt to store as many items as possible into the internal inventory of this output bus. - * If you need atomicity you should use {@link gregtech.api.interfaces.tileentity.IHasInventory#addStackToSlot(int, ItemStack)} - * @param aStack Assume valid. - * Will be mutated. - * Take over the ownership. Caller should not retain a reference to this stack if the call returns true. + * Attempt to store as many items as possible into the internal inventory of this output bus. If you need atomicity + * you should use {@link gregtech.api.interfaces.tileentity.IHasInventory#addStackToSlot(int, ItemStack)} + * + * @param aStack Assume valid. Will be mutated. Take over the ownership. Caller should not retain a reference to + * this stack if the call returns true. * @return true if stack is fully accepted. false is stack is partially accepted or nothing is accepted */ public boolean storeAll(ItemStack aStack) { @@ -127,8 +130,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch i mInventory[i] = aStack.splitStack(getInventoryStackLimit()); } else { int tRealStackLimit = Math.min(getInventoryStackLimit(), tSlot.getMaxStackSize()); - if (tSlot.stackSize < tRealStackLimit - && tSlot.isItemEqual(aStack) + if (tSlot.stackSize < tRealStackLimit && tSlot.isItemEqual(aStack) && ItemStack.areItemStackTagsEqual(tSlot, aStack)) { if (aStack.stackSize + tSlot.stackSize <= tRealStackLimit) { mInventory[i].stackSize += aStack.stackSize; @@ -158,8 +160,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch i public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && (aTick & 0x7) == 0) { - final IInventory tTileEntity = - aBaseMetaTileEntity.getIInventoryAtSide(aBaseMetaTileEntity.getFrontFacing()); + final IInventory tTileEntity = aBaseMetaTileEntity + .getIInventoryAtSide(aBaseMetaTileEntity.getFrontFacing()); if (tTileEntity != null) { moveMultipleItemStacks( aBaseMetaTileEntity, @@ -175,9 +177,9 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch i 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 * + // 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 ae08a5eb02..e6ea51c59d 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 @@ -5,6 +5,25 @@ 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 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; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +import org.lwjgl.input.Keyboard; + import com.google.common.collect.Iterables; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; @@ -13,6 +32,7 @@ import com.gtnewhorizons.modularui.common.widget.DynamicPositionedColumn; import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; @@ -31,43 +51,16 @@ import gregtech.common.GT_Pollution; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; -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; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.input.Keyboard; public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity implements IAddGregtechLogo, IAddUIWidgets { 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; @@ -91,23 +84,23 @@ 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) { @@ -137,7 +130,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity mLockedToSingleRecipe = !mLockedToSingleRecipe; if (mLockedToSingleRecipe) { GT_Utility.sendChatToPlayer( - aPlayer, GT_Utility.trans("223", "Single recipe locking enabled. Will lock to next recipe.")); + 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; @@ -193,19 +187,17 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity if (mOutputItems != null) { aNBT.setInteger("mOutputItemsLength", mOutputItems.length); - for (int i = 0; i < mOutputItems.length; i++) - if (mOutputItems[i] != null) { - GT_Utility.saveItem(aNBT, "mOutputItem" + i, mOutputItems[i]); - } + for (int i = 0; i < mOutputItems.length; i++) if (mOutputItems[i] != null) { + GT_Utility.saveItem(aNBT, "mOutputItem" + i, mOutputItems[i]); + } } if (mOutputFluids != null) { aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length); - for (int i = 0; i < mOutputFluids.length; i++) - if (mOutputFluids[i] != null) { - NBTTagCompound tNBT = new NBTTagCompound(); - mOutputFluids[i].writeToNBT(tNBT); - aNBT.setTag("mOutputFluids" + i, tNBT); - } + for (int i = 0; i < mOutputFluids.length; i++) if (mOutputFluids[i] != null) { + NBTTagCompound tNBT = new NBTTagCompound(); + mOutputFluids[i].writeToNBT(tNBT); + aNBT.setTag("mOutputFluids" + i, tNBT); + } } aNBT.setBoolean("mWrench", mWrench); aNBT.setBoolean("mScrewdriver", mScrewdriver); @@ -273,8 +265,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity } /** - * ClearHatches as a part of structure check. - * If your multiblock has any hatches that need clearing override this method, call super, and clear your own hatches + * ClearHatches as a part of structure check. If your multiblock has any hatches that need clearing override this + * method, call super, and clear your own hatches */ public void clearHatches() { mInputHatches.clear(); @@ -327,14 +319,14 @@ 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; setMufflers(active); @@ -389,19 +381,15 @@ 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) { - } - addOutput(tStack); - } + 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); + } if (mOutputFluids != null) { addFluidOutputs(mOutputFluids); } @@ -421,19 +409,16 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity if (mOutputFluids.length > 1) { try { GT_Mod.achievements.issueAchievement( - aBaseMetaTileEntity - .getWorld() + aBaseMetaTileEntity.getWorld() .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } } } } } else { - if (aTick % 100 == 0 - || aBaseMetaTileEntity.hasWorkJustBeenEnabled() + if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { if (aBaseMetaTileEntity.isAllowedToWork()) { @@ -511,8 +496,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity } /** - * Gets the pollution produced per second by this multiblock, default to 0. Override this with - * its actual value in the code of the multiblock. + * 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) { return 0; @@ -544,8 +529,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity } public int getRepairStatus() { - return (mWrench ? 1 : 0) - + (mScrewdriver ? 1 : 0) + return (mWrench ? 1 : 0) + (mScrewdriver ? 1 : 0) + (mSoftHammer ? 1 : 0) + (mHardHammer ? 1 : 0) + (mSolderingTool ? 1 : 0) @@ -590,18 +574,14 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity break; } } - if (mInventory[1] != null - && getBaseMetaTileEntity().getRandomNumber(2) == 0 + 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; } } @@ -612,10 +592,14 @@ 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 + "."); + "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; @@ -703,21 +687,21 @@ 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; } /** * Calcualtes the overclockedness using long integers - * @param aEUt - recipe EUt - * @param aDuration - recipe Duration - * @param mAmperage - should be 1 ? - * @param maxInputVoltage - Multiblock Max input voltage - * @param perfectOC - If the Multiblock OCs perfectly, i.e. the large Chemical Reactor + * + * @param aEUt - recipe EUt + * @param aDuration - recipe Duration + * @param mAmperage - should be 1 ? + * @param maxInputVoltage - Multiblock Max input voltage + * @param perfectOC - If the Multiblock OCs perfectly, i.e. the large Chemical Reactor */ - protected void calculateOverclockedNessMultiInternal( - long aEUt, int aDuration, int mAmperage, long maxInputVoltage, boolean perfectOC) { + protected void calculateOverclockedNessMultiInternal(long 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 @@ -784,16 +768,13 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity public boolean drainEnergyInput(long aEU) { if (aEU <= 0) return true; - for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) - if (isValidMetaTileEntity(tHatch)) { - if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) return true; - } + for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) { + if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) return true; + } return false; } - protected static boolean dumpFluid( - List<GT_MetaTileEntity_Hatch_Output> aOutputHatches, - FluidStack copiedFluidStack, + 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)) { @@ -871,8 +852,7 @@ 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; @@ -884,8 +864,7 @@ 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; @@ -899,11 +878,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--) { @@ -974,8 +953,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity 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; @@ -1148,29 +1127,55 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity } 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(getActualEnergyUsage()) + 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 + " %" - }; + /* 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(getActualEnergyUsage()) + + 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 + + " %" }; } @Override @@ -1230,29 +1235,34 @@ 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")) { currentTip.add(RED + "** INCOMPLETE STRUCTURE **" + RESET); } - currentTip.add((tag.getBoolean("hasProblems") ? (RED + "** HAS PROBLEMS **") : GREEN + "Running Fine") + RESET - + " Efficiency: " + tag.getFloat("efficiency") + "%"); + currentTip.add( + (tag.getBoolean("hasProblems") ? (RED + "** HAS PROBLEMS **") : GREEN + "Running Fine") + RESET + + " Efficiency: " + + tag.getFloat("efficiency") + + "%"); boolean isActive = tag.getBoolean("isActive"); if (isActive) { long actualEnergyUsage = tag.getLong("energyUsage"); if (actualEnergyUsage > 0) { - currentTip.add(StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.use", - GT_Utility.formatNumbers(actualEnergyUsage), - GT_Utility.getColoredTierNameFromVoltage(actualEnergyUsage))); + currentTip.add( + StatCollector.translateToLocalFormatted( + "GT5U.waila.energy.use", + GT_Utility.formatNumbers(actualEnergyUsage), + GT_Utility.getColoredTierNameFromVoltage(actualEnergyUsage))); } else if (actualEnergyUsage < 0) { - currentTip.add(StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.produce", - GT_Utility.formatNumbers(-actualEnergyUsage), - GT_Utility.getColoredTierNameFromVoltage(-actualEnergyUsage))); + currentTip.add( + StatCollector.translateToLocalFormatted( + "GT5U.waila.energy.produce", + GT_Utility.formatNumbers(-actualEnergyUsage), + GT_Utility.getColoredTierNameFromVoltage(-actualEnergyUsage))); } } currentTip.add( @@ -1262,8 +1272,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity } @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); @@ -1334,10 +1344,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setPos(7, 4) - .setSize(143, 75)); + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 4).setSize(143, 75)); final SlotWidget inventorySlot = new SlotWidget(inventoryHandler, 1); builder.widget(inventorySlot.setPos(151, 4)); @@ -1353,94 +1361,99 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity screenElements.setSynced(false).setSpace(0).setPos(10, 7); screenElements - .widget(new TextWidget(GT_Utility.trans("132", "Pipe is loose.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> !mWrench)) + .widget( + new TextWidget(GT_Utility.trans("132", "Pipe is loose.")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mWrench)) .widget(new FakeSyncWidget.BooleanSyncer(() -> mWrench, val -> mWrench = val)); screenElements - .widget(new TextWidget(GT_Utility.trans("133", "Screws are loose.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> !mScrewdriver)) + .widget( + new TextWidget(GT_Utility.trans("133", "Screws are loose.")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mScrewdriver)) .widget(new FakeSyncWidget.BooleanSyncer(() -> mScrewdriver, val -> mScrewdriver = val)); screenElements - .widget(new TextWidget(GT_Utility.trans("134", "Something is stuck.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> !mSoftHammer)) + .widget( + new TextWidget(GT_Utility.trans("134", "Something is stuck.")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mSoftHammer)) .widget(new FakeSyncWidget.BooleanSyncer(() -> mSoftHammer, val -> mSoftHammer = val)); screenElements - .widget(new TextWidget(GT_Utility.trans("135", "Platings are dented.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> !mHardHammer)) + .widget( + new TextWidget(GT_Utility.trans("135", "Platings are dented.")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mHardHammer)) .widget(new FakeSyncWidget.BooleanSyncer(() -> mHardHammer, val -> mHardHammer = val)); screenElements - .widget(new TextWidget(GT_Utility.trans("136", "Circuitry burned out.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> !mSolderingTool)) + .widget( + new TextWidget(GT_Utility.trans("136", "Circuitry burned out.")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mSolderingTool)) .widget(new FakeSyncWidget.BooleanSyncer(() -> mSolderingTool, val -> mSolderingTool = val)); screenElements - .widget(new TextWidget(GT_Utility.trans("137", "That doesn't belong there.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> !mCrowbar)) + .widget( + new TextWidget(GT_Utility.trans("137", "That doesn't belong there.")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mCrowbar)) .widget(new FakeSyncWidget.BooleanSyncer(() -> mCrowbar, val -> mCrowbar = val)); screenElements - .widget(new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> !mMachine)) + .widget( + new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mMachine)) .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val)); - screenElements.widget(new TextWidget("Too Uncertain.") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> (getBaseMetaTileEntity().getErrorDisplayID() & 128) != 0)); - screenElements.widget(new TextWidget("Invalid Parameters.") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> (getBaseMetaTileEntity().getErrorDisplayID() & 256) != 0)); + screenElements.widget( + new TextWidget("Too Uncertain.").setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> (getBaseMetaTileEntity().getErrorDisplayID() & 128) != 0)); + screenElements.widget( + new TextWidget("Invalid Parameters.").setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> (getBaseMetaTileEntity().getErrorDisplayID() & 256) != 0)); screenElements - .widget(new TextWidget(GT_Utility.trans("139", "Hit with Soft Mallet")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 - && !getBaseMetaTileEntity().isActive())) - .widget(new FakeSyncWidget.IntegerSyncer( - () -> getBaseMetaTileEntity().getErrorDisplayID(), - val -> getBaseMetaTileEntity().setErrorDisplayID(val))) - .widget(new FakeSyncWidget.BooleanSyncer( - () -> getBaseMetaTileEntity().isActive(), - val -> getBaseMetaTileEntity().setActive(val))); - screenElements.widget(new TextWidget(GT_Utility.trans("140", "to (re-)start the Machine")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 - && !getBaseMetaTileEntity().isActive())); - screenElements.widget(new TextWidget(GT_Utility.trans("141", "if it doesn't start.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 - && !getBaseMetaTileEntity().isActive())); - screenElements.widget(new TextWidget(GT_Utility.trans("142", "Running perfectly.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 - && getBaseMetaTileEntity().isActive())); - - screenElements.widget(new TextWidget(GT_Utility.trans("143", "Missing Mining Pipe")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> { - if (getBaseMetaTileEntity().getErrorDisplayID() == 0 - && this instanceof GT_MetaTileEntity_DrillerBase) { - final ItemStack tItem = inventorySlot.getMcSlot().getStack(); - return tItem == null - || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L)); - } - return false; - })); - screenElements.widget(new TextWidget(GT_Utility.trans("144", "Missing Turbine Rotor")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> { - if (getBaseMetaTileEntity().getErrorDisplayID() == 0 - && this instanceof GT_MetaTileEntity_LargeTurbine) { - final ItemStack tItem = inventorySlot.getMcSlot().getStack(); - return tItem == null - || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE + .widget( + new TextWidget(GT_Utility.trans("139", "Hit with Soft Mallet")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled( + widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 + && !getBaseMetaTileEntity().isActive())) + .widget( + new FakeSyncWidget.IntegerSyncer( + () -> getBaseMetaTileEntity().getErrorDisplayID(), + val -> getBaseMetaTileEntity().setErrorDisplayID(val))) + .widget( + new FakeSyncWidget.BooleanSyncer( + () -> getBaseMetaTileEntity().isActive(), + val -> getBaseMetaTileEntity().setActive(val))); + screenElements.widget( + new TextWidget(GT_Utility.trans("140", "to (re-)start the Machine")) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled( + widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 + && !getBaseMetaTileEntity().isActive())); + screenElements.widget( + new TextWidget(GT_Utility.trans("141", "if it doesn't start.")).setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled( + widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 + && !getBaseMetaTileEntity().isActive())); + screenElements.widget( + new TextWidget(GT_Utility.trans("142", "Running perfectly.")).setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled( + widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 + && getBaseMetaTileEntity().isActive())); + + screenElements.widget( + new TextWidget(GT_Utility.trans("143", "Missing Mining Pipe")).setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> { + if (getBaseMetaTileEntity().getErrorDisplayID() == 0 + && this instanceof GT_MetaTileEntity_DrillerBase) { + final ItemStack tItem = inventorySlot.getMcSlot().getStack(); + return tItem == null || !GT_Utility + .areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L)); + } + return false; + })); + screenElements.widget( + new TextWidget(GT_Utility.trans("144", "Missing Turbine Rotor")).setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> { + if (getBaseMetaTileEntity().getErrorDisplayID() == 0 + && this instanceof GT_MetaTileEntity_LargeTurbine) { + final ItemStack tItem = inventorySlot.getMcSlot().getStack(); + return tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177); - } - return false; - })); + } + return false; + })); } } 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 f146b39635..6becb5e806 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 @@ -1,5 +1,11 @@ package gregtech.api.metatileentity.implementations; +import java.util.Collections; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import com.gtnewhorizons.modularui.api.drawable.Text; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; @@ -8,35 +14,33 @@ import com.gtnewhorizons.modularui.common.widget.ButtonWidget; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotGroup; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; -import java.util.Collections; -import java.util.List; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; public abstract class GT_MetaTileEntity_SpecialFilter extends GT_MetaTileEntity_Buffer implements IAddUIWidgets { + public static final int BUFFER_SLOT_COUNT = 9; public static final int SPECIAL_SLOT_INDEX = 9; 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); } @@ -83,73 +87,61 @@ public abstract class GT_MetaTileEntity_SpecialFilter extends GT_MetaTileEntity_ addEmitEnergyButton(builder); addEmitRedstoneButton(builder); addInvertRedstoneButton(builder); - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - bInvertFilter = !bInvertFilter; - if (bInvertFilter) { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("124", "Invert Filter")); - } else { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), - GT_Utility.trans("125", "Don't invert Filter")); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER) - .setPos(61, 62) + builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> { + bInvertFilter = !bInvertFilter; + if (bInvertFilter) { + GT_Utility.sendChatToPlayer(widget.getContext().getPlayer(), GT_Utility.trans("124", "Invert Filter")); + } else { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("125", "Don't invert Filter")); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER).setPos(61, 62) + .setSize(18, 18)).widget(new ButtonWidget().setOnClick((clickData, widget) -> { + bNBTAllowed = !bNBTAllowed; + if (bNBTAllowed) { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("126", "Ignore NBT")); + } else { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("127", "NBT has to match")); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NBT).setPos(79, 62) .setSize(18, 18)) - .widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - bNBTAllowed = !bNBTAllowed; - if (bNBTAllowed) { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("126", "Ignore NBT")); - } else { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("127", "NBT has to match")); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NBT) - .setPos(79, 62) - .setSize(18, 18)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_24_WHITE.apply(27, false)) - .setPos(6, 19) - .setSize(27, 24)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_24_BLUE.apply(42, true)) - .setPos(53, 19) - .setSize(42, 24)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_24_RED.apply(19, true)) - .setPos(152, 19) - .setSize(19, 24)) .widget( - new SlotWidget(BaseSlot.phantom(inventoryHandler, 9)) { - @Override - protected void phantomClick(ClickData clickData, ItemStack cursorStack) { - clickTypeIcon(clickData.mouseButton != 0, cursorStack); - } - - @Override - public void buildTooltip(List<Text> tooltip) { - if (getEmptySlotTooltip() != null) { - tooltip.addAll(getEmptySlotTooltip()); - } - super.buildTooltip(tooltip); - } - - @Override - public List<String> getExtraTooltip() { - if (getItemExtraTooltip() != null) { - return getItemExtraTooltip(); - } - return Collections.emptyList(); - } - }.disableShiftInsert().setPos(34, 22).setBackground(GT_UITextures.BUTTON_STANDARD)) - .widget(SlotGroup.ofItemHandler(inventoryHandler, 3) - .endAtSlot(8) - .build() - .setPos(97, 4)); + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_WHITE.apply(27, false)) + .setPos(6, 19).setSize(27, 24)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_BLUE.apply(42, true)) + .setPos(53, 19).setSize(42, 24)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_RED.apply(19, true)) + .setPos(152, 19).setSize(19, 24)) + .widget(new SlotWidget(BaseSlot.phantom(inventoryHandler, 9)) { + + @Override + protected void phantomClick(ClickData clickData, ItemStack cursorStack) { + clickTypeIcon(clickData.mouseButton != 0, cursorStack); + } + + @Override + public void buildTooltip(List<Text> tooltip) { + if (getEmptySlotTooltip() != null) { + tooltip.addAll(getEmptySlotTooltip()); + } + super.buildTooltip(tooltip); + } + + @Override + public List<String> getExtraTooltip() { + if (getItemExtraTooltip() != null) { + return getItemExtraTooltip(); + } + return Collections.emptyList(); + } + }.disableShiftInsert().setPos(34, 22).setBackground(GT_UITextures.BUTTON_STANDARD)) + .widget(SlotGroup.ofItemHandler(inventoryHandler, 3).endAtSlot(8).build().setPos(97, 4)); } } 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 21267f983e..9c069bbd5f 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 @@ -6,6 +6,7 @@ import static gregtech.api.metatileentity.BaseTileEntity.BATTERY_SLOT_TOOLTIP_AL import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import gregtech.api.enums.GT_Values; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -14,9 +15,9 @@ import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntity { + /** - * Value between [0 - 9] to describe the Tier of this Machine. - * PLZ [0-15] works - READ! GT_Values class. + * Value between [0 - 9] to describe the Tier of this Machine. PLZ [0-15] works - READ! GT_Values class. */ public final byte mTier; @@ -33,31 +34,19 @@ 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; @@ -73,17 +62,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; @@ -112,8 +101,8 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit } /** - * Used Client Side to get a Texture Set for this Block. - * Called after setting the Tier and the Description so that those two are accessible. + * Used Client Side to get a Texture Set for this Block. Called after setting the Tier and the Description so that + * those two are accessible. * * @param aTextures is the optional Array you can give to the Constructor. */ @@ -125,20 +114,17 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit final String pTier1 = GT_Utility.getColoredTierNameFromTier(mTier); if (mTier == GT_Values.VN.length - 1) { batterySlotTooltipKey = BATTERY_SLOT_TOOLTIP_ALT; - batterySlotTooltipArgs = new String[] {pTier1}; + batterySlotTooltipArgs = new String[] { pTier1 }; } else { batterySlotTooltipKey = BATTERY_SLOT_TOOLTIP; - batterySlotTooltipArgs = new String[] {pTier1, GT_Utility.getColoredTierNameFromTier((byte) (mTier + 1))}; + batterySlotTooltipArgs = new String[] { pTier1, GT_Utility.getColoredTierNameFromTier((byte) (mTier + 1)) }; } return createChargerSlot(x, y, batterySlotTooltipKey, batterySlotTooltipArgs); } protected SlotWidget createChargerSlot(int x, int y, String tooltipKey, Object[] tooltipArgs) { - return (SlotWidget) new SlotWidget(inventoryHandler, rechargerSlotStartIndex()) - .disableShiftInsert() - .setGTTooltip(() -> mTooltipCache.getData(tooltipKey, tooltipArgs)) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CHARGER) - .setPos(x, y); + return (SlotWidget) new SlotWidget(inventoryHandler, rechargerSlotStartIndex()).disableShiftInsert() + .setGTTooltip(() -> mTooltipCache.getData(tooltipKey, tooltipArgs)).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CHARGER).setPos(x, y); } } 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 e564c65d21..a4c42dd14d 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 @@ -1,18 +1,21 @@ package gregtech.api.metatileentity.implementations; +import java.util.concurrent.atomic.AtomicReferenceArray; + +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ISecondaryDescribable; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -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); + + 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 0f6f6249a5..a70ee0d5e7 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 @@ -7,6 +7,19 @@ 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 java.util.List; + +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyStorage; import crazypants.enderio.machine.capbank.TileCapBank; @@ -19,24 +32,15 @@ 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; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; /** * 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 + * This is the main construct for my Basic Machines such as the Automatic Extractor Extend this class to make a simple + * Machine */ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachineBlock { + public GT_MetaTileEntity_Transformer(int aID, String aName, String aNameRegional, int aTier, String aDescription) { super(aID, aName, aNameRegional, aTier, 0, aDescription); } @@ -53,57 +57,39 @@ 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 @@ -138,8 +124,7 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi @Override public boolean isInputFacing(byte aSide) { - return getBaseMetaTileEntity().isAllowedToWork() - ? aSide == getBaseMetaTileEntity().getFrontFacing() + return getBaseMetaTileEntity().isAllowedToWork() ? aSide == getBaseMetaTileEntity().getFrontFacing() : aSide != getBaseMetaTileEntity().getFrontFacing(); } @@ -190,55 +175,50 @@ 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); - 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) { - int storedRF = ((IPowerContainer) tTileEntity).getEnergyStored(); - 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()); - network.addEnergy(GT_Utility.safeInt(-(tEU * 100 / GregTech_API.mRFtoEU))); - } - } else { - if (storedRF > extractRF) { - ((IPowerContainer) tTileEntity).setEnergyStored(storedRF - extractRF); - tEU = maxEUInput(); - } else { - ((IPowerContainer) tTileEntity).setEnergyStored(0); - tEU = storedRF * (long) GregTech_API.mRFtoEU / 100L; - } - } - aBaseMetaTileEntity.injectEnergyUnits((byte) 6, Math.min(tEU, maxEUInput()), 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) { + int storedRF = ((IPowerContainer) tTileEntity).getEnergyStored(); + 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()); + network.addEnergy(GT_Utility.safeInt(-(tEU * 100 / GregTech_API.mRFtoEU))); + } + } else { + if (storedRF > extractRF) { + ((IPowerContainer) tTileEntity).setEnergyStored(storedRF - extractRF); + tEU = maxEUInput(); + } else { + ((IPowerContainer) tTileEntity).setEnergyStored(0); + tEU = storedRF * (long) GregTech_API.mRFtoEU / 100L; + } + } + aBaseMetaTileEntity.injectEnergyUnits((byte) 6, Math.min(tEU, maxEUInput()), 1); + } } } } @@ -270,10 +250,8 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi @Override public String getAlternativeModeText() { - return (getBaseMetaTileEntity().isAllowedToWork() - ? GT_Utility.trans("145", "Step Down, In: ") - : GT_Utility.trans("146", "Step Up, In: ")) - + maxEUInput() + 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: ") @@ -289,8 +267,8 @@ 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(); @@ -299,40 +277,43 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi final byte inputTier = GT_Utility.getTier(tag.getLong("maxEUInput")); final byte outputTier = GT_Utility.getTier(tag.getLong("maxEUOutput")); - currenttip.add(String.format( - "%s %s(%dA) -> %s(%dA)", - (allowedToWork ? (GREEN + "Step Down") : (RED + "Step Up")) + RESET, - GT_Mod.gregtechproxy.mWailaTransformerVoltageTier - ? GT_Utility.getColoredTierNameFromTier(inputTier) - : tag.getLong("maxEUInput"), - tag.getLong("maxAmperesIn"), - GT_Mod.gregtechproxy.mWailaTransformerVoltageTier - ? GT_Utility.getColoredTierNameFromTier(outputTier) - : tag.getLong("maxEUOutput"), - tag.getLong("maxAmperesOut"))); + currenttip.add( + String.format( + "%s %s(%dA) -> %s(%dA)", + (allowedToWork ? (GREEN + "Step Down") : (RED + "Step Up")) + RESET, + GT_Mod.gregtechproxy.mWailaTransformerVoltageTier + ? GT_Utility.getColoredTierNameFromTier(inputTier) + : tag.getLong("maxEUInput"), + tag.getLong("maxAmperesIn"), + GT_Mod.gregtechproxy.mWailaTransformerVoltageTier + ? GT_Utility.getColoredTierNameFromTier(outputTier) + : tag.getLong("maxEUOutput"), + tag.getLong("maxAmperesOut"))); if ((side == facing && allowedToWork) || (side != facing && !allowedToWork)) { - currenttip.add(String.format( - GOLD + "Input:" + RESET + " %s(%dA)", - GT_Mod.gregtechproxy.mWailaTransformerVoltageTier - ? GT_Utility.getColoredTierNameFromTier(inputTier) - : tag.getLong("maxEUInput"), - tag.getLong("maxAmperesIn"))); + currenttip.add( + String.format( + GOLD + "Input:" + RESET + " %s(%dA)", + GT_Mod.gregtechproxy.mWailaTransformerVoltageTier + ? GT_Utility.getColoredTierNameFromTier(inputTier) + : tag.getLong("maxEUInput"), + tag.getLong("maxAmperesIn"))); } else { - currenttip.add(String.format( - BLUE + "Output:" + RESET + " %s(%dA)", - GT_Mod.gregtechproxy.mWailaTransformerVoltageTier - ? GT_Utility.getColoredTierNameFromTier(outputTier) - : tag.getLong("maxEUOutput"), - tag.getLong("maxAmperesOut"))); + currenttip.add( + String.format( + BLUE + "Output:" + RESET + " %s(%dA)", + GT_Mod.gregtechproxy.mWailaTransformerVoltageTier + ? GT_Utility.getColoredTierNameFromTier(outputTier) + : 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()); 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 41b898b582..997898a34e 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 @@ -2,15 +2,16 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.*; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + 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 net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_Dynamo implements IGlobalWirelessEnergy, IWirelessEnergyHatchInformation { @@ -18,23 +19,23 @@ public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_D 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); } public GT_MetaTileEntity_Wireless_Dynamo(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, new String[] {""}); + super(aID, aName, aNameRegional, aTier, new String[] { "" }); } @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 @@ -84,11 +85,9 @@ public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_D @Override public String[] getDescription() { - return new String[] { - EnumChatFormatting.GRAY + "Stores energy globally in a network, up to 2^(2^31) EU.", - EnumChatFormatting.GRAY + "Does not connect to wires. This block accepts EU into the network.", - AuthorColen - }; + return new String[] { EnumChatFormatting.GRAY + "Stores energy globally in a network, up to 2^(2^31) EU.", + EnumChatFormatting.GRAY + "Does not connect to wires. This block accepts EU into the network.", + AuthorColen }; } @Override @@ -103,7 +102,7 @@ public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_D @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Wireless_Dynamo(mName, mTier, new String[] {""}, mTextures); + return new GT_MetaTileEntity_Wireless_Dynamo(mName, mTier, new String[] { "" }, mTextures); } @Override 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 218f15c8c0..756a1b138a 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 @@ -2,22 +2,24 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.*; +import java.math.BigInteger; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + 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 java.math.BigInteger; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; 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; @@ -28,26 +30,24 @@ public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_En } public GT_MetaTileEntity_Wireless_Hatch(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, new String[] {""}); + super(aID, aName, aNameRegional, aTier, new String[] { "" }); } @Override public String[] getDescription() { - return new String[] { - EnumChatFormatting.GRAY + "Stores energy globally in a network, up to 2^(2^31) EU.", - EnumChatFormatting.GRAY + "Does not connect to wires. This block withdraws EU from the network.", - AuthorColen - }; + return new String[] { EnumChatFormatting.GRAY + "Stores energy globally in a network, up to 2^(2^31) EU.", + EnumChatFormatting.GRAY + "Does not connect to wires. This block withdraws EU from the network.", + AuthorColen }; } @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 @@ -107,7 +107,7 @@ public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_En @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Wireless_Hatch(mName, mTier, new String[] {""}, mTextures); + return new GT_MetaTileEntity_Wireless_Hatch(mName, mTier, new String[] { "" }, mTextures); } @Override diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java index dc9a9fd529..99dd459fb8 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java @@ -8,7 +8,39 @@ 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 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; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.StatList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +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 net.minecraftforge.event.ForgeEventFactory; + import com.cricketcraft.chisel.api.IFacade; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -38,41 +70,13 @@ import gregtech.api.util.GT_Utility; import gregtech.common.covers.CoverInfo; 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; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; -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 net.minecraftforge.event.ForgeEventFactory; /* * MultiTileEntityBlock ported from GT6 */ 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; @@ -80,51 +84,51 @@ public class MultiTileEntityBlock extends Block 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 + "." + 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. - * @param aMaterial the Material used to determine the Block. - * @param aSoundType the Sound Type of the Block. - * @param aTool the Tool used to harvest this Block. - * @param aHarvestLevelOffset obvious + * @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. + * @param aMaterial the Material used to determine the Block. + * @param aSoundType the Sound Type of the Block. + * @param aTool the Tool used to harvest this Block. + * @param aHarvestLevelOffset obvious * @param aHarvestLevelMinimum obvious * @param aHarvestLevelMaximum obvious - * @param aOpaque if this Block is Opaque. - * @param aNormalCube if this Block is a normal Cube (for Redstone Stuff). + * @param aOpaque if this Block is Opaque. + * @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)); + 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, @@ -140,16 +144,8 @@ public class MultiTileEntityBlock extends Block : rBlock; } - protected MultiTileEntityBlock( - String aModID, - String aMaterialName, - Material aMaterial, - SoundType aSoundType, - String aTool, - int aHarvestLevelOffset, - int aHarvestLevelMinimum, - int aHarvestLevelMaximum, - boolean aOpaque, + 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) @@ -205,7 +201,7 @@ public class MultiTileEntityBlock extends Block } @Override - public final boolean func_149730_j /*isFullBlock*/() { + public final boolean func_149730_j /* isFullBlock */() { return mOpaque; } @@ -227,8 +223,7 @@ public class MultiTileEntityBlock extends Block @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() + return aTileEntity instanceof IMTE_GetBlockHardness ? ((IMTE_GetBlockHardness) aTileEntity).getBlockHardness() : 1.0F; } @@ -246,8 +241,8 @@ public class MultiTileEntityBlock extends Block @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); @@ -286,8 +281,8 @@ public class MultiTileEntityBlock extends Block } @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; @@ -319,11 +314,9 @@ public class MultiTileEntityBlock extends Block @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 @@ -334,16 +327,8 @@ public class MultiTileEntityBlock extends Block } @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 @@ -377,8 +362,7 @@ public class MultiTileEntityBlock extends Block @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() + return aTileEntity instanceof IMTE_GetWeakChanges ? ((IMTE_GetWeakChanges) aTileEntity).getWeakChanges() : super.getWeakChanges(aWorld, aX, aY, aZ); } @@ -394,7 +378,17 @@ public class MultiTileEntityBlock extends Block 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); + 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); } @@ -582,8 +576,8 @@ public class MultiTileEntityBlock extends Block } @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<>(); @@ -595,15 +589,8 @@ public class MultiTileEntityBlock extends Block } @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) @@ -619,7 +606,10 @@ public class MultiTileEntityBlock extends Block 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); + aX, + aY, + aZ, + aWorld.provider.dimensionId); ((IMultiTileEntity) aTileEntity).onExploded(aExplosion); } else aWorld.setBlockToAir(aX, aY, aZ); } @@ -652,8 +642,8 @@ public class MultiTileEntityBlock extends Block } @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; } @@ -664,8 +654,8 @@ public class MultiTileEntityBlock extends Block return aTileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) aTileEntity).getPickBlock(aTarget) : null; } - public final IMultiTileEntity receiveMultiTileEntityData( - IBlockAccess aWorld, int aX, short aY, int aZ, short aRID, short aID) { + public final IMultiTileEntity receiveMultiTileEntityData(IBlockAccess aWorld, int aX, short aY, int aZ, short aRID, + short aID) { if (!(aWorld instanceof World)) return null; TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); @@ -683,8 +673,8 @@ public class MultiTileEntityBlock extends Block return ((IMultiTileEntity) aTileEntity); } - public void receiveCoverData( - IMultiTileEntity mte, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, int aCover5) { + public void receiveCoverData(IMultiTileEntity mte, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, + int aCover5) { boolean updated; updated = mte.setCoverIDAtSideNoUpdate((byte) 0, aCover0); updated |= mte.setCoverIDAtSideNoUpdate((byte) 1, aCover1); @@ -698,13 +688,13 @@ public class MultiTileEntityBlock extends Block } } // - // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_COMMON_DATA, aTextureData); + // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_COMMON_DATA, aTextureData); // - // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, aUpdateData & 0x7F); - // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, aTexturePage | 0x80); + // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, aUpdateData & 0x7F); + // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, aTexturePage | 0x80); // - // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_COLOR, aColorData); - // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_REDSTONE_OUTPUT, aRedstoneData); + // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_COLOR, aColorData); + // te.receiveClientEvent(GregTechTileClientEvents.CHANGE_REDSTONE_OUTPUT, aRedstoneData); @Override public final TileEntity createTileEntity(World aWorld, int aMeta) { diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlockInternal.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlockInternal.java index f388944bb4..3dcf5eded3 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlockInternal.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlockInternal.java @@ -3,12 +3,6 @@ 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; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_HasMultiBlockMachineRelevantData; -import gregtech.common.render.GT_Renderer_Block; -import gregtech.common.render.IRenderedBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -20,7 +14,15 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.ITexture; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_HasMultiBlockMachineRelevantData; +import gregtech.common.render.GT_Renderer_Block; +import gregtech.common.render.IRenderedBlock; + public class MultiTileEntityBlockInternal extends Block implements IRenderedBlock { + public MultiTileEntityRegistry mMultiTileEntityRegistry; public MultiTileEntityBlockInternal() { @@ -47,18 +49,10 @@ public class MultiTileEntityBlockInternal extends Block implements IRenderedBloc 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); + 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); @@ -92,7 +86,8 @@ public class MultiTileEntityBlockInternal extends Block implements IRenderedBloc try { if (aMTEContainer.mTileEntity instanceof IMTE_HasMultiBlockMachineRelevantData) { if (((IMTE_HasMultiBlockMachineRelevantData) aMTEContainer.mTileEntity) - .hasMultiBlockMachineRelevantData()) GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + .hasMultiBlockMachineRelevantData()) + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } } catch (Throwable e) { GT_FML_LOGGER.error("causeMachineUpdate", e); @@ -114,7 +109,7 @@ public class MultiTileEntityBlockInternal extends Block implements IRenderedBloc } 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); } diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java index c66ec30481..00f06d2deb 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java @@ -2,14 +2,17 @@ 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 java.lang.ref.WeakReference; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.Tuple; +import gregtech.api.enums.Materials; +import gregtech.api.multitileentity.base.BaseMultiTileEntity; +import gregtech.api.util.GT_Util; + public class MultiTileEntityClassContainer { + private final WeakReference<MultiTileEntityRegistry> mRegistry; private String mLocalized; private String mCategoryName; @@ -25,8 +28,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; @@ -38,11 +41,8 @@ public class MultiTileEntityClassContainer { /* End and register the Builder with the registry */ 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())); + 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(); @@ -116,7 +116,10 @@ public class MultiTileEntityClassContainer { } public MultiTileEntityClassContainer setNBT(Tuple... aTags) { - /* Merge in arbitrary NBT tuples of (key, value). Useful for anything for which a custom method has not yet been exposed */ + /* + * Merge in arbitrary NBT tuples of (key, value). Useful for anything for which a custom method has not yet been + * exposed + */ 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 b209c95990..3510140c12 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityContainer.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityContainer.java @@ -2,11 +2,13 @@ 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 gregtech.api.multitileentity.interfaces.IMultiTileEntity; + public class MultiTileEntityContainer { + public final TileEntity mTileEntity; public final MultiTileEntityBlock mBlock; public final byte mBlockMetaData; diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityItemInternal.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityItemInternal.java index 4d7c6be262..aad842c68b 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityItemInternal.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityItemInternal.java @@ -3,20 +3,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; -import gregtech.api.enums.GT_Values; -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_IgnoreEntityCollisionWhenPlacing; -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; @@ -34,7 +22,22 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +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_IgnoreEntityCollisionWhenPlacing; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_OnlyPlaceableWhenSneaking; + public class MultiTileEntityItemInternal extends ItemBlock implements IFluidContainerItem, IItemUpdatable { + public final MultiTileEntityBlockInternal mBlock; public MultiTileEntityItemInternal(Block aBlock) { @@ -47,8 +50,8 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont @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; @@ -80,43 +83,33 @@ 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 + } 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]; - } + 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; + || !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() + && (aPlayer == null || aPlayer.isSneaking() || !(aMTEContainer.mTileEntity instanceof IMTE_OnlyPlaceableWhenSneaking) || !((IMTE_OnlyPlaceableWhenSneaking) aMTEContainer.mTileEntity) .onlyPlaceableWhenSneaking()) @@ -166,7 +159,7 @@ 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); @@ -177,7 +170,7 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont 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); } @@ -195,8 +188,8 @@ 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); } @@ -206,8 +199,8 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont 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); } @@ -217,8 +210,8 @@ 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); @@ -233,8 +226,8 @@ 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); updateItemStack(aStack); @@ -245,8 +238,8 @@ 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); updateItemStack(aStack); @@ -257,8 +250,8 @@ 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); updateItemStack(aStack); @@ -269,11 +262,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; } @@ -281,8 +274,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; } diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java index b212a51384..589f7ef8a6 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java @@ -2,21 +2,12 @@ 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; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.multitileentity.base.BaseMultiTileEntity; -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; @@ -27,10 +18,24 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import appeng.core.CreativeTab; + +import com.gtnewhorizon.gtnhlib.util.map.ItemStackMap; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.multitileentity.base.BaseMultiTileEntity; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Util; +import gregtech.api.util.GT_Utility; + public class MultiTileEntityRegistry { + private static final HashMap<String, MultiTileEntityRegistry> NAMED_REGISTRIES = new HashMap<>(); - // TODO: NBT sensitive or not? Starting with not for now + // TODO: NBT sensitive or not? Starting with not for now private static final ItemStackMap<MultiTileEntityRegistry> REGISTRIES = new ItemStackMap<>(false); private static final HashSet<Class<?>> sRegisteredTileEntities = new HashSet<>(); @@ -41,8 +46,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,8 +62,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)); } @@ -66,9 +71,8 @@ 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; @@ -96,7 +100,10 @@ public class MultiTileEntityRegistry { return new MultiTileEntityClassContainer(this, aID, aClass); } - /** Adds a new MultiTileEntity. It is highly recommended to do this in either the PreInit or the Init Phase. PostInit might not work well.*/ + /** + * Adds a new MultiTileEntity. It is highly recommended to do this in either the PreInit or the Init Phase. PostInit + * might not work well. + */ public ItemStack add(String aLocalised, String aCategoricalName, MultiTileEntityClassContainer aClassContainer) { boolean tFailed = false; if (GT_Utility.isStringInvalid(aLocalised)) { @@ -120,8 +127,9 @@ 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; } } @@ -135,8 +143,8 @@ public class MultiTileEntityRegistry { 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); @@ -144,19 +152,19 @@ 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 + // // 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 = + // 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 = + // 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));} // @@ -209,8 +217,8 @@ 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( @@ -222,13 +230,10 @@ public class MultiTileEntityRegistry { 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; } @@ -238,14 +243,24 @@ 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; } diff --git a/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java index 2ab1f8c7d6..1e7a5cb236 100644 --- a/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java +++ b/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java @@ -7,6 +7,38 @@ 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 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; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.Packet; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidTank; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -38,44 +70,15 @@ import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; import gregtech.common.render.GT_MultiTexture; 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; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidTank; 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}; + 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 @@ -131,17 +134,16 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity // 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()); + final TileEntity tCanonicalTileEntity = MultiTileEntityRegistry + .getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); if (tCanonicalTileEntity instanceof BaseMultiTileEntity) mTextures = ((BaseMultiTileEntity) tCanonicalTileEntity).mTextures; } @@ -158,7 +160,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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 + // Add the Default Parameters. Useful for things that differ between different tiers/types of the // same machine aNBT = GT_Util.fuseNBT(aNBT, tClass.mParameters); } @@ -169,8 +171,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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 { @@ -195,7 +196,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity copyTextures(); } - if (mSidedRedstone.length != 6) mSidedRedstone = new byte[] {15, 15, 15, 15, 15, 15}; + if (mSidedRedstone.length != 6) mSidedRedstone = new byte[] { 15, 15, 15, 15, 15, 15 }; updateCoverBehavior(); @@ -280,8 +281,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity } @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; } @@ -294,22 +295,20 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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; } @@ -318,8 +317,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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]) + return tTileEntity instanceof IMultiTileEntity ? !((IMultiTileEntity) tTileEntity).isSurfaceOpaque(OPOS[aSide]) : !getBlockAtSide(aSide).isOpaqueCube(); } @@ -378,7 +376,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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; } @@ -388,7 +386,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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))}; + return new ITexture[] { TextureFactory.of(mTextures[aSide], GT_Util.getRGBaArray(mRGBa)) }; } @Override @@ -440,6 +438,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity /** * Sets the main facing to {aSide} and update as appropriately + * * @return Whether the facing was changed */ @Override @@ -499,27 +498,25 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity zCoord + aBox[5]); } - public boolean box( - AxisAlignedBB aAABB, - List<AxisAlignedBB> aList, - double aMinX, - double aMinY, - double aMinZ, - double aMaxX, - double aMaxY, - double aMaxZ) { + 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*/ + /* 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); + xCoord + aMinX, + yCoord + aMinY, + zCoord + aMinZ, + xCoord + aMaxX, + yCoord + aMaxY, + zCoord + aMaxZ); } @Override @@ -534,7 +531,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity @Override public void onMachineBlockUpdate() { - /*Do nothing*/ + /* Do nothing */ } public boolean box(AxisAlignedBB aAABB, List<AxisAlignedBB> aList, float[] aBox) { @@ -578,7 +575,12 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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]); + (float) aBox[0], + (float) aBox[1], + (float) aBox[2], + (float) aBox[3], + (float) aBox[4], + (float) aBox[5]); return true; } @@ -598,8 +600,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity /* 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; } @@ -701,17 +703,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity } @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; @@ -742,8 +735,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity if (isClientSide()) { // 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; @@ -779,12 +772,18 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity if (getCoverIDAtSide(coverSide) == 0) { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCovers.keySet())) { if (GregTech_API.getCoverBehaviorNew(tCurrentItem) - .isCoverPlaceable(coverSide, tCurrentItem, this) + .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); + worldObj, + SoundResource.IC2_TOOLS_WRENCH, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); issueClientUpdate(); } sendCoverDataIfNeeded(); @@ -794,7 +793,13 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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); + worldObj, + SoundResource.RANDOM_BREAK, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); dropCover(coverSide, aSide, false); } sendCoverDataIfNeeded(); @@ -802,29 +807,26 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity } } } 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 = (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 (!getCoverInfoAtSide(aSide).isGUIClickable()) return false; @@ -849,8 +851,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity return true; } - 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 (setMainFacing(wrenchSide)) { GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); @@ -858,47 +860,46 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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)); + 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; } @@ -932,22 +933,22 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity } @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; } @@ -957,11 +958,9 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity if ((mOwnerName.length() == 0) && isServerSide()) { setOwnerName(aPlayer.getDisplayName()); setOwnerUuid(aPlayer.getUniqueID()); - } else - return !privateAccess() - || aPlayer.getDisplayName().equals("Player") - || mOwnerName.equals("Player") - || mOwnerName.equals(aPlayer.getDisplayName()); + } else return !privateAccess() || aPlayer.getDisplayName().equals("Player") + || mOwnerName.equals("Player") + || mOwnerName.equals(aPlayer.getDisplayName()); return true; } @@ -993,12 +992,12 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity getCoverInfoAtSide((byte) 4).getCoverID(), getCoverInfoAtSide((byte) 5).getCoverID()); - packet.setRedstoneData((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))); + packet.setRedstoneData( + (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 (this instanceof IMTE_HasModes) { final IMTE_HasModes mteModes = (IMTE_HasModes) this; @@ -1037,8 +1036,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity mFacing = (byte) (aValue & 7); // 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: // Nothing here, currently @@ -1055,21 +1054,21 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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; @@ -1082,16 +1081,15 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity } @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); } @@ -1104,8 +1102,14 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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"); @@ -1119,7 +1123,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity } /** - * Fluid - A Default implementation of the Fluid Tank behaviour, so that every TileEntity can use this to simplify its Code. + * 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; @@ -1152,10 +1157,10 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity 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 + if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0 - || !tTank.getFluid().isFluidEqual(aFluid)) return null; + || !tTank.getFluid().isFluidEqual(aFluid)) + return null; return tTank.drain(aFluid.amount, aDoDrain); } diff --git a/src/main/java/gregtech/api/multitileentity/base/BaseNontickableMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/BaseNontickableMultiTileEntity.java index 9b3deb9d69..29a24f9715 100644 --- a/src/main/java/gregtech/api/multitileentity/base/BaseNontickableMultiTileEntity.java +++ b/src/main/java/gregtech/api/multitileentity/base/BaseNontickableMultiTileEntity.java @@ -2,13 +2,15 @@ package gregtech.api.multitileentity.base; import static gregtech.api.enums.GT_Values.NW; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.network.Packet; + import gregtech.api.net.GT_Packet_SendCoverData; import gregtech.api.util.ISerializableObject; import gregtech.common.covers.CoverInfo; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.network.Packet; 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() { @@ -47,8 +49,8 @@ public abstract class BaseNontickableMultiTileEntity extends BaseMultiTileEntity } @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 4945fbc62e..0f124ae36e 100644 --- a/src/main/java/gregtech/api/multitileentity/base/BaseTickableMultiTileEntity.java +++ b/src/main/java/gregtech/api/multitileentity/base/BaseTickableMultiTileEntity.java @@ -2,14 +2,16 @@ 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; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.world.World; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_OnNeighborBlockChange; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Util; + public abstract class BaseTickableMultiTileEntity extends BaseMultiTileEntity implements IMTE_OnNeighborBlockChange { + /** Variable for seeing if the Tick Function is called right now. */ public boolean mIsRunningTick = false; /** Gets set to true when the Block received a Block Update. */ @@ -84,22 +86,22 @@ public abstract class BaseTickableMultiTileEntity extends BaseMultiTileEntity im /** The first part of the Tick. */ public void onPreTick(long aTick, boolean isServerSide) { - /*Do nothing*/ + /* Do nothing */ } /** The regular Tick. */ public void onTick(long aTimer, boolean isServerSide) { - /*Do nothing*/ + /* Do nothing */ } /** The absolute last part of the Tick. */ public void onPostTick(long aTick, boolean isServerSide) { - /*Do nothing*/ + /* 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*/ + /* Do nothing */ } @Override diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IItemUpdatable.java b/src/main/java/gregtech/api/multitileentity/interfaces/IItemUpdatable.java index 77def5e8fd..89d281eb27 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IItemUpdatable.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IItemUpdatable.java @@ -4,12 +4,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface IItemUpdatable { + /** - * Updates the Data of the ItemStack. Not called every tick but instead called whenever something important happens to the Stack. + * Updates the Data of the ItemStack. Not called every tick but instead called whenever something important happens + * to the Stack. */ void updateItemStack(ItemStack aStack); + /** - * Updates the Data of the ItemStack. Not called every tick but instead called whenever something important happens to the Stack. + * Updates the Data of the ItemStack. Not called every tick but instead called whenever something important happens + * to the Stack. */ void updateItemStack(ItemStack aStack, World aWorld, int aX, int aY, int aZ); } diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java index 414ba24948..c299868b1d 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java @@ -5,6 +5,7 @@ import net.minecraftforge.fluids.FluidStack; public interface IMultiBlockController extends IMultiTileEntity, IMultiBlockFluidHandler, IMultiBlockInventory, IMultiBlockEnergy { + boolean checkStructure(boolean aForceReset); /** Set the structure as having changed, and trigger an update */ diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java index 4ffd725df5..598c057882 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java @@ -3,6 +3,7 @@ package gregtech.api.multitileentity.interfaces; import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; interface IMultiBlockEnergy { + boolean isUniversalEnergyStored(MultiBlockPart aPart, long aEnergyAmount); long getUniversalEnergyStored(MultiBlockPart aPart); diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java index 528c153e05..045a173e94 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java @@ -1,13 +1,15 @@ package gregtech.api.multitileentity.interfaces; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidTank; +import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; + public interface IMultiBlockFluidHandler { + int fill(MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoFill); FluidStack drain(MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoDrain); diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java index c50addbe67..281e1c7745 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java @@ -1,12 +1,15 @@ package gregtech.api.multitileentity.interfaces; -import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; +import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; + public interface IMultiBlockInventory { + boolean hasInventoryBeenModified(MultiBlockPart aPart); boolean isValidSlot(MultiBlockPart aPart, int aIndex); diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockPart.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockPart.java index 027b49ca17..78d6573ebd 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockPart.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockPart.java @@ -3,6 +3,7 @@ package gregtech.api.multitileentity.interfaces; import net.minecraft.util.ChunkCoordinates; public interface IMultiBlockPart extends IMultiTileEntity { + ChunkCoordinates getTargetPos(); void setTargetPos(ChunkCoordinates aTargetPos); diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java index 8b900ad61c..eee5d71ce9 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java @@ -2,21 +2,10 @@ 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; -import gregtech.api.interfaces.tileentity.IDebugableTileEntity; -import gregtech.api.interfaces.tileentity.IEnergyConnected; -import gregtech.api.interfaces.tileentity.IHasInventory; -import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; -import gregtech.api.interfaces.tileentity.ITexturedTileEntity; -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; @@ -31,27 +20,43 @@ import net.minecraft.world.Explosion; import net.minecraft.world.World; import net.minecraftforge.fluids.IFluidHandler; +import cpw.mods.fml.common.Optional; +import gregtech.api.interfaces.tileentity.IBasicEnergyContainer; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IDebugableTileEntity; +import gregtech.api.interfaces.tileentity.IEnergyConnected; +import gregtech.api.interfaces.tileentity.IHasInventory; +import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; +import gregtech.api.interfaces.tileentity.ITexturedTileEntity; +import gregtech.api.interfaces.tileentity.ITurnable; +import gregtech.api.multitileentity.MultiTileEntityBlockInternal; +import gregtech.api.multitileentity.MultiTileEntityItemInternal; +import gregtech.api.multitileentity.MultiTileEntityRegistry; + /* * Heavily inspired by GT6 */ -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. */ +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. */ + + /** + * 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); + /** Writes Item Data to the NBT. */ NBTTagCompound writeItemNBT(NBTTagCompound aNBT); + /** Sets the Item Display Name. Use null to reset it. */ void setCustomName(String aName); @@ -60,7 +65,10 @@ public interface IMultiTileEntity /** return the internal Name of this TileEntity to be registered. */ String getTileEntityName(); - /** Called when a TileEntity of this particular Class is being registered first at any MultiTileEntity Registry. So basically one call per Class. */ + /** + * Called when a TileEntity of this particular Class is being registered first at any MultiTileEntity Registry. So + * basically one call per Class. + */ void onRegistrationFirst(MultiTileEntityRegistry aRegistry, short aID); /** Called after the TileEntity has been placed and set up. */ @@ -113,13 +121,12 @@ public interface IMultiTileEntity void setOwnerUuid(UUID uuid); /** - * Causes a general Texture update. - * Only used Client Side to mark Blocks dirty. + * Causes a general Texture update. Only used Client Side to mark Blocks dirty. */ void issueTextureUpdate(); /** - * Paintable Support + * Paintable Support */ boolean unpaint(); @@ -131,6 +138,7 @@ public interface IMultiTileEntity /** * Sets the main facing to {aSide} and update as appropriately + * * @return Whether the facing was changed */ boolean setMainFacing(byte aSide); @@ -171,8 +179,8 @@ public interface IMultiTileEntity 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); @@ -180,115 +188,107 @@ public interface IMultiTileEntity 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 */ interface IMTE_OnNeighborBlockChange extends IMultiTileEntity { + void onNeighborBlockChange(World aWorld, Block aBlock); } interface IMTE_IsProvidingWeakPower extends IMultiTileEntity { + /** Remember that it passes the opposite Side due to the way vanilla works! */ int isProvidingWeakPower(byte aOppositeSide); } interface IMTE_IsProvidingStrongPower extends IMultiTileEntity { + /** Remember that it passes the opposite Side due to the way vanilla works! */ int isProvidingStrongPower(byte aOppositeSide); } interface IMTE_ShouldCheckWeakPower extends IMultiTileEntity { + boolean shouldCheckWeakPower(byte aSide); } interface IMTE_GetWeakChanges extends IMultiTileEntity { + boolean getWeakChanges(); } interface IMTE_GetComparatorInputOverride extends IMultiTileEntity { + int getComparatorInputOverride(byte aSide); } interface IMTE_BreakBlock extends IMultiTileEntity { + /** return true to prevent the TileEntity from being removed. */ boolean breakBlock(); } interface IMTE_HasMultiBlockMachineRelevantData extends IMultiTileEntity { + /** Return true to mark this Block as a Machine Block for Multiblocks. (Triggers machine update thread) */ boolean hasMultiBlockMachineRelevantData(); } interface IMTE_GetBlockHardness extends IMultiTileEntity { + float getBlockHardness(); } interface IMTE_GetFoodValues extends IMultiTileEntity { + @Optional.Method(modid = MOD_ID_APC) squeek.applecore.api.food.FoodValues getFoodValues(MultiTileEntityItemInternal aItem, ItemStack aStack); } interface IMTE_OnlyPlaceableWhenSneaking extends IMultiTileEntity { + /** Return true to prevent placing this Block without Sneaking. */ boolean onlyPlaceableWhenSneaking(); } 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); + + /** + * 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); } 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); } interface IMTE_AddToolTips extends IMultiTileEntity { + /** Adds ToolTips to the Item. */ void addToolTips(List<String> aList, ItemStack aStack, boolean aF3_H); } interface IMTE_HasModes extends IMultiTileEntity { + byte getMode(); void setMode(byte aMode); diff --git a/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java b/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java index 17bf44c386..b3605d579b 100644 --- a/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java +++ b/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java @@ -3,8 +3,18 @@ package gregtech.api.multitileentity.machine; import static com.google.common.primitives.Ints.saturatedCast; import static gregtech.api.enums.GT_Values.emptyIconContainerArray; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidTank; + import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.GT_Values.NBT; import gregtech.api.enums.Textures; @@ -16,16 +26,9 @@ import gregtech.api.multitileentity.base.BaseTickableMultiTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidTank; public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { + private static final String TEXTURE_LOCATION = "multitileentity/machines/"; public IIconContainer[] mTexturesInactive = emptyIconContainerArray; public IIconContainer[] mTexturesActive = emptyIconContainerArray; @@ -109,10 +112,8 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { // 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 < 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++) @@ -136,36 +137,33 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { // Loading the registry final String textureName = aNBT.getString(NBT.TEXTURE); 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"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/front"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/right"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/side") - }; + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/bottom"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/top"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/left"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/front"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/right"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/side") }; 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"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/front"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/right"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/back") - }; + 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"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/front"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/right"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/back") }; 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"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/front"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/right"), - new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/back") - }; + 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"), + new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/front"), + 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()); + final TileEntity tCanonicalTileEntity = MultiTileEntityRegistry + .getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); if (tCanonicalTileEntity instanceof MultiTileBasicMachine) { mTextures = ((MultiTileBasicMachine) tCanonicalTileEntity).mTextures; mTexturesInactive = ((MultiTileBasicMachine) tCanonicalTileEntity).mTexturesInactive; @@ -178,10 +176,9 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { @Override public ITexture[] getTexture(Block aBlock, byte aSide, boolean isActive, int aRenderPass) { 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(mTextures[GT_Values.FACING_ROTATIONS[mFacing][aSide]], GT_Util.getRGBaArray(mRGBa)), + TextureFactory.of( + (mActive ? mTexturesActive : mTexturesInactive)[GT_Values.FACING_ROTATIONS[mFacing][aSide]]) }; } /* @@ -215,8 +212,7 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { @Override public boolean isUseableByPlayer(EntityPlayer aPlayer) { - return playerOwnsThis(aPlayer, false) - && mTickTimer > 40 + 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); @@ -254,7 +250,7 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { public IFluidTank getFluidTankFillable(byte aSide, FluidStack aFluidToFill) { if (!isLiquidInput(aSide)) return null; for (FluidTankGT tankGT : mTanksInput) if (tankGT.contains(aFluidToFill)) return tankGT; - // if (!mRecipes.containsInput(aFluidToFill, this, slot(mRecipes.mInputItemsCount + + // if (!mRecipes.containsInput(aFluidToFill, this, slot(mRecipes.mInputItemsCount + // mRecipes.mOutputItemsCount))) return null; for (FluidTankGT fluidTankGT : mTanksInput) if (fluidTankGT.isEmpty()) return fluidTankGT; return null; 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 49f2adcd40..5c6576a392 100644 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockController.java +++ b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockController.java @@ -4,6 +4,32 @@ import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; import static gregtech.api.enums.GT_Values.NBT; +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; +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.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidTank; + +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; +import org.lwjgl.input.Keyboard; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; @@ -27,6 +53,7 @@ import com.gtnewhorizons.modularui.common.widget.Scrollable; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TabButton; import com.gtnewhorizons.modularui.common.widget.TabContainer; + import cpw.mods.fml.common.network.NetworkRegistry; import gnu.trove.list.TIntList; import gnu.trove.list.array.TIntArrayList; @@ -48,39 +75,11 @@ 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.lang.ref.WeakReference; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; -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.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidTank; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.lwjgl.input.Keyboard; 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(); @@ -95,7 +94,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex private IAlignmentLimits mLimits = getInitialAlignmentLimits(); // A list of sides - // Each side has a list of parts that have a cover that need to be ticked + // Each side has a list of parts that have a cover that need to be ticked protected List<LinkedList<WeakReference<IMultiBlockPart>>> registeredCoveredParts = Arrays.asList( new LinkedList<>(), new LinkedList<>(), @@ -106,6 +105,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex /** Registry ID of the required casing */ public abstract short getCasingRegistryID(); + /** Meta ID of the required casing */ public abstract short getCasingMeta(); @@ -120,9 +120,9 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex public abstract Vec3Impl getStartingStructureOffset(); /** - * 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. + * 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(); @@ -151,7 +151,7 @@ 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 + // 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 (mInputInventory != null) multiBlockInputInventory.put("controller", mInputInventory); @@ -217,53 +217,47 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex * <p> * Imagine you stand in front of the controller, with controller facing towards you not rotated or flipped. * <p> - * 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. + * 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. * <p> * 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") @@ -287,7 +281,11 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex StructureLibAPI.sendAlignment( this, new NetworkRegistry.TargetPoint( - getWorld().provider.dimensionId, getXCoord(), getYCoord(), getZCoord(), 512)); + getWorld().provider.dimensionId, + getXCoord(), + getYCoord(), + getZCoord(), + 512)); } else { issueTextureUpdate(); } @@ -295,8 +293,8 @@ 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()) { @@ -486,6 +484,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex } public static class BuildState { + /** * Utility class to keep track of the build state of a multiblock */ @@ -535,7 +534,8 @@ 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 @@ -559,22 +559,22 @@ 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 (byte i : ALL_VALID_SIDES) { - // mIcons[i] = aCasing.getIcon(i, aMeta); - // } + // Arrays.fill(mIcons, getTexture(aCasing); + // for (byte i : ALL_VALID_SIDES) { + // 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); + final MultiTileEntityContainer tContainer = tRegistry + .getNewTileEntityContainer(world, x, y, z, aBlockMeta, null); if (tContainer == null) { GT_FML_LOGGER.error("NULL CONTAINER"); return false; @@ -627,10 +627,10 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex 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 + if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0 - || !tTank.getFluid().isFluidEqual(aFluid)) return null; + || !tTank.getFluid().isFluidEqual(aFluid)) + return null; final FluidStack rDrained = tTank.drain(aFluid.amount, aDoDrain); if (rDrained != null && aDoDrain) markInventoryBeenModified(); return rDrained; @@ -873,14 +873,14 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex if (tInv == null) return false; final int tSlot = tInv.getRight(); - final IItemHandlerModifiable inv = tInv.getLeft(); - ; + final IItemHandlerModifiable inv = tInv.getLeft();; - return inv.getStackInSlot(tSlot) == null - || GT_Utility.areStacksEqual( - aStack, - inv.getStackInSlot( - tSlot)); // && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack) + return inv.getStackInSlot(tSlot) == null || GT_Utility.areStacksEqual(aStack, inv.getStackInSlot(tSlot)); // && + // allowPutStack(getBaseMetaTileEntity(), + // aIndex, + // (byte) + // aSide, + // aStack) } @Override @@ -889,11 +889,10 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex if (tInv == null) return false; final int tSlot = tInv.getRight(); - final IItemHandlerModifiable inv = tInv.getLeft(); - ; + final IItemHandlerModifiable inv = tInv.getLeft();; - return inv.getStackInSlot(tSlot) - != null; // && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); + return inv.getStackInSlot(tSlot) != null; // && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, + // aStack); } @Override @@ -1054,76 +1053,81 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex @Override public void addGregTechLogo(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(148, 60)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(148, 60)); } @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new TabContainer() - .setButtonSize(20, 24) - .addTabButton(new TabButton(0) - .setBackground( - false, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) - .setBackground( - true, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) - .addTooltip(getLocalName()) - .setPos(0, -20)) - .addTabButton(new TabButton(1) - .setBackground( - false, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) - .setBackground( - true, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) - .setPos(20, -20)) - .addTabButton(new TabButton(2) - .setBackground( - false, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) - .setBackground( - true, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) - .setPos(40, -20)) - .addTabButton(new TabButton(3) - .setBackground( - false, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) - .setBackground( - true, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) - .setPos(60, -20)) - .addTabButton(new TabButton(4) - .setBackground( - false, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) - .setBackground( - true, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) - .setPos(80, -20)) - .addPage(new MultiChildWidget() - .addChild(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setPos(7, 4) - .setSize(160, 75))) + builder.widget( + new TabContainer() + .setButtonSize( + 20, + 24) + .addTabButton( + new TabButton(0) + .setBackground( + false, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) + .setBackground( + true, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) + .addTooltip(getLocalName()).setPos(0, -20)) + .addTabButton( + new TabButton(1) + .setBackground( + false, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) + .setBackground( + true, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) + .setPos(20, -20)) + .addTabButton( + new TabButton(2) + .setBackground( + false, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) + .setBackground( + true, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) + .setPos(40, -20)) + .addTabButton( + new TabButton(3) + .setBackground( + false, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) + .setBackground( + true, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) + .setPos(60, -20)) + .addTabButton( + new TabButton(4) + .setBackground( + false, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) + .setBackground( + true, + ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) + .setPos(80, -20)) + .addPage( + new MultiChildWidget().addChild( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) + .setPos(7, 4).setSize(160, 75))) .addPage(new MultiChildWidget().addChild(getItemInventoryInputGUI())) .addPage(new MultiChildWidget().addChild(getItemInventoryOutputGUI())) .addPage(new MultiChildWidget().addChild(getFluidInventoryInputGUI())) .addPage(new MultiChildWidget().addChild(getFluidInventoryOutputGUI()))) - .widget(new ItemDrawable(getStackForm(1)) - .asWidget() - .setSize(16, 16) - .setPos(2, -16)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ITEM_IN) - .setSize(16, 16) - .setPos(22, -16)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ITEM_OUT) - .setSize(16, 16) - .setPos(42, -16)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_FLUID_IN) - .setSize(16, 16) - .setPos(62, -16)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_FLUID_OUT) - .setSize(16, 16) - .setPos(82, -16)); + .widget(new ItemDrawable(getStackForm(1)).asWidget().setSize(16, 16).setPos(2, -16)) + .widget(new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ITEM_IN).setSize(16, 16).setPos(22, -16)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ITEM_OUT).setSize(16, 16) + .setPos(42, -16)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_FLUID_IN).setSize(16, 16) + .setPos(62, -16)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_FLUID_OUT).setSize(16, 16) + .setPos(82, -16)); } protected Widget getItemInventoryInputGUI() { @@ -1132,9 +1136,8 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex for (int rows = 0; rows * 4 < Math.min(inv.getSlots(), 128); rows++) { final int columnsToMake = Math.min(Math.min(inv.getSlots(), 128) - rows * 4, 4); for (int column = 0; column < columnsToMake; column++) { - scrollable.widget(new SlotWidget(inv, rows * 4 + column) - .setPos(column * 18, rows * 18) - .setSize(18, 18)); + scrollable + .widget(new SlotWidget(inv, rows * 4 + column).setPos(column * 18, rows * 18).setSize(18, 18)); } } return scrollable.setSize(18 * 4 + 4, 18 * 4).setPos(52, 7); @@ -1146,9 +1149,8 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex for (int rows = 0; rows * 4 < Math.min(inv.getSlots(), 128); rows++) { final int columnsToMake = Math.min(Math.min(inv.getSlots(), 128) - rows * 4, 4); for (int column = 0; column < columnsToMake; column++) { - scrollable.widget(new SlotWidget(inv, rows * 4 + column) - .setPos(column * 18, rows * 18) - .setSize(18, 18)); + scrollable + .widget(new SlotWidget(inv, rows * 4 + column).setPos(column * 18, rows * 18).setSize(18, 18)); } } return scrollable.setSize(18 * 4 + 4, 18 * 4).setPos(52, 7); 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 36fbf35961..43522dcf02 100644 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java +++ b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java @@ -15,6 +15,27 @@ 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 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; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidTank; + import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; @@ -24,6 +45,7 @@ import com.gtnewhorizons.modularui.common.widget.DropDownWidget; import com.gtnewhorizons.modularui.common.widget.FluidSlotWidget; import com.gtnewhorizons.modularui.common.widget.Scrollable; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; @@ -37,37 +59,15 @@ import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_HasModes; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.covers.CoverInfo; -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; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidTank; public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IMultiBlockPart, IMTE_BreakBlock, IMTE_HasModes { - 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)); + 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 ChunkCoordinates mTargetPos = null; protected IMultiBlockController mTarget = null; @@ -79,8 +79,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity protected int mLockedInventoryIndex = 0; /** - * What Part Tier is this part? All Basic Casings are Tier 1, and will allow: - * Energy, Item, Fluid input/output. Some of the more advanced modes can be set to require a higher tier part. + * What Part Tier is this part? All Basic Casings are Tier 1, and will allow: Energy, Item, Fluid input/output. Some + * of the more advanced modes can be set to require a higher tier part. */ public int getPartTier() { return 1; @@ -109,8 +109,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity } @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))); } @@ -180,7 +180,9 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity 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)); + aNBT.getInteger(NBT.TARGET_X), + aNBT.getShort(NBT.TARGET_Y), + aNBT.getInteger(NBT.TARGET_Z)); } if (aNBT.hasKey(NBT.LOCKED_INVENTORY)) { mLockedInventory = aNBT.getString(NBT.LOCKED_INVENTORY); @@ -284,20 +286,21 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity // 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()); + final TileEntity tCanonicalTileEntity = MultiTileEntityRegistry + .getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); if (tCanonicalTileEntity instanceof MultiBlockPart) mTextures = ((MultiBlockPart) tCanonicalTileEntity).mTextures; } @@ -308,26 +311,20 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity // 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(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)}; + 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, TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI) }; } - return new ITexture[] {baseTexture}; + return new ITexture[] { baseTexture }; } @Override @@ -365,8 +362,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity } @Override - 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) { if (mAllowedModes == NOTHING) return true; mMode = getNextAllowedMode(BASIC_MODES); @@ -389,8 +386,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity } /** - * TODO: Make sure the energy/item/fluid hatch is facing that way! or has that mode enabled on that side - * Check SIDE_UNKNOWN for or coverbehavior + * TODO: Make sure the energy/item/fluid hatch is facing that way! or has that mode enabled on that side Check + * SIDE_UNKNOWN for or coverbehavior */ /** @@ -534,8 +531,7 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLittleEnergy) { if (!modeSelected(ENERGY_OUT)) return false; final IMultiBlockController controller = getTarget(true); - return controller != null - && hasMode(ENERGY_OUT) + return controller != null && hasMode(ENERGY_OUT) && controller.decreaseStoredEnergyUnits(this, aEnergy, aIgnoreTooLittleEnergy); } @@ -543,8 +539,7 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) { if (!modeSelected(ENERGY_IN)) return false; final IMultiBlockController controller = getTarget(true); - return controller != null - && hasMode(ENERGY_IN) + return controller != null && hasMode(ENERGY_IN) && controller.increaseStoredEnergyUnits(this, aEnergy, aIgnoreTooMuchEnergy); } @@ -753,14 +748,14 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity for (int rows = 0; rows * 4 < Math.min(inv.getSlots(), 128); rows++) { int columnsToMake = Math.min(Math.min(inv.getSlots(), 128) - rows * 4, 4); for (int column = 0; column < columnsToMake; column++) { - scrollable.widget(new SlotWidget(inv, rows * 4 + column) - .setPos(column * 18, rows * 18) - .setSize(18, 18)); + scrollable + .widget(new SlotWidget(inv, rows * 4 + column).setPos(column * 18, rows * 18).setSize(18, 18)); } } builder.widget(scrollable.setSize(18 * 4 + 4, 18 * 4).setPos(52, 18)); DropDownWidget dropDown = new DropDownWidget(); - builder.widget(dropDown.addDropDownItemsSimple( + builder.widget( + dropDown.addDropDownItemsSimple( controller.getInventoryNames(this), (buttonWidget, index, label, setSelected) -> buttonWidget.setOnClick((clickData, widget) -> { if (getNameOfInventoryFromIndex(controller, index).equals("all")) { @@ -772,12 +767,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity } setSelected.run(); }), - true) - .setSelected(mLockedInventoryIndex) - .setExpandedMaxHeight(60) - .setDirection(DropDownWidget.Direction.DOWN) - .setPos(53, 5) - .setSize(70, 11)); + true).setSelected(mLockedInventoryIndex).setExpandedMaxHeight(60) + .setDirection(DropDownWidget.Direction.DOWN).setPos(53, 5).setSize(70, 11)); } protected String getNameOfInventoryFromIndex(final IMultiBlockController controller, int index) { @@ -838,10 +829,9 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity @Override public void addGregTechLogo(Builder builder) { if (modeSelected(ITEM_IN, ITEM_OUT)) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(152, 74)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17) + .setPos(152, 74)); } else { super.addGregTechLogo(builder); } 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 92931bc4db..9dfd4c0cc6 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,9 +1,11 @@ package gregtech.api.multitileentity.multiblock.base; -import com.gtnewhorizon.structurelib.util.Vec3Impl; import net.minecraft.item.ItemStack; +import com.gtnewhorizon.structurelib.util.Vec3Impl; + public abstract class MultiBlock_Stackable<T extends MultiBlock_Stackable<T>> extends MultiBlockController<T> { + protected static String STACKABLE_TOP = "STACKABLE_TOP"; protected static String STACKABLE_MIDDLE = "STACKABLE_MIDDLE"; protected static String STACKABLE_BOTTOM = "STACKABLE_BOTTOM"; @@ -31,6 +33,7 @@ public abstract class MultiBlock_Stackable<T extends MultiBlock_Stackable<T>> ex buildState.stopBuilding(); } } + /** * Stackable * @@ -62,7 +65,7 @@ public abstract class MultiBlock_Stackable<T extends MultiBlock_Stackable<T>> ex /** * Stackable * - * @return Whether this structure has a Top/Cap. Defaults to true. + * @return Whether this structure has a Top/Cap. Defaults to true. */ public boolean hasTop() { return true; 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 b4b69e0b21..9f0d9bd2d1 100644 --- a/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java +++ b/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java @@ -1,16 +1,10 @@ package gregtech.api.multitileentity.multiblock.casing; /** - * Allows for functional casings that influence the multiblock structure's behavior - * Examples include: - * - Extra Byproducts - * - Extra Speed - * - More parallels - * - Upgraded internal item/energy/fluid storage - * - Faster output - * - Voiding/Anti-Voiding upgrade - * - Ender Upgrades - * - etc, etc. + * Allows for functional casings that influence the multiblock structure's behavior Examples include: - Extra Byproducts + * - Extra Speed - More parallels - Upgraded internal item/energy/fluid storage - Faster output - Voiding/Anti-Voiding + * upgrade - Ender Upgrades - etc, etc. * */ -public class CasingBehaviorBase {} +public class CasingBehaviorBase { +} diff --git a/src/main/java/gregtech/api/net/GT_Packet.java b/src/main/java/gregtech/api/net/GT_Packet.java index 48cc171d61..fe2ac22ed3 100644 --- a/src/main/java/gregtech/api/net/GT_Packet.java +++ b/src/main/java/gregtech/api/net/GT_Packet.java @@ -1,15 +1,17 @@ package gregtech.api.net; -import com.google.common.io.ByteArrayDataInput; -import io.netty.buffer.ByteBuf; import net.minecraft.network.INetHandler; import net.minecraft.world.IBlockAccess; +import com.google.common.io.ByteArrayDataInput; +import io.netty.buffer.ByteBuf; + /** * @deprecated Use {@link GT_Packet_New} instead */ @Deprecated public abstract class GT_Packet { + public GT_Packet(boolean aIsReference) { // } @@ -29,8 +31,8 @@ public abstract class GT_Packet { public abstract byte[] encode(); /** - * Encode the data into given byte buffer without creating an intermediate byte array. - * Default implementation just throw {@link UnsupportedOperationException}. + * Encode the data into given byte buffer without creating an intermediate byte array. Default implementation just + * throw {@link UnsupportedOperationException}. */ public void encode(ByteBuf aOut) { throw new UnsupportedOperationException(); @@ -49,7 +51,8 @@ public abstract class GT_Packet { public abstract void process(IBlockAccess aWorld); /** - * This will be called just before {@link #process(IBlockAccess)} to inform the handler about the source and type of connection + * This will be called just before {@link #process(IBlockAccess)} to inform the handler about the source and type of + * connection */ public void setINetHandler(INetHandler aHandler) {} } 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 ebc69cd540..74876ef2bc 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 @@ -1,14 +1,16 @@ package gregtech.api.net; -import com.google.common.io.ByteArrayDataInput; -import io.netty.buffer.ByteBuf; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; +import com.google.common.io.ByteArrayDataInput; +import io.netty.buffer.ByteBuf; + /** * Used to transfer Block Events in a much better fashion */ public class GT_Packet_Block_Event extends GT_Packet_New { + private int mX, mZ; private short mY; private byte mID, mValue; @@ -38,7 +40,11 @@ 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()); + 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 f692a4c88a..7322339167 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java +++ b/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java @@ -1,15 +1,18 @@ package gregtech.api.net; -import com.google.common.io.ByteArrayDataInput; -import gregtech.GT_Mod; -import gregtech.api.util.GT_ClientPreference; -import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.world.IBlockAccess; +import com.google.common.io.ByteArrayDataInput; + +import gregtech.GT_Mod; +import gregtech.api.util.GT_ClientPreference; +import io.netty.buffer.ByteBuf; + public class GT_Packet_ClientPreference extends GT_Packet_New { + private GT_ClientPreference mPreference; private EntityPlayerMP mPlayer; 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 e2df15cb33..dbc72042a3 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java +++ b/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java @@ -1,17 +1,19 @@ package gregtech.api.net; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; + import com.google.common.io.ByteArrayDataInput; + import gregtech.api.enums.GT_Values; import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.metatileentity.BaseTileEntity; import gregtech.api.metatileentity.CoverableTileEntity; import gregtech.common.GT_Proxy; import io.netty.buffer.ByteBuf; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; /** * Client -> Server: Request that the server opens a Gregtech GUI for us after providing us with the required data. @@ -31,8 +33,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; @@ -90,11 +92,11 @@ public class GT_Packet_GtTileEntityGuiRequest extends GT_Packet_New { final BaseTileEntity baseTile = ((BaseTileEntity) tile); final EntityPlayerMP player = (EntityPlayerMP) world.getEntityByID(playerId); - final CoverableTileEntity coverableTile = - (baseTile instanceof CoverableTileEntity) ? (CoverableTileEntity) baseTile : null; - // 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 + final CoverableTileEntity coverableTile = (baseTile instanceof CoverableTileEntity) + ? (CoverableTileEntity) baseTile + : null; + // 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 && coverableTile != null) { final byte coverSide = (byte) (guiId - GT_Proxy.GUI_ID_COVER_SIDE_BASE); final GT_Packet_TileEntityCoverGUI packet = new GT_Packet_TileEntityCoverGUI( diff --git a/src/main/java/gregtech/api/net/GT_Packet_MultiTileEntity.java b/src/main/java/gregtech/api/net/GT_Packet_MultiTileEntity.java index 5263549264..9f83cc4eda 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_MultiTileEntity.java +++ b/src/main/java/gregtech/api/net/GT_Packet_MultiTileEntity.java @@ -2,19 +2,22 @@ package gregtech.api.net; import static gregtech.api.enums.GT_Values.B; +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.IBlockAccess; + import com.google.common.io.ByteArrayDataInput; + import gregtech.GT_Mod; import gregtech.api.metatileentity.GregTechTileClientEvents; import gregtech.api.multitileentity.MultiTileEntityBlock; import gregtech.api.multitileentity.interfaces.IMultiBlockPart; import gregtech.api.multitileentity.interfaces.IMultiTileEntity; import io.netty.buffer.ByteBuf; -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.IBlockAccess; public class GT_Packet_MultiTileEntity extends GT_Packet_New { + public static final int COVERS = B[0], REDSTONE = B[1], MODES = B[2], CONTROLLER = B[3]; private int features = 0; @@ -34,8 +37,8 @@ public class GT_Packet_MultiTileEntity extends GT_Packet_New { } // For multi tiles - public GT_Packet_MultiTileEntity( - int aFeatures, int aX, short aY, int aZ, short aRID, short aID, byte aCommonData, byte aColor) { + public GT_Packet_MultiTileEntity(int aFeatures, int aX, short aY, int aZ, short aRID, short aID, byte aCommonData, + byte aColor) { super(false); features = aFeatures; @@ -189,7 +192,11 @@ public class GT_Packet_MultiTileEntity extends GT_Packet_New { } } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error( - "Exception setting tile entity data for tile entity {} at ({}, {}, {})", tTileEntity, mX, mY, mZ); + "Exception setting tile entity data for tile entity {} at ({}, {}, {})", + tTileEntity, + mX, + mY, + mZ); } } 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 f987ebe24b..41eb1740b3 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_New.java +++ b/src/main/java/gregtech/api/net/GT_Packet_New.java @@ -1,11 +1,13 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; + 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); } 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 b79ce20e39..b095dd6238 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java +++ b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java @@ -1,12 +1,15 @@ package gregtech.api.net; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.IBlockAccess; + import com.google.common.io.ByteArrayDataInput; + import gregtech.common.GT_Client; import io.netty.buffer.ByteBuf; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.IBlockAccess; public class GT_Packet_Pollution extends GT_Packet_New { + private ChunkCoordIntPair chunk; private int pollution; 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 c330514144..e997c8feb9 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_RequestCoverData.java +++ b/src/main/java/gregtech/api/net/GT_Packet_RequestCoverData.java @@ -1,10 +1,5 @@ package gregtech.api.net; -import com.google.common.io.ByteArrayDataInput; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.common.covers.CoverInfo; -import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; @@ -13,10 +8,18 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import com.google.common.io.ByteArrayDataInput; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.metatileentity.CoverableTileEntity; +import gregtech.common.covers.CoverInfo; +import io.netty.buffer.ByteBuf; + /** * Client -> Server : ask for cover data */ public class GT_Packet_RequestCoverData extends GT_Packet_New { + protected int mX; protected short mY; protected int mZ; @@ -78,7 +81,11 @@ 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 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 86ecb8b468..66faa2c7d7 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_SendCoverData.java +++ b/src/main/java/gregtech/api/net/GT_Packet_SendCoverData.java @@ -1,19 +1,22 @@ package gregtech.api.net; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; + import com.google.common.io.ByteArrayDataInput; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.metatileentity.CoverableTileEntity; import gregtech.api.util.ISerializableObject; import gregtech.common.covers.CoverInfo; import io.netty.buffer.ByteBuf; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; /** * Server -> Client : Update cover data */ public class GT_Packet_SendCoverData extends GT_Packet_New { + protected int mX; protected short mY; protected int mZ; @@ -26,8 +29,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; 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 eff095b0fc..917e0865da 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_SetConfigurationCircuit.java +++ b/src/main/java/gregtech/api/net/GT_Packet_SetConfigurationCircuit.java @@ -1,6 +1,15 @@ package gregtech.api.net; +import net.minecraft.item.ItemStack; +import net.minecraft.network.INetHandler; +import net.minecraft.network.NetHandlerPlayServer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; + import com.google.common.io.ByteArrayDataInput; + import cpw.mods.fml.common.network.ByteBufUtils; import gregtech.api.interfaces.IConfigurationCircuitSupport; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -9,18 +18,12 @@ import gregtech.api.metatileentity.BaseTileEntity; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; -import net.minecraft.item.ItemStack; -import net.minecraft.network.INetHandler; -import net.minecraft.network.NetHandlerPlayServer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -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; protected int mZ; @@ -98,8 +101,7 @@ public class GT_Packet_SetConfigurationCircuit extends GT_Packet_New { final IConfigurationCircuitSupport machine = ((BaseTileEntity) tile).getConfigurationCircuitSupport(); if (machine == null) return; if (!machine.allowSelectCircuit()) return; - machine.getConfigurationCircuits().stream() - .filter(stack -> GT_Utility.areStacksEqual(stack, circuit)) + machine.getConfigurationCircuits().stream().filter(stack -> GT_Utility.areStacksEqual(stack, circuit)) .findFirst() .ifPresent(stack -> ((IHasInventory) 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 9342248a7a..a96d33bda6 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_SetLockedFluid.java +++ b/src/main/java/gregtech/api/net/GT_Packet_SetLockedFluid.java @@ -1,12 +1,5 @@ package gregtech.api.net; -import com.google.common.io.ByteArrayDataInput; -import gregtech.api.interfaces.metatileentity.IFluidLockable; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; @@ -17,7 +10,17 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import com.google.common.io.ByteArrayDataInput; + +import gregtech.api.interfaces.metatileentity.IFluidLockable; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import io.netty.buffer.ByteBuf; + public class GT_Packet_SetLockedFluid extends GT_Packet_New { + protected int mX; protected short mY; protected int mZ; @@ -89,7 +92,9 @@ public class GT_Packet_SetLockedFluid extends GT_Packet_New { mPlayer, String.format( GT_LanguageManager.addStringLocalization( - "Interaction_DESCRIPTION_Index_151.4", "Successfully locked Fluid to %s", false), + "Interaction_DESCRIPTION_Index_151.4", + "Successfully locked Fluid to %s", + false), new FluidStack(tFluid, 1).getLocalizedName())); mteToLock.onFluidLockPacketReceived(tFluid.getName()); 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 ae779efc75..808ddc218c 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_Sound.java +++ b/src/main/java/gregtech/api/net/GT_Packet_Sound.java @@ -1,15 +1,19 @@ package gregtech.api.net; +import java.io.DataOutput; +import java.io.IOException; + +import net.minecraft.world.IBlockAccess; + import com.google.common.io.ByteArrayDataInput; + import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufOutputStream; -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; private short mY; private String mSoundName; 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 3f1425272a..cb38ca5d32 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntity.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntity.java @@ -1,15 +1,18 @@ package gregtech.api.net; +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; + import com.google.common.io.ByteArrayDataInput; + import gregtech.GT_Mod; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import io.netty.buffer.ByteBuf; -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; public class GT_Packet_TileEntity extends GT_Packet_New { + private int mX, mZ, mC0, mC1, mC2, mC3, mC4, mC5; private short mY, mID, mRID; private byte mTexture, mTexturePage, mUpdate, mRedstone, mColor; @@ -19,23 +22,8 @@ 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; @@ -56,22 +44,8 @@ public class GT_Packet_TileEntity extends GT_Packet_New { } // 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) { + 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, @@ -92,21 +66,8 @@ public class GT_Packet_TileEntity extends GT_Packet_New { } // 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); } @@ -164,17 +125,28 @@ public class GT_Packet_TileEntity extends GT_Packet_New { final TileEntity tTileEntity = aWorld.getTileEntity(mX, mY, mZ); try { final Block tBlock; - if (tTileEntity instanceof BaseMetaTileEntity) - ((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); + if (tTileEntity instanceof BaseMetaTileEntity) ((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); } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error( - "Exception setting tile entity data for tile entity {} at ({}, {}, {})", tTileEntity, mX, mY, mZ); + "Exception setting tile entity data for tile entity {} at ({}, {}, {})", + tTileEntity, + mX, + mY, + mZ); } } 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 6989acca9e..07d99a3896 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java @@ -1,18 +1,21 @@ package gregtech.api.net; -import com.google.common.io.ByteArrayDataInput; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import io.netty.buffer.ByteBuf; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import com.google.common.io.ByteArrayDataInput; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import io.netty.buffer.ByteBuf; + /** * Client -> Server: Update cover data. use this only if you are using the legacy data storage */ public class GT_Packet_TileEntityCover extends GT_Packet_New { + protected int mX; protected short mY; protected int mZ; 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 6fbaf81b53..f14e000a3b 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java @@ -1,6 +1,15 @@ package gregtech.api.net; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + import com.google.common.io.ByteArrayDataInput; + import gregtech.api.GregTech_API; import gregtech.api.gui.GT_GUICover; import gregtech.api.interfaces.tileentity.ICoverable; @@ -9,18 +18,12 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.ISerializableObject; import gregtech.common.covers.CoverInfo; import io.netty.buffer.ByteBuf; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; /** * Server -> Client: Show GUI */ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { + protected int mX; protected short mY; protected int mZ; @@ -35,8 +38,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; @@ -51,15 +54,8 @@ 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; @@ -89,16 +85,8 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { this.parentGuiId = parentGuiId; } - 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; @@ -112,8 +100,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(); @@ -143,8 +131,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(); 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 2b2338d4ce..562edc9770 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java @@ -1,11 +1,5 @@ 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.util.ISerializableObject; -import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; @@ -14,10 +8,19 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +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.util.ISerializableObject; +import io.netty.buffer.ByteBuf; + /** * Client -> Server: Update cover data */ public class GT_Packet_TileEntityCoverNew extends GT_Packet_New { + protected int mX; protected short mY; protected int mZ; @@ -32,8 +35,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; @@ -100,7 +103,7 @@ public class GT_Packet_TileEntityCoverNew extends GT_Packet_New { @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 db94051946..e8ec9be80b 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_UpdateItem.java +++ b/src/main/java/gregtech/api/net/GT_Packet_UpdateItem.java @@ -1,10 +1,5 @@ package gregtech.api.net; -import com.google.common.io.ByteArrayDataInput; -import cpw.mods.fml.common.network.ByteBufUtils; -import gregtech.api.interfaces.INetworkUpdatableItem; -import gregtech.api.util.ISerializableObject; -import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -12,10 +7,18 @@ import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.world.IBlockAccess; +import com.google.common.io.ByteArrayDataInput; + +import cpw.mods.fml.common.network.ByteBufUtils; +import gregtech.api.interfaces.INetworkUpdatableItem; +import gregtech.api.util.ISerializableObject; +import io.netty.buffer.ByteBuf; + /** * 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; 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 3d18c9d204..cac5405eec 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java +++ b/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java @@ -1,9 +1,5 @@ package gregtech.api.net; -import com.google.common.io.ByteArrayDataInput; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; @@ -12,7 +8,14 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import com.google.common.io.ByteArrayDataInput; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import io.netty.buffer.ByteBuf; + public class GT_Packet_WirelessRedstoneCover extends GT_Packet_TileEntityCover { + private static final int PRIVATE_MASK = 0xFFFE0000; private static final int PUBLIC_MASK = 0x0000FFFF; private static final int CHECKBOX_MASK = 0x00010000; @@ -25,15 +28,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; @@ -85,8 +88,7 @@ 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/net/IGT_NetworkHandler.java b/src/main/java/gregtech/api/net/IGT_NetworkHandler.java index 2949ec6791..07c4a37030 100644 --- a/src/main/java/gregtech/api/net/IGT_NetworkHandler.java +++ b/src/main/java/gregtech/api/net/IGT_NetworkHandler.java @@ -1,11 +1,13 @@ package gregtech.api.net; -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.world.World; +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; + @SuppressWarnings("deprecation") public interface IGT_NetworkHandler { + void sendToPlayer(GT_Packet aPacket, EntityPlayerMP aPlayer); void sendToAllAround(GT_Packet aPacket, TargetPoint aPosition); diff --git a/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java b/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java index 1fe4536085..3294af2fd0 100644 --- a/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java +++ b/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java @@ -1,10 +1,11 @@ package gregtech.api.objects; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + import cpw.mods.fml.common.Optional; import gregtech.api.metatileentity.BaseMetaTileEntity; 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", @@ -14,23 +15,16 @@ public class AE2DigitalChestHandler implements appeng.api.storage.IExternalStora @Override @Optional.Method(modid = "appliedenergistics2") - public boolean canHandle( - final TileEntity te, - final ForgeDirection d, - final appeng.api.storage.StorageChannel chan, + 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 + 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 41ca5e1e05..178ea0d5e8 100644 --- a/src/main/java/gregtech/api/objects/CollectorUtils.java +++ b/src/main/java/gregtech/api/objects/CollectorUtils.java @@ -9,20 +9,18 @@ import java.util.stream.Collector; import java.util.stream.Collectors; public class CollectorUtils { + /** - * Returns a merge function, suitable for use in - * {@link Map#merge(Object, Object, BiFunction) Map.merge()} or - * {@link Collectors#toMap(Function, Function, BinaryOperator) toMap()}, which always - * throws {@code IllegalStateException}. This can be used to enforce the - * assumption that the elements being collected are distinct. + * Returns a merge function, suitable for use in {@link Map#merge(Object, Object, BiFunction) Map.merge()} or + * {@link Collectors#toMap(Function, Function, BinaryOperator) toMap()}, which always throws + * {@code IllegalStateException}. This can be used to enforce the assumption that the elements being collected are + * distinct. * * @param <T> the type of input arguments to the merge function * @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( diff --git a/src/main/java/gregtech/api/objects/ElementStack.java b/src/main/java/gregtech/api/objects/ElementStack.java index 29f043188c..4f71c6efee 100644 --- a/src/main/java/gregtech/api/objects/ElementStack.java +++ b/src/main/java/gregtech/api/objects/ElementStack.java @@ -3,6 +3,7 @@ package gregtech.api.objects; import gregtech.api.enums.Element; public class ElementStack implements Cloneable { + public int mAmount; public Element mElement; @@ -29,11 +30,8 @@ public class ElementStack implements Cloneable { if (aObject == this) return true; 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); + if (aObject instanceof ElementStack) 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 fe6bd4a214..50eb3ebcc1 100644 --- a/src/main/java/gregtech/api/objects/GT_ArrayList.java +++ b/src/main/java/gregtech/api/objects/GT_ArrayList.java @@ -1,12 +1,14 @@ package gregtech.api.objects; -import com.google.common.collect.Collections2; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Objects; +import com.google.common.collect.Collections2; + public class GT_ArrayList<E> extends ArrayList<E> { + private static final long serialVersionUID = 1L; private int size_sS; @@ -22,11 +24,10 @@ public class GT_ArrayList<E> extends ArrayList<E> { mAllowNulls = aAllowNulls; if (!mAllowNulls) { size_sS = size(); - for (int i = 0; i < size_sS; i++) - if (get(i) == null) { - remove(i--); - size_sS = size(); - } + for (int i = 0; i < size_sS; i++) if (get(i) == null) { + remove(i--); + size_sS = size(); + } } } @@ -35,11 +36,10 @@ public class GT_ArrayList<E> extends ArrayList<E> { mAllowNulls = aAllowNulls; if (!mAllowNulls) { size_sS = size(); - for (int i = 0; i < size_sS; i++) - if (get(i) == null) { - remove(i--); - size_sS = size(); - } + for (int i = 0; i < size_sS; i++) if (get(i) == null) { + remove(i--); + size_sS = size(); + } } } diff --git a/src/main/java/gregtech/api/objects/GT_ChunkManager.java b/src/main/java/gregtech/api/objects/GT_ChunkManager.java index e06834fe1f..291e669741 100644 --- a/src/main/java/gregtech/api/objects/GT_ChunkManager.java +++ b/src/main/java/gregtech/api/objects/GT_ChunkManager.java @@ -1,16 +1,10 @@ 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 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; @@ -18,9 +12,19 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; +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; + // This class handles re-initializing chunks after a server restart public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback, ForgeChunkManager.PlayerOrderedLoadingCallback { + private Map<TileEntity, Ticket> registeredTickets = new HashMap<>(); public static GT_ChunkManager instance = new GT_ChunkManager(); @@ -32,9 +36,9 @@ public class GT_ChunkManager @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 + // 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 + // 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 @@ -47,8 +51,7 @@ public class GT_ChunkManager int z = ticket.getModData().getInteger("OwnerZ"); if (y > 0) { TileEntity tile = world.getTileEntity(x, y, z); - if (tile != null - && tile instanceof IGregTechTileEntity + if (tile != null && tile instanceof IGregTechTileEntity && ((IGregTechTileEntity) tile).isAllowedToWork()) { ForgeChunkManager.forceChunk(ticket, new ChunkCoordIntPair(x >> 4, z >> 4)); if (!registeredTickets.containsKey(tile)) { @@ -67,7 +70,7 @@ public class GT_ChunkManager return validTickets; } - // Determine if player tickets should be kept. This is where a ticket list per player would be created and + // 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. @@ -83,27 +86,28 @@ public class GT_ChunkManager 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.debugChunkloaders && chunkXZ != null) - GT_Log.out.println( - "GT_ChunkManager: Chunk request: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); + if (GT_Values.debugChunkloaders && chunkXZ != null) 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); - else - ticket = ForgeChunkManager.requestPlayerTicket( - GT_Mod.instance, player, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); + if (player.equals("")) ticket = ForgeChunkManager + .requestTicket(GT_Mod.instance, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); + else 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 + ")"); + if (GT_Values.debugChunkloaders) 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); @@ -124,9 +128,8 @@ public class GT_ChunkManager 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 + ")"); + if (GT_Values.debugChunkloaders) GT_Log.out + .println("GT_ChunkManager: Chunk release: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); ForgeChunkManager.unforceChunk(ticket, chunkXZ); } } @@ -136,11 +139,15 @@ public class GT_ChunkManager 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 + ")"); - for (ChunkCoordIntPair chunk : ticket.getChunkList()) - GT_Log.out.println( - "GT_ChunkManager: Chunk release: (" + chunk.chunkXPos + ", " + chunk.chunkZPos + ")"); + 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 + ")"); } ForgeChunkManager.releaseTicket(ticket); instance.registeredTickets.remove(owner); @@ -150,8 +157,13 @@ public class GT_ChunkManager 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 + ")"); + 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()) { diff --git a/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java b/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java index cfecc9d736..8ea4ce008d 100644 --- a/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java +++ b/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java @@ -1,14 +1,16 @@ package gregtech.api.objects; +import net.minecraft.block.Block; + 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; 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 4f5eca5b24..04659d584f 100644 --- a/src/main/java/gregtech/api/objects/GT_Cover_Default.java +++ b/src/main/java/gregtech/api/objects/GT_Cover_Default.java @@ -1,12 +1,14 @@ package gregtech.api.objects; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_Default extends GT_CoverBehavior { + /** * This is the Dummy, if there is a generic Cover without behavior */ @@ -20,15 +22,8 @@ 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, 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 e0cd5aa061..58d43476ef 100644 --- a/src/main/java/gregtech/api/objects/GT_Cover_None.java +++ b/src/main/java/gregtech/api/objects/GT_Cover_None.java @@ -2,13 +2,14 @@ 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; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.ISerializableObject; + public class GT_Cover_None extends GT_CoverBehavior { /** @@ -67,33 +68,26 @@ 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; } @@ -103,203 +97,154 @@ 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 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 91c5eac092..db240479de 100644 --- a/src/main/java/gregtech/api/objects/GT_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_Fluid.java @@ -2,15 +2,17 @@ package gregtech.api.objects; import static gregtech.api.enums.GT_Values.RES_PATH_BLOCK; +import net.minecraftforge.fluids.Fluid; + import gregtech.api.GregTech_API; import gregtech.api.fluid.GT_FluidFactory; -import net.minecraftforge.fluids.Fluid; /** * @deprecated use {@link GT_FluidFactory#builder} */ @Deprecated public class GT_Fluid extends Fluid implements Runnable { + public final String mTextureName; private final short[] mRGBa; @@ -23,8 +25,7 @@ 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) + 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])); } diff --git a/src/main/java/gregtech/api/objects/GT_FluidStack.java b/src/main/java/gregtech/api/objects/GT_FluidStack.java index 8f796430e5..55bbf712fa 100644 --- a/src/main/java/gregtech/api/objects/GT_FluidStack.java +++ b/src/main/java/gregtech/api/objects/GT_FluidStack.java @@ -1,22 +1,25 @@ package gregtech.api.objects; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; 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; +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; + /** * 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; @@ -38,8 +41,7 @@ public class GT_FluidStack extends FluidStack { while (lock) { Thread.sleep(1); } - } catch (InterruptedException e) { - } + } catch (InterruptedException e) {} lock = true; for (GT_FluidStack tFluid : sAllFluidStacks) tFluid.fixFluidIDForFucksSake(); try { @@ -77,7 +79,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 01c4b00995..578d22a4a3 100644 --- a/src/main/java/gregtech/api/objects/GT_HashSet.java +++ b/src/main/java/gregtech/api/objects/GT_HashSet.java @@ -1,11 +1,14 @@ package gregtech.api.objects; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_Utility; import java.util.*; + import net.minecraft.item.ItemStack; +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_Utility; + public class GT_HashSet<E extends GT_ItemStack> extends AbstractSet<E> { + private static final Object OBJECT = new Object(); private final transient HashMap<GT_ItemStack, Object> map; diff --git a/src/main/java/gregtech/api/objects/GT_ItemStack.java b/src/main/java/gregtech/api/objects/GT_ItemStack.java index a6c892c4f9..21dffd1945 100644 --- a/src/main/java/gregtech/api/objects/GT_ItemStack.java +++ b/src/main/java/gregtech/api/objects/GT_ItemStack.java @@ -1,12 +1,14 @@ package gregtech.api.objects; -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Utility; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Utility; + public class GT_ItemStack { + public final Item mItem; public final byte mStackSize; public final short mMetaData; diff --git a/src/main/java/gregtech/api/objects/GT_ItemStack2.java b/src/main/java/gregtech/api/objects/GT_ItemStack2.java index 93f2da6d6b..b137e78829 100644 --- a/src/main/java/gregtech/api/objects/GT_ItemStack2.java +++ b/src/main/java/gregtech/api/objects/GT_ItemStack2.java @@ -4,8 +4,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; /** - * GT_ItemStack, but with a better hashCode(). Due to this change, it should not be placed in the same hash based - * data structure with GT_ItemStack. It also shouldn't be used to construct search query into a hash based data structure + * GT_ItemStack, but with a better hashCode(). Due to this change, it should not be placed in the same hash based data + * structure with GT_ItemStack. It also shouldn't be used to construct search query into a hash based data structure * that contains GT_ItemStack. */ public class GT_ItemStack2 extends GT_ItemStack { diff --git a/src/main/java/gregtech/api/objects/GT_MultiTexture.java b/src/main/java/gregtech/api/objects/GT_MultiTexture.java index 82df899135..9748ecb934 100644 --- a/src/main/java/gregtech/api/objects/GT_MultiTexture.java +++ b/src/main/java/gregtech/api/objects/GT_MultiTexture.java @@ -3,12 +3,18 @@ package gregtech.api.objects; import gregtech.api.interfaces.ITexture; /** - * <p>Lets Multiple ITextures Render overlay over each other.<</p> - * <p>I should have done this much earlier...</p> + * <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 public class GT_MultiTexture extends gregtech.common.render.GT_MultiTexture implements ITexture { + public GT_MultiTexture(ITexture... aTextures) { super(aTextures); } diff --git a/src/main/java/gregtech/api/objects/GT_RenderedTexture.java b/src/main/java/gregtech/api/objects/GT_RenderedTexture.java index 4c17afde17..330d72b88a 100644 --- a/src/main/java/gregtech/api/objects/GT_RenderedTexture.java +++ b/src/main/java/gregtech/api/objects/GT_RenderedTexture.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.ITexture; @Deprecated public class GT_RenderedTexture extends gregtech.common.render.GT_RenderedTexture implements ITexture, IColorModulationContainer { + @Deprecated public short[] mRGBa; diff --git a/src/main/java/gregtech/api/objects/GT_SidedTexture.java b/src/main/java/gregtech/api/objects/GT_SidedTexture.java index 25b941e968..8ceb6a9a6d 100644 --- a/src/main/java/gregtech/api/objects/GT_SidedTexture.java +++ b/src/main/java/gregtech/api/objects/GT_SidedTexture.java @@ -11,42 +11,25 @@ import gregtech.api.interfaces.ITexture; @Deprecated 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 3966b060a3..079260c7dc 100644 --- a/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java +++ b/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java @@ -1,17 +1,18 @@ package gregtech.api.objects; -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.util.LightingHelper; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.enums.Dyes; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.util.LightingHelper; + /** - * This ITexture implementation extends the GT_RenderedTexture class - * to render with bottom side flipped as with dumb blocks rendering. - * It is used in Ore blocks rendering so they better blends with dumb block ores - * from vanilla or other mods, when seen from bottom. + * This ITexture implementation extends the GT_RenderedTexture class to render with bottom side flipped as with dumb + * blocks rendering. It is used in Ore blocks rendering so they better blends with dumb block ores from vanilla or other + * mods, when seen from bottom. + * * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. */ @Deprecated 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 f449478860..fffa68fadf 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java @@ -1,10 +1,12 @@ package gregtech.api.objects; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; import java.util.Random; + import net.minecraftforge.common.config.ConfigCategory; +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; + public class GT_UO_Dimension { private BiMap<String, GT_UO_Fluid> fFluids; @@ -20,8 +22,7 @@ public class GT_UO_Dimension { 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]); + GT_UO_Fluid fluid = new GT_UO_Fluid((ConfigCategory) aConfigCategory.getChildren().toArray()[i]); fFluids.put(fluid.Registry, fluid); maxChance += fluid.Chance; } 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 44b56938b4..e717f857d5 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java +++ b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java @@ -1,11 +1,12 @@ package gregtech.api.objects; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.Configuration; +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; + public class GT_UO_DimensionList { private Configuration fConfig; @@ -37,15 +38,8 @@ public class GT_UO_DimensionList { } } - public void SetConfigValues( - String aDimensionName, - String aDimension, - String aName, - String aRegistry, - int aMinAmount, - int aMaxAmount, - int aChance, - int aDecreasePerOperationAmount) { + 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; @@ -74,18 +68,18 @@ public class GT_UO_DimensionList { fConfig.setCategoryComment(fCategory, "Config Underground Fluids (Delete this Category for regenerate)"); fConfig.setCategoryComment( - fCategory + ".Default", "Set Default Generating (Use this Category for Default settings)"); + 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(); + 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]); + 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 e43f80913e..7916131b63 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -3,11 +3,13 @@ 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; public class GT_UO_Fluid { + public String Registry = "null"; public int MaxAmount = 0; public int MinAmount = 0; @@ -20,8 +22,8 @@ public class GT_UO_Fluid { Registry = aConfigCategory.get("Registry").getString(); } if (aConfigCategory.containsKey("MaxAmount")) { - aConfigCategory.get("MaxAmount").comment = - "Max amount generation (per operation, sets the VeinData) 80000 MAX"; + aConfigCategory + .get("MaxAmount").comment = "Max amount generation (per operation, sets the VeinData) 80000 MAX"; MaxAmount = aConfigCategory.get("MaxAmount").getInt(0); } if (aConfigCategory.containsKey("MinAmount")) { @@ -29,15 +31,14 @@ public class GT_UO_Fluid { 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!)"; + 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); + 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); @@ -51,11 +52,11 @@ public class GT_UO_Fluid { } } - public int getRandomAmount( - Random aRandom) { // generates some random ass number that correlates to extraction speeds - int smax = (int) Math.floor(Math.pow( - MaxAmount * 100.d * DIVIDER, - 0.2d)); // use scaled max and min values for the randomness to make high values more rare. + public int getRandomAmount(Random aRandom) { // generates some random ass number that correlates to extraction + // speeds + int smax = (int) Math.floor(Math.pow(MaxAmount * 100.d * DIVIDER, 0.2d)); // use scaled max and min values for + // the randomness to make high values + // more rare. double smin = Math.pow(MinAmount * 100.d * DIVIDER, 0.2d); double samount = Math.max(smin, aRandom.nextInt(smax) + aRandom.nextDouble()); return (int) (Math.pow(samount, 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 cf3c2b5c14..52abab19cb 100644 --- a/src/main/java/gregtech/api/objects/ItemData.java +++ b/src/main/java/gregtech/api/objects/ItemData.java @@ -1,11 +1,14 @@ package gregtech.api.objects; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; import java.util.*; + import net.minecraft.item.ItemStack; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; + public class ItemData { + private static final MaterialStack[] EMPTY_MATERIALSTACK_ARRAY = new MaterialStack[0]; public final List<Object> mExtraData = new GT_ArrayList<Object>(false, 1); @@ -21,7 +24,7 @@ public class ItemData { mBlackListed = aBlackListed; mByProducts = aPrefix.mSecondaryMaterial == null || aPrefix.mSecondaryMaterial.mMaterial == null ? EMPTY_MATERIALSTACK_ARRAY - : new MaterialStack[] {aPrefix.mSecondaryMaterial.clone()}; + : new MaterialStack[] { aPrefix.mSecondaryMaterial.clone() }; } public ItemData(OrePrefixes aPrefix, Materials aMaterial) { @@ -35,12 +38,11 @@ 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) - tByProducts[j++] = aByProducts[i].clone(); + for (int i = 0; i < aByProducts.length; i++) if (aByProducts[i] != null && aByProducts[i].mMaterial != null) + tByProducts[j++] = aByProducts[i].clone(); mByProducts = j > 0 ? new MaterialStack[j] : EMPTY_MATERIALSTACK_ARRAY; for (int i = 0; i < mByProducts.length; i++) mByProducts[i] = tByProducts[i]; } @@ -60,25 +62,23 @@ public class ItemData { ArrayList<MaterialStack> aList = new ArrayList<MaterialStack>(), rList = new ArrayList<MaterialStack>(); - for (ItemData tData : aData) - if (tData != null) { - if (tData.hasValidMaterialData() && tData.mMaterial.mAmount > 0) aList.add(tData.mMaterial.clone()); - for (MaterialStack tMaterial : tData.mByProducts) - if (tMaterial.mAmount > 0) aList.add(tMaterial.clone()); - } + for (ItemData tData : aData) if (tData != null) { + if (tData.hasValidMaterialData() && tData.mMaterial.mAmount > 0) aList.add(tData.mMaterial.clone()); + for (MaterialStack tMaterial : tData.mByProducts) if (tMaterial.mAmount > 0) aList.add(tMaterial.clone()); + } for (MaterialStack aMaterial : aList) { boolean temp = true; - for (MaterialStack tMaterial : rList) - if (aMaterial.mMaterial == tMaterial.mMaterial) { - tMaterial.mAmount += aMaterial.mAmount; - temp = false; - break; - } + for (MaterialStack tMaterial : rList) if (aMaterial.mMaterial == tMaterial.mMaterial) { + tMaterial.mAmount += aMaterial.mAmount; + temp = false; + break; + } if (temp) rList.add(aMaterial.clone()); } Collections.sort(rList, new Comparator<MaterialStack>() { + @Override public int compare(MaterialStack a, MaterialStack b) { return a.mAmount == b.mAmount ? 0 : a.mAmount > b.mAmount ? -1 : +1; diff --git a/src/main/java/gregtech/api/objects/MaterialStack.java b/src/main/java/gregtech/api/objects/MaterialStack.java index 21fee36b17..c2ce2f951a 100644 --- a/src/main/java/gregtech/api/objects/MaterialStack.java +++ b/src/main/java/gregtech/api/objects/MaterialStack.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Materials; import gregtech.api.util.GT_Utility; public class MaterialStack implements Cloneable { + public long mAmount; public Materials mMaterial; @@ -30,11 +31,9 @@ public class MaterialStack implements Cloneable { if (aObject == this) return true; 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); + if (aObject instanceof MaterialStack) return ((MaterialStack) aObject).mMaterial == mMaterial + && (mAmount < 0 || ((MaterialStack) aObject).mAmount < 0 + || ((MaterialStack) aObject).mAmount == mAmount); return false; } diff --git a/src/main/java/gregtech/api/objects/ObjMap.java b/src/main/java/gregtech/api/objects/ObjMap.java index 0a3b3a8fbe..05205b92c4 100644 --- a/src/main/java/gregtech/api/objects/ObjMap.java +++ b/src/main/java/gregtech/api/objects/ObjMap.java @@ -6,6 +6,7 @@ import java.util.Arrays; * Object-2-object map based on IntIntMap4a */ public class ObjMap<K, V> { + private static final Object FREE_KEY = new Object(); private static final Object REMOVED_KEY = new Object(); @@ -51,7 +52,7 @@ public class ObjMap<K, V> { 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]; + return (V) m_data[ptr + 1]; while (true) { ptr = (ptr + 2) & m_mask2; // that's next index k = m_data[ptr]; @@ -72,7 +73,7 @@ public class ObjMap<K, V> { 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; + else++m_size; return null; } else if (k.equals(key)) // we check FREE and REMOVED prior to this call { @@ -92,7 +93,7 @@ public class ObjMap<K, V> { 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; + else++m_size; return null; } else if (k.equals(key)) { final Object ret = m_data[ptr + 1]; @@ -192,9 +193,11 @@ public class ObjMap<K, V> { /** Taken from FastUtil implementation */ - /** Return the least power of two greater than or equal to the specified value. + /** + * 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. + * <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. @@ -210,18 +213,19 @@ public class ObjMap<K, V> { 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>. + /** + * 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. + * @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 + ")"); + if (s > (1 << 30)) throw new IllegalArgumentException( + "Too large (" + expected + " expected elements with load factor " + f + ")"); return (int) s; } diff --git a/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java b/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java index 60a5c13d74..5dd14186e1 100644 --- a/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java +++ b/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java @@ -2,16 +2,19 @@ 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 java.util.Collections; import java.util.LinkedList; import java.util.Optional; import java.util.Queue; + import net.minecraft.item.ItemStack; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler; + public class ReverseShapedRecipe { + private static Queue<ReverseShapedRecipe> reverseRecipes = new LinkedList<>(); private ItemStack aResult; private Object[] aRecipe; @@ -32,8 +35,8 @@ public class ReverseShapedRecipe { 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 6593dc60d8..656f7728c5 100644 --- a/src/main/java/gregtech/api/objects/ReverseShapelessRecipe.java +++ b/src/main/java/gregtech/api/objects/ReverseShapelessRecipe.java @@ -2,16 +2,19 @@ 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 java.util.Collections; import java.util.LinkedList; import java.util.Optional; import java.util.Queue; + import net.minecraft.item.ItemStack; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler; + public class ReverseShapelessRecipe { + private static Queue<ReverseShapelessRecipe> reverseRecipes = new LinkedList<>(); private ItemStack aResult; private Object[] aRecipe; @@ -32,8 +35,8 @@ public class ReverseShapelessRecipe { 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 b5ed4a00b4..cd4f0e6bb4 100644 --- a/src/main/java/gregtech/api/objects/XSTR.java +++ b/src/main/java/gregtech/api/objects/XSTR.java @@ -1,36 +1,28 @@ package gregtech.api.objects; + /** - * A subclass of java.util.random that implements the Xorshift random number - * generator + * A subclass of java.util.random that implements the Xorshift random number generator * - * - it is 30% faster than the generator from Java's library - it produces - * random sequences of higher quality than java.util.Random - this class also - * provides a clone() function + * - it is 30% faster than the generator from Java's library - it produces random sequences of higher quality than + * java.util.Random - this class also provides a clone() function * - * Usage: XSRandom rand = new XSRandom(); //Instantiation x = rand.nextInt(); - * //pull a random number + * Usage: XSRandom rand = new XSRandom(); //Instantiation x = rand.nextInt(); //pull a random number * - * To use the class in legacy code, you may also instantiate an XSRandom object - * and assign it to a java.util.Random object: java.util.Random rand = new - * XSRandom(); + * To use the class in legacy code, you may also instantiate an XSRandom object and assign it to a java.util.Random + * object: java.util.Random rand = new XSRandom(); * - * for an explanation of the algorithm, see - * http://demesos.blogspot.com/2011/09/pseudo-random-number-generators.html + * for an explanation of the algorithm, see http://demesos.blogspot.com/2011/09/pseudo-random-number-generators.html * - * @author Wilfried Elmenreich University of Klagenfurt/Lakeside Labs - * http://www.elmenreich.tk + * @author Wilfried Elmenreich University of Klagenfurt/Lakeside Labs http://www.elmenreich.tk * - * This code is released under the GNU Lesser General Public License Version 3 - * http://www.gnu.org/licenses/lgpl-3.0.txt + * 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; /** - * XSTR - Xorshift ThermiteRandom - * Modified by Bogdan-G - * 03.06.2016 - * version 0.0.4 + * XSTR - Xorshift ThermiteRandom Modified by Bogdan-G 03.06.2016 version 0.0.4 */ public class XSTR extends Random { @@ -40,10 +32,11 @@ 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 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() { + @Override public synchronized void setSeed(long seed) { if (!Thread.currentThread().getStackTrace()[2].getClassName().equals(Random.class.getName())) @@ -52,12 +45,10 @@ public class XSTR extends Random { }; /* - 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 + * Creates a new pseudo random number generator. The seed is initialized to the current time, as if by * <code>setSeed(System.currentTimeMillis());</code>. */ public XSTR() { @@ -67,7 +58,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)) { @@ -77,8 +68,8 @@ public class XSTR extends Random { } /** - * Creates a new pseudo random number generator, starting with the specified - * seed, using <code>setSeed(seed);</code>. + * Creates a new pseudo random number generator, starting with the specified seed, using + * <code>setSeed(seed);</code>. * * @param seed the initial seed */ @@ -95,6 +86,7 @@ public class XSTR extends Random { public double nextDouble() { return (((long) (next(26)) << 27) + next(27)) * DOUBLE_UNIT; } + /** * Returns the current state of the seed, can be used to clone the object * @@ -105,9 +97,8 @@ public class XSTR extends Random { } /** - * Sets the seed for this pseudo random number generator. As described - * above, two instances of the same random class, starting with the same - * seed, produce the same results, if the same methods are called. + * Sets the seed for this pseudo random number generator. As described above, two instances of the same random + * class, starting with the same seed, produce the same results, if the same methods are called. * * @param seed the new seed */ @@ -125,9 +116,8 @@ public class XSTR extends Random { } /** - * Implementation of George Marsaglia's elegant Xorshift random generator - * 30% faster and better quality than the built-in java.util.random see also - * see http://www.javamex.com/tutorials/random_numbers/xorshift.shtml + * Implementation of George Marsaglia's elegant Xorshift random generator 30% faster and better quality than the + * built-in java.util.random see also see http://www.javamex.com/tutorials/random_numbers/xorshift.shtml * * @param nbits * @return @@ -165,16 +155,16 @@ public class XSTR extends Random { return v1 * multiplier; } } + /** - * Returns a pseudorandom, uniformly distributed {@code int} value between 0 - * (inclusive) and the specified value (exclusive), drawn from this random - * number generator's sequence. The general contract of {@code nextInt} is - * that one {@code int} value in the specified range is pseudorandomly - * generated and returned. All {@code bound} possible {@code int} values are - * produced with (approximately) equal probability. The method - * {@code nextInt(int bound)} is implemented by class {@code Random} as if - * by: - * <pre> {@code + * Returns a pseudorandom, uniformly distributed {@code int} value between 0 (inclusive) and the specified value + * (exclusive), drawn from this random number generator's sequence. The general contract of {@code nextInt} is that + * one {@code int} value in the specified range is pseudorandomly generated and returned. All {@code bound} possible + * {@code int} values are produced with (approximately) equal probability. The method {@code nextInt(int bound)} is + * implemented by class {@code Random} as if by: + * + * <pre> + * {@code * public int nextInt(int bound) { * if (bound <= 0) * throw new IllegalArgumentException("bound must be positive"); @@ -188,35 +178,29 @@ public class XSTR extends Random { * val = bits % bound; * } while (bits - val + (bound-1) < 0); * return val; - * }}</pre> + * }} + * </pre> * - * <p>The hedge "approx - * imately" is used in the foregoing description only because the next - * method is only approximately an unbiased source of independently chosen - * bits. If it were a perfect source of randomly chosen bits, then the - * algorithm shown would choose {@code int} values from the stated range - * with perfect uniformity. * <p> - * The algorithm is slightly tricky. It rejects values that would result in - * an uneven distribution (due to the fact that 2^31 is not divisible by n). - * The probability of a value being rejected depends on n. The worst case is - * n=2^30+1, for which the probability of a reject is 1/2, and the expected - * number of iterations before the loop terminates is 2. + * The hedge "approx imately" is used in the foregoing description only because the next method is only + * approximately an unbiased source of independently chosen bits. If it were a perfect source of randomly chosen + * bits, then the algorithm shown would choose {@code int} values from the stated range with perfect uniformity. + * <p> + * The algorithm is slightly tricky. It rejects values that would result in an uneven distribution (due to the fact + * that 2^31 is not divisible by n). The probability of a value being rejected depends on n. The worst case is + * n=2^30+1, for which the probability of a reject is 1/2, and the expected number of iterations before the loop + * terminates is 2. * <p> - * The algorithm treats the case where n is a power of two specially: it - * returns the correct number of high-order bits from the underlying - * pseudo-random number generator. In the absence of special treatment, the - * correct number of <i>low-order</i> bits would be returned. Linear - * congruential pseudo-random number generators such as the one implemented - * by this class are known to have short periods in the sequence of values - * of their low-order bits. Thus, this special case greatly increases the - * length of the sequence of values returned by successive calls to this - * method if n is a small power of two. + * The algorithm treats the case where n is a power of two specially: it returns the correct number of high-order + * bits from the underlying pseudo-random number generator. In the absence of special treatment, the correct number + * of <i>low-order</i> bits would be returned. Linear congruential pseudo-random number generators such as the one + * implemented by this class are known to have short periods in the sequence of values of their low-order bits. + * Thus, this special case greatly increases the length of the sequence of values returned by successive calls to + * this method if n is a small power of two. * * @param bound the upper bound (exclusive). Must be positive. - * @return the next pseudorandom, uniformly distributed {@code int} value - * between zero (inclusive) and {@code bound} (exclusive) from this random - * number generator's sequence + * @return the next pseudorandom, uniformly distributed {@code int} value between zero (inclusive) and {@code bound} + * (exclusive) from this random number generator's sequence * @throws IllegalArgumentException if bound is not positive * @since 1.2 */ @@ -226,18 +210,10 @@ public class XSTR extends Random { // throw new RuntimeException("BadBound"); // } - /*int r = next(31); - int m = bound - 1; - if ((bound & m) == 0) // i.e., bound is a power of 2 - { - r = (int) ((bound * (long) r) >> 31); - } else { - for (int u = r; - u - (r = u % bound) + m < 0; - u = next(31)) - ; - } - return r;*/ + /* + * int r = next(31); int m = bound - 1; if ((bound & m) == 0) // i.e., bound is a power of 2 { r = (int) ((bound + * * (long) r) >> 31); } else { for (int u = r; u - (r = u % bound) + m < 0; u = next(31)) ; } return r; + */ // speedup, new nextInt ~+40% last = seed ^ (seed << 21); last ^= (last >>> 35); @@ -265,9 +241,9 @@ public class XSTR extends Random { @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 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; } } diff --git a/src/main/java/gregtech/api/objects/iterators/MergedIterator.java b/src/main/java/gregtech/api/objects/iterators/MergedIterator.java index 77fac8d22f..961c98e81a 100644 --- a/src/main/java/gregtech/api/objects/iterators/MergedIterator.java +++ b/src/main/java/gregtech/api/objects/iterators/MergedIterator.java @@ -3,6 +3,7 @@ package gregtech.api.objects.iterators; import java.util.Iterator; public class MergedIterator<T> implements Iterator<T> { + private final Iterator<T>[] inners; private int current; diff --git a/src/main/java/gregtech/api/render/TextureFactory.java b/src/main/java/gregtech/api/render/TextureFactory.java index 4ff1a05707..1cc5b51717 100644 --- a/src/main/java/gregtech/api/render/TextureFactory.java +++ b/src/main/java/gregtech/api/render/TextureFactory.java @@ -1,28 +1,42 @@ package gregtech.api.render; +import net.minecraft.block.Block; +import net.minecraftforge.common.util.ForgeDirection; + import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.ITextureBuilder; import gregtech.common.render.GT_TextureBuilder; -import net.minecraft.block.Block; -import net.minecraftforge.common.util.ForgeDirection; /** - * <p>This class contains a collection of static factory methods to access the New Texture API.</p> - * <p>The {@link #of} methods directly returns ready-to-use instances of {@link ITexture} implementations.</p> - * <p>To get more specific implementations of {@link ITexture} instances, use the {@link #builder()} method.</p> - * <p>Example of the {@link #builder()}:</p> - * <pre>{@code + * <p> + * This class contains a collection of static factory methods to access the New Texture API. + * </p> + * <p> + * The {@link #of} methods directly returns ready-to-use instances of {@link ITexture} implementations. + * </p> + * <p> + * To get more specific implementations of {@link ITexture} instances, use the {@link #builder()} method. + * </p> + * <p> + * Example of the {@link #builder()}: + * </p> + * + * <pre> + * {@code * // Texture that glows in the dark * TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).glow().build()); * * // Texture with same bottom flipped orientation as vanilla * TextureFactory.builder().addIcon(GRANITE_RED_STONE).stdOrient().build(); - * }</pre> + * } + * </pre> + * * See: the {@link ITextureBuilder} interface */ @SuppressWarnings("unused") public final class TextureFactory { + private TextureFactory() { throw new AssertionError("Non-instantiable class"); } @@ -49,19 +63,9 @@ 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(); } /** @@ -73,13 +77,9 @@ 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(); } /** @@ -91,11 +91,7 @@ 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) { @@ -107,8 +103,7 @@ public final class TextureFactory { } /** - * Copied-Block {@link ITexture} factory - * that will render a texture copied from the side of a {@link Block}. + * Copied-Block {@link ITexture} factory that will render a texture copied from the side of a {@link Block}. * * @param block The {@link Block} that will provide the texture * @param meta The meta value for the Block @@ -117,11 +112,7 @@ 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 3a2406dfde..ee555c2492 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 @@ -2,17 +2,19 @@ package gregtech.api.threads; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import gregtech.GT_Mod; import gregtech.api.interfaces.tileentity.IMachineBlockUpdateable; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; import gregtech.common.GT_Proxy; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class GT_Runnable_Cable_Update extends GT_Runnable_MachineBlockUpdate { + protected GT_Runnable_Cable_Update(World aWorld, ChunkCoordinates aCoords) { super(aWorld, aCoords); } @@ -60,15 +62,20 @@ public class GT_Runnable_Cable_Update extends GT_Runnable_MachineBlockUpdate { tCoords = new ChunkCoordinates( aCoords.posX + offset.offsetX, aCoords.posY + offset.offsetY, - aCoords.posZ + offset.offsetZ))) tQueue.add(tCoords); + 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 + "}", + "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 5e2cc08475..06553730da 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java @@ -1,9 +1,5 @@ package gregtech.api.threads; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.tileentity.IMachineBlockUpdateable; -import gregtech.common.GT_Proxy; import java.util.HashSet; import java.util.LinkedList; import java.util.Queue; @@ -12,11 +8,18 @@ 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; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.tileentity.IMachineBlockUpdateable; +import gregtech.common.GT_Proxy; + public class GT_Runnable_MachineBlockUpdate implements Runnable { + // used by runner thread protected final ChunkCoordinates mCoords; protected final World world; @@ -73,8 +76,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() { @@ -116,7 +119,7 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { // 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. + // ConcurrentModificationException. So, lock that shit. GT_Proxy.TICK_LOCK.lock(); try { tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); @@ -157,8 +160,12 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { } } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error( - "Well this update was broken... " + mCoords + ", mWorld={" + world.getProviderName() + " @dimId " - + world.provider.dimensionId + "}", + "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 99aa638f87..9d6de7df83 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java @@ -1,25 +1,20 @@ package gregtech.api.threads; -import gregtech.api.util.GT_PlayedSound; -import gregtech.api.util.GT_Utility; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import gregtech.api.util.GT_PlayedSound; +import gregtech.api.util.GT_Utility; + public class GT_Runnable_Sound implements Runnable { + private final int mX, mY, mZ, mTimeUntilNextSound; private final World mWorld; 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; @@ -34,15 +29,8 @@ 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) { + public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, String aSoundName, + float aSoundStrength, float aSoundModulation) { this( aWorld, aX, diff --git a/src/main/java/gregtech/api/util/ColorsMetadataSection.java b/src/main/java/gregtech/api/util/ColorsMetadataSection.java index c7ec2c8aa3..d8ce59f42c 100644 --- a/src/main/java/gregtech/api/util/ColorsMetadataSection.java +++ b/src/main/java/gregtech/api/util/ColorsMetadataSection.java @@ -1,21 +1,24 @@ package gregtech.api.util; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.HashMap; import java.util.Map; + import net.minecraft.client.resources.data.IMetadataSection; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class ColorsMetadataSection implements IMetadataSection { + private final Map<String, Integer> textColors; private final Map<String, String> hexTextColors; private final Map<String, Integer> guiTints; 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); diff --git a/src/main/java/gregtech/api/util/ColorsMetadataSectionSerializer.java b/src/main/java/gregtech/api/util/ColorsMetadataSectionSerializer.java index b58c00db88..cab41e0d3b 100644 --- a/src/main/java/gregtech/api/util/ColorsMetadataSectionSerializer.java +++ b/src/main/java/gregtech/api/util/ColorsMetadataSectionSerializer.java @@ -1,25 +1,29 @@ package gregtech.api.util; +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; + import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + 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.Dyes; -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<>(); @@ -39,8 +43,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())); diff --git a/src/main/java/gregtech/api/util/GT_ApiaryModifier.java b/src/main/java/gregtech/api/util/GT_ApiaryModifier.java index eee97a4458..bb5c760556 100644 --- a/src/main/java/gregtech/api/util/GT_ApiaryModifier.java +++ b/src/main/java/gregtech/api/util/GT_ApiaryModifier.java @@ -3,6 +3,7 @@ package gregtech.api.util; import net.minecraft.world.biome.BiomeGenBase; public class GT_ApiaryModifier { + public float territory = 1f; public float mutation = 1f; public float lifespan = 1f; diff --git a/src/main/java/gregtech/api/util/GT_ApiaryUpgrade.java b/src/main/java/gregtech/api/util/GT_ApiaryUpgrade.java index d4b00d99b2..b54697fdfc 100644 --- a/src/main/java/gregtech/api/util/GT_ApiaryUpgrade.java +++ b/src/main/java/gregtech/api/util/GT_ApiaryUpgrade.java @@ -1,14 +1,17 @@ package gregtech.api.util; -import gregtech.api.enums.OrePrefixes; -import gregtech.common.items.GT_MetaGenerated_Item_03; import java.util.*; import java.util.function.BiConsumer; import java.util.function.Consumer; + import net.minecraft.item.ItemStack; import net.minecraft.world.biome.BiomeGenBase; +import gregtech.api.enums.OrePrefixes; +import gregtech.common.items.GT_MetaGenerated_Item_03; + public enum GT_ApiaryUpgrade { + speed1(UNIQUE_INDEX.SPEED_UPGRADE, 32200, 1, (mods, n) -> mods.maxSpeed = 1), speed2(UNIQUE_INDEX.SPEED_UPGRADE, 32201, 1, (mods, n) -> mods.maxSpeed = 2), speed3(UNIQUE_INDEX.SPEED_UPGRADE, 32202, 1, (mods, n) -> mods.maxSpeed = 3), @@ -105,10 +108,10 @@ public enum GT_ApiaryUpgrade { sieve(UNIQUE_INDEX.SIEVE_UPGRADE, 32229, 1, (mods, n) -> { mods.isCollectingPollen = true; mods.energy *= 1.05f; - }), - ; + }),; private enum UNIQUE_INDEX { + SPEED_UPGRADE, PRODUCTION_UPGRADE, PLAINS_UPGRADE, @@ -130,16 +133,15 @@ public enum GT_ApiaryUpgrade { OCEAN_UPGRADE, SKY_UPGRADE, HEATER_UPGRADE, - SIEVE_UPGRADE, - ; + SIEVE_UPGRADE,; 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; @@ -150,8 +152,8 @@ public enum GT_ApiaryUpgrade { private final HashSet<GT_Utility.ItemId> blacklistedUpgrades = new HashSet<>(); - GT_ApiaryUpgrade( - UNIQUE_INDEX unique_index, int meta, int maxnumber, BiConsumer<GT_ApiaryModifier, Integer> applier) { + GT_ApiaryUpgrade(UNIQUE_INDEX unique_index, int meta, int maxnumber, + BiConsumer<GT_ApiaryModifier, Integer> applier) { this.unique_index = unique_index; this.meta = meta; this.maxnumber = maxnumber; @@ -162,11 +164,10 @@ public enum GT_ApiaryUpgrade { 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); diff --git a/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java b/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java index f20a78d494..218e5bffdc 100644 --- a/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java +++ b/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java @@ -2,17 +2,14 @@ package gregtech.api.util; import static gregtech.GT_Mod.GT_FML_LOGGER; -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,21 +17,26 @@ import net.minecraft.nbt.NBTTagString; import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fluids.FluidStack; +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; + 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>(); + 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>(); + 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? */ @@ -55,6 +57,7 @@ public class GT_AssemblyLineUtils { /** * 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. */ @@ -64,8 +67,10 @@ public class GT_AssemblyLineUtils { /** * 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? + * + * @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 @@ -131,8 +136,7 @@ public class GT_AssemblyLineUtils { GT_FML_LOGGER.info("Fluid " + i + " " + tLoaded.getUnlocalizedName()); } } - if (!aTag.hasKey("output") - || !aTag.hasKey("time") + if (!aTag.hasKey("output") || !aTag.hasKey("time") || aTag.getInteger("time") <= 0 || !aTag.hasKey("eu") || !GT_Utility.isStackValid(aOutput)) { @@ -147,14 +151,15 @@ public class GT_AssemblyLineUtils { // 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)); + 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) { @@ -186,13 +191,13 @@ public class GT_AssemblyLineUtils { } private static boolean areStacksEqual(ItemStack[] lhs, List<ItemStack> rhs) { - return lhs == null - ? rhs.isEmpty() + 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. */ @@ -273,8 +278,7 @@ public class GT_AssemblyLineUtils { * @return Does this Data Stick have a valid output ItemStack? */ public static boolean doesDataStickHaveOutput(ItemStack aDataStick) { - if (isItemDataStick(aDataStick) - && aDataStick.hasTagCompound() + if (isItemDataStick(aDataStick) && aDataStick.hasTagCompound() && aDataStick.getTagCompound().hasKey("output")) { return true; } @@ -306,8 +310,7 @@ public class GT_AssemblyLineUtils { 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")) { + if (aNBT.hasKey("Data.Recipe.Hash") && !aNBT.getString("Data.Recipe.Hash").equals("Hash.0")) { return true; } } @@ -316,6 +319,7 @@ public class GT_AssemblyLineUtils { /** * Get the Output ItemStack from a Data Stick. + * * @param aDataStick - The Data Stick to check. * @return Output ItemStack contained on the Data Stick. */ @@ -329,9 +333,11 @@ public class GT_AssemblyLineUtils { /** * @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. + * @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()) { @@ -346,7 +352,7 @@ public class GT_AssemblyLineUtils { /** * - * @param aDataStick - The Data Stick to update. + * @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? */ @@ -379,8 +385,12 @@ public class GT_AssemblyLineUtils { 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); + GT_FML_LOGGER.info( + "Updating data stick: " + aDataStick.getDisplayName() + + " | Old Recipe Hash: " + + generateRecipeHash(aOldRecipe) + + ", New Recipe Hash: " + + aHash); } String author = "Assembling Line Recipe Generator"; @@ -434,8 +444,15 @@ public class GT_AssemblyLineUtils { 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))); + 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; @@ -448,10 +465,7 @@ public class GT_AssemblyLineUtils { if (s == null) s = tStack.getDisplayName(); } - tBuilder.append(count == 0 ? "" : "\nOr ") - .append(tStack.stackSize) - .append(" ") - .append(s); + tBuilder.append(count == 0 ? "" : "\nOr ").append(tStack.stackSize).append(" ").append(s); count++; } } @@ -462,8 +476,9 @@ public class GT_AssemblyLineUtils { 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)); + tNBTList.appendTag( + new NBTTagString( + "Input Bus " + (i + 1) + ": " + aNewRecipe.mInputs[i].stackSize + " " + s)); } } for (int i = 0; i < aNewRecipe.mFluidInputs.length; i++) { @@ -473,8 +488,9 @@ public class GT_AssemblyLineUtils { 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)); + tNBTList.appendTag( + new NBTTagString( + "Input Hatch " + (i + 1) + ": " + aNewRecipe.mFluidInputs[i].amount + "L " + s)); } } tNBT.setTag("pages", tNBTList); @@ -488,6 +504,7 @@ public class GT_AssemblyLineUtils { } public enum LookupResultType { + INVALID_STICK(true), VALID_STACK_BUT_INVALID_RECIPE(true), VALID_STACK_AND_VALID_RECIPE(false), @@ -514,6 +531,7 @@ public class GT_AssemblyLineUtils { } public static class LookupResult { + private final GT_Recipe_AssemblyLine recipe; private final LookupResultType 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 15d11cda63..a455fcf916 100644 --- a/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java +++ b/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java @@ -1,30 +1,30 @@ package gregtech.api.util; -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; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.MaterialsBotania; + 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>(); + 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) { String s = new String(aEvent.getModConfigurationDirectory().getAbsolutePath()); - s = s.substring( - 0, aEvent.getModConfigurationDirectory().getAbsolutePath().length() - 6); + s = s.substring(0, aEvent.getModConfigurationDirectory().getAbsolutePath().length() - 6); s = s + "GregTech.lang"; File f = new File(s); s = ""; @@ -40,131 +40,103 @@ public class GT_Assemblyline_Server { 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); + || (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) { - } + } 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())); + 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())); + 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) { - } + } 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()))); + 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") + 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.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.wire.".length(), - entry.getKey().length() - ".01.name".length()))); + 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) { - } + } 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())); + 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())); + 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; @@ -173,168 +145,64 @@ public class GT_Assemblyline_Server { 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 - }; + 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 - }; + 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 - }; + 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 - }; + 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 - }; + 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 - }; + 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 - }; + 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 - }; + 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()); + .substring("gt.blockmetal1.".length(), entry.getKey().length() - ".name".length()); i = Integer.parseInt(t); lServerNames.put(entry.getKey(), "Block of " + mMats[i].toString()); mMats = null; @@ -345,66 +213,31 @@ public class GT_Assemblyline_Server { 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 - }; + 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 - }; + 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 - }; + 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()); + 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) { - } + } catch (Exception ignored) {} } internal = null; diff --git a/src/main/java/gregtech/api/util/GT_BaseCrop.java b/src/main/java/gregtech/api/util/GT_BaseCrop.java index 930badfdba..65d2900176 100644 --- a/src/main/java/gregtech/api/util/GT_BaseCrop.java +++ b/src/main/java/gregtech/api/util/GT_BaseCrop.java @@ -2,6 +2,16 @@ package gregtech.api.util; import static gregtech.api.enums.GT_Values.E; +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; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + +import speiger.src.crops.api.ICropCardInfo; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -14,23 +24,12 @@ 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; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import speiger.src.crops.api.ICropCardInfo; 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], + 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; @@ -49,23 +48,9 @@ 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, + 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, @@ -102,24 +87,9 @@ 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, + 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); @@ -149,10 +119,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { 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); + .invoke(Class.forName("speiger.src.crops.api.CropPluginAPI").getField("instance"), this); } catch (IllegalAccessException ex) { bIc2NeiLoaded = false; } catch (IllegalArgumentException ex) { @@ -267,12 +234,13 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { 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; @@ -282,33 +250,32 @@ 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")) + if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore")) && (tAssotiation.mMaterial.mMaterial == mBlock)) { return true; } - if ((tAssotiation != null) - && (tAssotiation.mPrefix == OrePrefixes.block) + 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, + // 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, + // 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 - + // 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;} - // } + // if(mMeta < 0 || tMeta == mMeta){ + // return true;} + // } } return false; } @@ -317,8 +284,11 @@ 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; diff --git a/src/main/java/gregtech/api/util/GT_BlockMap.java b/src/main/java/gregtech/api/util/GT_BlockMap.java index 9b71abbdc3..40e11e41a0 100644 --- a/src/main/java/gregtech/api/util/GT_BlockMap.java +++ b/src/main/java/gregtech/api/util/GT_BlockMap.java @@ -1,13 +1,16 @@ package gregtech.api.util; -import gnu.trove.map.TByteObjectMap; -import gnu.trove.map.hash.TByteObjectHashMap; import java.util.HashMap; import java.util.Map; import java.util.function.BiFunction; + import net.minecraft.block.Block; +import gnu.trove.map.TByteObjectMap; +import gnu.trove.map.hash.TByteObjectHashMap; + public class GT_BlockMap<V> { + public static final byte WILDCARD = -1; private final Map<Block, TByteObjectMap<V>> backing = new HashMap<>(); private int size = 0; diff --git a/src/main/java/gregtech/api/util/GT_BlockSet.java b/src/main/java/gregtech/api/util/GT_BlockSet.java index 94f3c3944a..1d13afd056 100644 --- a/src/main/java/gregtech/api/util/GT_BlockSet.java +++ b/src/main/java/gregtech/api/util/GT_BlockSet.java @@ -3,6 +3,7 @@ package gregtech.api.util; import net.minecraft.block.Block; public class GT_BlockSet { + private final GT_BlockMap<Object> backing = new GT_BlockMap<>(); public boolean add(Block block, byte meta) { 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 fd01ccd00e..7e3b7c424c 100644 --- a/src/main/java/gregtech/api/util/GT_CLS_Compat.java +++ b/src/main/java/gregtech/api/util/GT_CLS_Compat.java @@ -1,10 +1,5 @@ package gregtech.api.util; -import cpw.mods.fml.common.ProgressManager; -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; @@ -14,6 +9,12 @@ import java.util.Set; import java.util.function.Consumer; import java.util.function.Function; +import cpw.mods.fml.common.ProgressManager; +import gregtech.GT_Mod; +import gregtech.api.enums.Materials; +import gregtech.common.GT_Proxy; +import gregtech.loaders.postload.GT_PostLoad; + @SuppressWarnings("rawtypes, unchecked, deprecation") public class GT_CLS_Compat { @@ -71,12 +72,8 @@ public class 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; @@ -109,8 +106,7 @@ public class GT_CLS_Compat { } action.accept(m); currentStep += 1; - } - ; + } ; GT_Mod.GT_FML_LOGGER.info(String.format("%s - Baking: Done", materialsType)); try { progressBarStep.set(progressBar, currentStep); @@ -119,23 +115,25 @@ 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)); + "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) { diff --git a/src/main/java/gregtech/api/util/GT_ChunkAssociatedData.java b/src/main/java/gregtech/api/util/GT_ChunkAssociatedData.java index ac04ecfd46..ea1ac73621 100644 --- a/src/main/java/gregtech/api/util/GT_ChunkAssociatedData.java +++ b/src/main/java/gregtech/api/util/GT_ChunkAssociatedData.java @@ -1,8 +1,5 @@ package gregtech.api.util; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import java.io.DataInput; import java.io.DataInputStream; import java.io.DataOutput; @@ -30,19 +27,26 @@ 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; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + /** * A utility to save all kinds of data that is a function of any chunk. * <p> - * GregTech takes care of saving and loading the data from disk, and an efficient mechanism to locate it. - * Subclass only need to define the exact scheme of each element data (by overriding the three protected abstract method) + * GregTech takes care of saving and loading the data from disk, and an efficient mechanism to locate it. Subclass only + * need to define the exact scheme of each element data (by overriding the three protected abstract method) * <p> * Oh, there is no limit on how large your data is, though you'd not have the familiar NBT interface, but DataOutput * should be reasonably common anyway. @@ -58,9 +62,10 @@ import org.apache.commons.io.FileUtils; */ @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 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"); @@ -75,9 +80,8 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID 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. + * 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<>(); @@ -85,12 +89,14 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID * 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. + * @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) { + 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"); @@ -109,8 +115,7 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID } /** - * Get a reference to data of the chunk that tile entity is in. - * The returned reference should be mutable. + * 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); @@ -125,15 +130,13 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID } public final T get(World world, int chunkX, int chunkZ) { - SuperRegion region = masterMap - .computeIfAbsent(world.provider.dimensionId, ignored -> new ConcurrentHashMap<>()) + 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<>()) + 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); } @@ -150,13 +153,11 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID 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!"); + 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(); } @@ -171,11 +172,8 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID } 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 -> { + 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) { @@ -208,26 +206,26 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID } /** - * 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. + * 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 (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 (Stream<Path> stream = Files.list(getSaveDirectory(w).toPath())) { Map<ChunkCoordIntPair, SuperRegion> worldData = stream.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( + 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 -> { @@ -238,9 +236,7 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID e.printStackTrace(GT_Log.err); return null; } - }) - .filter(Objects::nonNull) - .collect(Collectors.toMap(SuperRegion::getCoord, Function.identity())); + }).filter(Objects::nonNull).collect(Collectors.toMap(SuperRegion::getCoord, Function.identity())); masterMap.put(w.provider.dimensionId, worldData); } catch (IOException | UncheckedIOException e) { GT_Log.err.println("Error loading all region"); @@ -256,6 +252,7 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID } public interface IData { + /** * @return Whether the data is different from chunk default */ @@ -263,6 +260,7 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID } protected final class SuperRegion { + private final T[] data = createData(); private final File backingStorage; private final WeakReference<World> world; @@ -348,7 +346,7 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID } private void save0() throws IOException { - //noinspection ResultOfMethodCallIgnored + // noinspection ResultOfMethodCallIgnored backingStorage.getParentFile().mkdirs(); File tmpFile = getTmpFile(); World world = Objects.requireNonNull(this.world.get(), "Attempting to save region of another world!"); @@ -445,6 +443,7 @@ public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.ID } public static class EventHandler { + private EventHandler() { MinecraftForge.EVENT_BUS.register(this); } diff --git a/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java b/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java index 2813df0973..809c66d5d0 100644 --- a/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java +++ b/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java @@ -10,19 +10,20 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; /** * Redstone Circuit Control Code * <p/> - * This should make everything possible what a Redstone Computer or BuildCraft Gate could do. - * It is intended to use this similar to BC-Gates (for acquiring Data) and RP Logic Gates. - * You could write an extremely specified and complex Logic Gate, which works only for you Setup, like - * with ComputerCraft, but you would have to write an extra Mod to add that, as it doesn't work Ingame. + * This should make everything possible what a Redstone Computer or BuildCraft Gate could do. It is intended to use this + * similar to BC-Gates (for acquiring Data) and RP Logic Gates. You could write an extremely specified and complex Logic + * Gate, which works only for you Setup, like with ComputerCraft, but you would have to write an extra Mod to add that, + * as it doesn't work Ingame. * <p/> - * One can make use of the fact, that ItemStacks can be stored as Integer, so that you can scan - * Inventories for specific Items using that. Luckily the Buttons in the GUI enable Copy/Paste of - * ItemID+MetaData to Integer, including the WildCard Damage Value when you use rightclick to place it. - * You just need to use @GT_Utility.stackToInt(ItemStack aStack) to get it. + * One can make use of the fact, that ItemStacks can be stored as Integer, so that you can scan Inventories for specific + * Items using that. Luckily the Buttons in the GUI enable Copy/Paste of ItemID+MetaData to Integer, including the + * WildCard Damage Value when you use rightclick to place it. You just need to use @GT_Utility.stackToInt(ItemStack + * aStack) to get it. * <p/> * All Functions run usually in a seperate try/catch Block, so that failed Logic won't crash the TileEntity. */ public abstract class GT_CircuitryBehavior { + /** * @param aIndex 0 - 1023 are my own Indices, so use other Numbers! */ @@ -36,13 +37,11 @@ public abstract class GT_CircuitryBehavior { public static boolean getAnyRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) { for (byte side : ALL_VALID_SIDES) { if (side != aRedstoneCircuitBlock.getOutputFacing() - && aRedstoneCircuitBlock - .getCover(side) - .letsRedstoneGoIn( - side, - aRedstoneCircuitBlock.getCoverID(side), - aRedstoneCircuitBlock.getCoverVariable(side), - aRedstoneCircuitBlock.getOwnTileEntity())) { + && aRedstoneCircuitBlock.getCover(side).letsRedstoneGoIn( + side, + aRedstoneCircuitBlock.getCoverID(side), + aRedstoneCircuitBlock.getCoverVariable(side), + aRedstoneCircuitBlock.getOwnTileEntity())) { if (aRedstoneCircuitBlock.getInputRedstone(side) > 0) { return true; } @@ -57,13 +56,11 @@ public abstract class GT_CircuitryBehavior { public static boolean getAllRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) { for (byte side : ALL_VALID_SIDES) { if (side != aRedstoneCircuitBlock.getOutputFacing() - && aRedstoneCircuitBlock - .getCover(side) - .letsRedstoneGoIn( - side, - aRedstoneCircuitBlock.getCoverID(side), - aRedstoneCircuitBlock.getCoverVariable(side), - aRedstoneCircuitBlock.getOwnTileEntity())) { + && aRedstoneCircuitBlock.getCover(side).letsRedstoneGoIn( + side, + aRedstoneCircuitBlock.getCoverID(side), + aRedstoneCircuitBlock.getCoverVariable(side), + aRedstoneCircuitBlock.getOwnTileEntity())) { if (aRedstoneCircuitBlock.getInputRedstone(side) == 0) { return false; } @@ -79,13 +76,11 @@ public abstract class GT_CircuitryBehavior { int tRedstoneAmount = 0; for (byte side : ALL_VALID_SIDES) { if (side != aRedstoneCircuitBlock.getOutputFacing() - && aRedstoneCircuitBlock - .getCover(side) - .letsRedstoneGoIn( - side, - aRedstoneCircuitBlock.getCoverID(side), - aRedstoneCircuitBlock.getCoverVariable(side), - aRedstoneCircuitBlock.getOwnTileEntity())) { + && aRedstoneCircuitBlock.getCover(side).letsRedstoneGoIn( + side, + aRedstoneCircuitBlock.getCoverID(side), + aRedstoneCircuitBlock.getCoverVariable(side), + aRedstoneCircuitBlock.getOwnTileEntity())) { if (aRedstoneCircuitBlock.getInputRedstone(side) > 0) { tRedstoneAmount++; } @@ -101,13 +96,11 @@ public abstract class GT_CircuitryBehavior { byte tRedstoneAmount = 0; for (byte side : ALL_VALID_SIDES) { if (side != aRedstoneCircuitBlock.getOutputFacing() - && aRedstoneCircuitBlock - .getCover(side) - .letsRedstoneGoIn( - side, - aRedstoneCircuitBlock.getCoverID(side), - aRedstoneCircuitBlock.getCoverVariable(side), - aRedstoneCircuitBlock.getOwnTileEntity())) { + && aRedstoneCircuitBlock.getCover(side).letsRedstoneGoIn( + side, + aRedstoneCircuitBlock.getCoverID(side), + aRedstoneCircuitBlock.getCoverVariable(side), + aRedstoneCircuitBlock.getOwnTileEntity())) { tRedstoneAmount = (byte) Math.max(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(side)); } } @@ -126,13 +119,11 @@ public abstract class GT_CircuitryBehavior { byte tRedstoneAmount = 15; for (byte side : ALL_VALID_SIDES) { if (side != aRedstoneCircuitBlock.getOutputFacing() - && aRedstoneCircuitBlock - .getCover(side) - .letsRedstoneGoIn( - side, - aRedstoneCircuitBlock.getCoverID(side), - aRedstoneCircuitBlock.getCoverVariable(side), - aRedstoneCircuitBlock.getOwnTileEntity())) { + && aRedstoneCircuitBlock.getCover(side).letsRedstoneGoIn( + side, + aRedstoneCircuitBlock.getCoverID(side), + aRedstoneCircuitBlock.getCoverVariable(side), + aRedstoneCircuitBlock.getOwnTileEntity())) { if (aRedstoneCircuitBlock.getInputRedstone(side) > 0) tRedstoneAmount = (byte) Math.min(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(side)); } @@ -148,13 +139,11 @@ public abstract class GT_CircuitryBehavior { byte tRedstoneAmount = 15; for (byte side : ALL_VALID_SIDES) { if (side != aRedstoneCircuitBlock.getOutputFacing() - && aRedstoneCircuitBlock - .getCover(side) - .letsRedstoneGoIn( - side, - aRedstoneCircuitBlock.getCoverID(side), - aRedstoneCircuitBlock.getCoverVariable(side), - aRedstoneCircuitBlock.getOwnTileEntity())) { + && aRedstoneCircuitBlock.getCover(side).letsRedstoneGoIn( + side, + aRedstoneCircuitBlock.getCoverID(side), + aRedstoneCircuitBlock.getCoverVariable(side), + aRedstoneCircuitBlock.getOwnTileEntity())) { tRedstoneAmount = (byte) Math.min(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(side)); } } @@ -170,8 +159,8 @@ public abstract class GT_CircuitryBehavior { public abstract void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock); /** - * Validates the Parameters of this Circuit when a value has been changed by the GUI - * Also called right after @initParameters and when the Chunk reloads + * Validates the Parameters of this Circuit when a value has been changed by the GUI Also called right + * after @initParameters and when the Chunk reloads * * @param aCircuitData, The Data Storage you can use (8 Slots and only the first 4 are User definable) * @param aRedstoneCircuitBlock, The Circuit Block MetaTileEntity itself @@ -193,8 +182,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 @@ -215,8 +204,7 @@ public abstract class GT_CircuitryBehavior { public abstract String getDataDescription(int[] aCircuitData, int aCircuitDataIndex); /** - * How the Integer should be displayed in the GUI. - * null means, that it just displays as regular Number. + * How the Integer should be displayed in the GUI. null means, that it just displays as regular Number. */ @SideOnly(Side.CLIENT) public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { diff --git a/src/main/java/gregtech/api/util/GT_ClientPreference.java b/src/main/java/gregtech/api/util/GT_ClientPreference.java index de3051fd37..34db521bd4 100644 --- a/src/main/java/gregtech/api/util/GT_ClientPreference.java +++ b/src/main/java/gregtech/api/util/GT_ClientPreference.java @@ -1,12 +1,13 @@ package gregtech.api.util; public class GT_ClientPreference { + private final boolean mSingleBlockInitialFilter; 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; @@ -14,8 +15,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 362be0fe01..337b3b7f68 100644 --- a/src/main/java/gregtech/api/util/GT_Config.java +++ b/src/main/java/gregtech/api/util/GT_Config.java @@ -2,13 +2,15 @@ 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 gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; + public class GT_Config implements Runnable { + public static boolean troll = false; public static Configuration sConfigFileIDs; @@ -30,8 +32,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; @@ -44,7 +46,7 @@ public class GT_Config implements Runnable { try { if (GT_Utility.isStringValid(rName = aStack.getUnlocalizedName())) return rName.toString(); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } String sName = aStack.getItem().toString(); String[] tmp = sName.split("@"); @@ -60,7 +62,9 @@ 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); + aCategory.toString().replaceAll("\\|", "_"), + (aName + "_" + aDefault).replaceAll("\\|", "_"), + aDefault); boolean rResult = tProperty.getBoolean(aDefault); if (!tProperty.wasRead() && shouldSave()) mConfig.save(); return rResult; @@ -73,7 +77,9 @@ 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); + aCategory.toString().replaceAll("\\|", "_"), + (aName + "_" + aDefault).replaceAll("\\|", "_"), + aDefault); int rResult = tProperty.getInt(aDefault); if (!tProperty.wasRead() && shouldSave()) mConfig.save(); return rResult; @@ -86,7 +92,9 @@ 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); + aCategory.toString().replaceAll("\\|", "_"), + (aName + "_" + aDefault).replaceAll("\\|", "_"), + aDefault); double rResult = tProperty.getDouble(aDefault); if (!tProperty.wasRead() && shouldSave()) mConfig.save(); return rResult; @@ -99,7 +107,9 @@ 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); + aCategory.toString().replaceAll("\\|", "_"), + (aName + "_" + aDefault).replaceAll("\\|", "_"), + aDefault); String rResult = tProperty.getString(); if (!tProperty.wasRead() && shouldSave()) mConfig.save(); return rResult; @@ -111,8 +121,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.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; diff --git a/src/main/java/gregtech/api/util/GT_CoverBehavior.java b/src/main/java/gregtech/api/util/GT_CoverBehavior.java index f3b8f7a9fb..f12da42700 100644 --- a/src/main/java/gregtech/api/util/GT_CoverBehavior.java +++ b/src/main/java/gregtech/api/util/GT_CoverBehavior.java @@ -2,17 +2,18 @@ package gregtech.api.util; import static gregtech.api.enums.GT_Values.E; -import gregtech.api.enums.GT_Values; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.net.GT_Packet_TileEntityCoverGUI; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; +import gregtech.api.enums.GT_Values; +import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.net.GT_Packet_TileEntityCoverGUI; + /** * For Covers with a special behavior. Has fixed storage format of 4 byte. Not very convenient... */ @@ -46,51 +47,30 @@ 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) { + 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) { + 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)); @@ -98,183 +78,150 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl } @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); } @Deprecated @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; } @@ -283,15 +230,8 @@ 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; } @@ -300,23 +240,16 @@ 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) { + public boolean onCoverShiftRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer) { if (hasCoverGUI() && aPlayer instanceof EntityPlayerMP) { lastPlayer = aPlayer; mPlayerNotified = false; @@ -325,7 +258,11 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl } else { GT_Values.NW.sendToPlayer( new GT_Packet_TileEntityCoverGUI( - aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), + aSide, + aCoverID, + aCoverVariable, + aTileEntity, + (EntityPlayerMP) aPlayer), (EntityPlayerMP) aPlayer); } return true; @@ -339,11 +276,11 @@ 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. + * 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; } @@ -422,14 +359,18 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl } /** - * If it lets Items into the Block, aSlot = -1 means if it is generally accepting Items (return false for no Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each Slot). + * If it lets Items into the Block, aSlot = -1 means if it is generally accepting Items (return false for no + * Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each + * Slot). */ public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return false; } /** - * If it lets Items out of the Block, aSlot = -1 means if it is generally accepting Items (return false for no Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each Slot). + * If it lets Items out of the Block, aSlot = -1 means if it is generally accepting Items (return false for no + * Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each + * Slot). */ public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return false; @@ -445,8 +386,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; } @@ -458,12 +399,11 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl } /** - * Called to determine the incoming Redstone Signal of a Machine. - * Returns the original Redstone per default. - * The Cover should @letsRedstoneGoIn or the aInputRedstone Parameter is always 0. + * Called to determine the incoming Redstone Signal of a Machine. 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 12505dff31..fed28825f3 100644 --- a/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java +++ b/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java @@ -2,11 +2,25 @@ package gregtech.api.util; import static gregtech.api.enums.GT_Values.E; +import java.util.function.Supplier; + +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagInt; +import net.minecraft.world.World; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.ButtonWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.gui.GT_GUIColorOverride; @@ -16,16 +30,6 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.net.GT_Packet_TileEntityCoverGUI; import gregtech.api.objects.GT_ItemStack; -import java.util.function.Supplier; -import javax.annotation.Nullable; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagInt; -import net.minecraft.world.World; -import net.minecraftforge.fluids.Fluid; /** * For Covers with a special behavior. @@ -85,20 +89,22 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { /** * Get target facade block. Does not affect rendering of **this** block. It is only used as a hint for other block * 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); } /** * Get target facade block. Does not affect rendering of **this** block. It is only used as a hint for other block * 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); } @@ -110,11 +116,12 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { } /** - * Get the special foreground 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. + * Get the special foreground 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 getSpecialCoverFGTexture( - byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final ITexture getSpecialCoverFGTexture(byte aSide, int aCoverID, ISerializableObject aCoverVariable, + ICoverable aTileEntity) { return getSpecialCoverFGTextureImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -122,42 +129,42 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * 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); } /** * Return whether cover data needs to be synced to client upon tile entity creation or cover placement. * - * 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. + * 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); } /** * Called before receiving data from network. Use {@link ICoverable#isClientSide()} to determine the side. */ - public final void preDataChanged( - byte aSide, - int aCoverID, - int aNewCoverId, - ISerializableObject aCoverVariable, - ISerializableObject aNewCoverVariable, - ICoverable aTileEntity) { + public final void preDataChanged(byte aSide, int aCoverID, int aNewCoverId, ISerializableObject aCoverVariable, + ISerializableObject aNewCoverVariable, ICoverable aTileEntity) { preDataChangedImpl( - aSide, aCoverID, aNewCoverId, forceCast(aCoverVariable), forceCast(aNewCoverVariable), aTileEntity); + aSide, + aCoverID, + aNewCoverId, + forceCast(aCoverVariable), + forceCast(aNewCoverVariable), + aTileEntity); } /** @@ -167,21 +174,16 @@ 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); } @@ -190,15 +192,8 @@ 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); } @@ -207,73 +202,64 @@ 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) { + 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); + 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); } @Deprecated - 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); } /** - * 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. + * 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); } /** - * Called upon Base TE being destroyed (once getDrops is called), - * thus getting called only when destroyed in survival. + * Called upon Base TE being destroyed (once getDrops is called), thus getting called only when destroyed in + * survival. */ - public final void onBaseTEDestroyed( - byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final void onBaseTEDestroyed(byte aSide, int aCoverID, ISerializableObject aCoverVariable, + ICoverable aTileEntity) { onBaseTEDestroyedImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * 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); } @@ -282,16 +268,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); } @@ -300,98 +286,101 @@ 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). + * 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). + * 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); } /** - * Called to determine the incoming Redstone Signal of a Machine. - * Returns the original Redstone per default. - * The Cover should @letsRedstoneGoIn or the aInputRedstone Parameter is always 0. + * Called to determine the incoming Redstone Signal of a Machine. 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); } @@ -407,16 +396,16 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { /** * 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 @@ -439,9 +428,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { } /** - * Creates {@link ModularWindow} for this cover. - * This is separated from base class, as attaching the same covers in different sides of the same tile - * needs different UI with different context. + * Creates {@link ModularWindow} for this cover. This is separated from base class, as attaching the same covers in + * different sides of the same tile needs different UI with different context. */ protected class UIFactory { @@ -481,9 +469,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { @Nullable public T getCoverData() { if (isCoverValid()) { - return forceCast(getUIBuildContext() - .getTile() - .getComplexCoverDataAtSide(getUIBuildContext().getCoverSide())); + return forceCast( + getUIBuildContext().getTile().getComplexCoverDataAtSide(getUIBuildContext().getCoverSide())); } else { return null; } @@ -491,15 +478,13 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { public boolean setCoverData(T data) { if (isCoverValid()) { - getUIBuildContext() - .getTile() - .receiveCoverData( - getUIBuildContext().getCoverSide(), - getUIBuildContext().getCoverID(), - data, - getUIBuildContext().getPlayer() instanceof EntityPlayerMP - ? (EntityPlayerMP) getUIBuildContext().getPlayer() - : null); + getUIBuildContext().getTile().receiveCoverData( + getUIBuildContext().getCoverSide(), + getUIBuildContext().getCoverID(), + data, + getUIBuildContext().getPlayer() instanceof EntityPlayerMP + ? (EntityPlayerMP) getUIBuildContext().getPlayer() + : null); return true; } else { return false; @@ -508,23 +493,15 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { public boolean isCoverValid() { return !getUIBuildContext().getTile().isDead() - && getUIBuildContext() - .getTile() - .getCoverBehaviorAtSideNew( - getUIBuildContext().getCoverSide()) + && getUIBuildContext().getTile().getCoverBehaviorAtSideNew(getUIBuildContext().getCoverSide()) != GregTech_API.sNoBehavior; } protected void addTitleToUI(ModularWindow.Builder builder) { ItemStack coverItem = GT_Utility.intToStack(getUIBuildContext().getCoverID()); if (coverItem != null) { - builder.widget(new ItemDrawable(coverItem) - .asWidget() - .setPos(5, 5) - .setSize(16, 16)) - .widget(new TextWidget(coverItem.getDisplayName()) - .setDefaultColor(COLOR_TITLE.get()) - .setPos(25, 9)); + builder.widget(new ItemDrawable(coverItem).asWidget().setPos(5, 5).setSize(16, 16)).widget( + new TextWidget(coverItem.getDisplayName()).setDefaultColor(COLOR_TITLE.get()).setPos(25, 9)); } } @@ -565,8 +542,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { return GT_Utility.intToStack(aCoverID); } - protected ITexture getSpecialCoverFGTextureImpl( - byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { + protected ITexture getSpecialCoverFGTextureImpl(byte aSide, int aCoverID, T aCoverVariable, + ICoverable aTileEntity) { return coverFGTexture; } @@ -580,23 +557,23 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { protected void onDataChangedImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) {} - protected void preDataChangedImpl( - byte aSide, int aCoverID, int aNewCoverId, T aCoverVariable, T aNewCoverVariable, ICoverable aTileEntity) {} + protected void preDataChangedImpl(byte aSide, int aCoverID, int aNewCoverId, T aCoverVariable, T aNewCoverVariable, + ICoverable aTileEntity) {} protected void onDroppedImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) {} protected void onBaseTEDestroyedImpl(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 false; } /** * 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; } @@ -605,15 +582,8 @@ 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; } @@ -622,23 +592,16 @@ 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; if (useModularUI()) { @@ -646,7 +609,11 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { } else { GT_Values.NW.sendToPlayer( new GT_Packet_TileEntityCoverGUI( - aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), + aSide, + aCoverID, + aCoverVariable, + aTileEntity, + (EntityPlayerMP) aPlayer), (EntityPlayerMP) aPlayer); } return true; @@ -655,17 +622,17 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { } @Deprecated - 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; } /** - * 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. + * 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; } @@ -732,28 +699,32 @@ 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; } /** - * If it lets Items into the Block, aSlot = -1 means if it is generally accepting Items (return false for no Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each Slot). + * If it lets Items into the Block, aSlot = -1 means if it is generally accepting Items (return false for no + * Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each + * Slot). */ protected boolean letsItemsInImpl(byte aSide, int aCoverID, T aCoverVariable, int aSlot, ICoverable aTileEntity) { return false; } /** - * If it lets Items out of the Block, aSlot = -1 means if it is generally accepting Items (return false for no Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each Slot). + * If it lets Items out of the Block, aSlot = -1 means if it is generally accepting Items (return false for no + * Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each + * Slot). */ protected boolean letsItemsOutImpl(byte aSide, int aCoverID, T aCoverVariable, int aSlot, ICoverable aTileEntity) { return false; @@ -769,8 +740,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; } @@ -782,12 +753,11 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { } /** - * Called to determine the incoming Redstone Signal of a Machine. - * Returns the original Redstone per default. - * The Cover should @letsRedstoneGoIn or the aInputRedstone Parameter is always 0. + * Called to determine the incoming Redstone Signal of a Machine. 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; } @@ -826,7 +796,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { } /** - * Checks if the Cover can be placed on this. You will probably want to call {@link #isCoverPlaceable(byte, ItemStack, ICoverable)} instead. + * Checks if the Cover can be placed on this. You will probably want to call + * {@link #isCoverPlaceable(byte, ItemStack, ICoverable)} instead. */ @Deprecated public boolean isCoverPlaceable(byte aSide, GT_ItemStack aStack, ICoverable aTileEntity) { @@ -842,8 +813,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_CreativeTab.java b/src/main/java/gregtech/api/util/GT_CreativeTab.java index ccebd9d4a9..1049f40278 100644 --- a/src/main/java/gregtech/api/util/GT_CreativeTab.java +++ b/src/main/java/gregtech/api/util/GT_CreativeTab.java @@ -1,12 +1,14 @@ package gregtech.api.util; -import gregtech.api.enums.ItemList; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import gregtech.api.enums.ItemList; + public class GT_CreativeTab extends CreativeTabs { + public GT_CreativeTab(String aName, String aLocalName) { super("GregTech." + aName); GT_LanguageManager.addStringLocalization("itemGroup.GregTech." + aName, aLocalName); diff --git a/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java b/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java index 3f57cf758b..90430c9bcb 100644 --- a/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java +++ b/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java @@ -2,14 +2,16 @@ 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 gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; + public class GT_ExoticEnergyInputHelper { + /** * The Valid Types of TecTech Hatch List. */ @@ -21,9 +23,8 @@ public class GT_ExoticEnergyInputHelper { } 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()); + 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); } @@ -35,9 +36,8 @@ public class GT_ExoticEnergyInputHelper { } 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()); + 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); } @@ -59,17 +59,15 @@ public class GT_ExoticEnergyInputHelper { public static long getTotalEuMulti(Collection<? extends GT_MetaTileEntity_Hatch> hatches) { long rEU = 0L; - for (GT_MetaTileEntity_Hatch tHatch : hatches) - if (isValidMetaTileEntity(tHatch)) - rEU += tHatch.getBaseMetaTileEntity().getInputVoltage() * tHatch.maxWorkingAmperesIn(); + for (GT_MetaTileEntity_Hatch tHatch : hatches) if (isValidMetaTileEntity(tHatch)) + rEU += tHatch.getBaseMetaTileEntity().getInputVoltage() * tHatch.maxWorkingAmperesIn(); return rEU; } 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(); + if (isValidMetaTileEntity(tHatch)) rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); return rVoltage; } @@ -79,25 +77,22 @@ public class GT_ExoticEnergyInputHelper { return rVoltage; } for (GT_MetaTileEntity_Hatch tHatch : hatches) - if (isValidMetaTileEntity(tHatch)) - rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); + if (isValidMetaTileEntity(tHatch)) rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); return rVoltage / hatches.size(); } 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(); + if (isValidMetaTileEntity(tHatch)) rAmp += tHatch.getBaseMetaTileEntity().getInputAmperage(); return rAmp; } public static long getMaxWorkingInputAmpsMulti(Collection<? extends GT_MetaTileEntity_Hatch> hatches) { long rAmp = 0; - for (GT_MetaTileEntity_Hatch tHatch : hatches) - if (isValidMetaTileEntity(tHatch)) { - rAmp += tHatch.maxWorkingAmperesIn(); - } + for (GT_MetaTileEntity_Hatch tHatch : hatches) if (isValidMetaTileEntity(tHatch)) { + rAmp += tHatch.maxWorkingAmperesIn(); + } return rAmp; } diff --git a/src/main/java/gregtech/api/util/GT_FoodStat.java b/src/main/java/gregtech/api/util/GT_FoodStat.java index f9a0f50c5f..cc1616f866 100644 --- a/src/main/java/gregtech/api/util/GT_FoodStat.java +++ b/src/main/java/gregtech/api/util/GT_FoodStat.java @@ -1,16 +1,18 @@ package gregtech.api.util; -import gregtech.api.damagesources.GT_DamageSources; -import gregtech.api.enums.SoundResource; -import gregtech.api.interfaces.IFoodStat; -import gregtech.api.items.GT_MetaBase_Item; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; +import gregtech.api.damagesources.GT_DamageSources; +import gregtech.api.enums.SoundResource; +import gregtech.api.interfaces.IFoodStat; +import gregtech.api.items.GT_MetaBase_Item; + public class GT_FoodStat implements IFoodStat { + private final int mFoodLevel; private final int[] mPotionEffects; private final float mSaturation; @@ -26,21 +28,12 @@ public class GT_FoodStat implements IFoodStat { * @param aEmptyContainer An empty Container (Optional) * @param aAlwaysEdible If this Item is always edible, like Golden Apples or Potions * @param aInvisibleParticles If the Particles of the Potion Effects are invisible - * @param aPotionEffects An Array of Potion Effects with %4==0 Elements as follows - * ID of a Potion Effect. 0 for none - * Duration of the Potion in Ticks - * 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] + * @param aPotionEffects An Array of Potion Effects with %4==0 Elements as follows ID of a Potion Effect. 0 for + * none Duration of the Potion in Ticks 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; @@ -78,13 +71,9 @@ public class GT_FoodStat implements IFoodStat { if (tStack != null && !aPlayer.inventory.addItemStackToInventory(tStack)) aPlayer.dropPlayerItemWithRandomChoice(tStack, true); - new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder() - .setIdentifier(SoundResource.RANDOM_BURP) - .setVolume(0.5F) - .setPitch(aPlayer.worldObj.rand.nextFloat() * 0.1F + 0.9F) - .setEntity(aPlayer) - .setWorld(aPlayer.worldObj) - .run(); + new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder().setIdentifier(SoundResource.RANDOM_BURP) + .setVolume(0.5F).setPitch(aPlayer.worldObj.rand.nextFloat() * 0.1F + 0.9F).setEntity(aPlayer) + .setWorld(aPlayer.worldObj).run(); if (!aPlayer.worldObj.isRemote) { if (mMilk) { @@ -92,19 +81,18 @@ 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) { - new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder() - .setSmoking(true) - .setFlaming(true) - .setStrength(4f) - .setPosition(aPlayer.posX, aPlayer.posY, aPlayer.posZ) - .setEntity(aPlayer) - .setWorld(aPlayer.worldObj) - .run(); + new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder().setSmoking(true).setFlaming(true) + .setStrength(4f).setPosition(aPlayer.posX, aPlayer.posY, aPlayer.posZ).setEntity(aPlayer) + .setWorld(aPlayer.worldObj).run(); aPlayer.attackEntityFrom(GT_DamageSources.getExplodingDamage(), Float.MAX_VALUE); } } 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 1edfd836f3..68c20f7fa1 100644 --- a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java +++ b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java @@ -1,14 +1,16 @@ package gregtech.api.util; +import java.util.Map; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import forestry.api.recipes.ICentrifugeRecipe; import forestry.api.recipes.ISqueezerRecipe; 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; public class GT_Forestry_Compat { @@ -16,10 +18,10 @@ public class GT_Forestry_Compat { 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")}, + 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)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -28,10 +30,10 @@ public class GT_Forestry_Compat { 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")}, + 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)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -40,10 +42,10 @@ public class GT_Forestry_Compat { 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")}, + 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)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -52,10 +54,10 @@ public class GT_Forestry_Compat { 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")}, + 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)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -64,10 +66,10 @@ public class GT_Forestry_Compat { 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")}, + new ItemStack[] { ItemList.FR_Butterfly.getWildcard(1L) }, + new ItemStack[] { ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly") }, null, - new FluidStack[] {Materials.Honey.getFluid(100L)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -76,10 +78,10 @@ public class GT_Forestry_Compat { 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")}, + new ItemStack[] { ItemList.FR_Larvae.getWildcard(1L) }, + new ItemStack[] { ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae") }, null, - new FluidStack[] {Materials.Honey.getFluid(100L)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -88,10 +90,10 @@ public class GT_Forestry_Compat { 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")}, + new ItemStack[] { ItemList.FR_Serum.getWildcard(1L) }, + new ItemStack[] { ItemList.FR_Serum.getWithName(1L, "Scanned Serum") }, null, - new FluidStack[] {Materials.Honey.getFluid(100L)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -100,10 +102,10 @@ public class GT_Forestry_Compat { 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")}, + new ItemStack[] { ItemList.FR_Caterpillar.getWildcard(1L) }, + new ItemStack[] { ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar") }, null, - new FluidStack[] {Materials.Honey.getFluid(100L)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -112,10 +114,10 @@ public class GT_Forestry_Compat { 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")}, + new ItemStack[] { ItemList.FR_PollenFertile.getWildcard(1L) }, + new ItemStack[] { ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen") }, null, - new FluidStack[] {Materials.Honey.getFluid(100L)}, + new FluidStack[] { Materials.Honey.getFluid(100L) }, null, 500, 2, @@ -136,9 +138,27 @@ public class GT_Forestry_Compat { i++; } GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe( - true, new ItemStack[] {tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0); + true, + new ItemStack[] { tRecipe.getInput() }, + tOutputs, + null, + tChances, + null, + null, + 128, + 5, + 0); GT_Recipe.GT_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe( - true, new ItemStack[] {tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0); + true, + new ItemStack[] { tRecipe.getInput() }, + tOutputs, + null, + tChances, + null, + null, + 128, + 5, + 0); } } catch (Throwable e) { if (GT_Values.D1) { @@ -153,12 +173,12 @@ public class GT_Forestry_Compat { 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()}, + new ItemStack[] { tRecipe.getResources()[0] }, + new ItemStack[] { tRecipe.getRemnants() }, null, - new int[] {(int) (tRecipe.getRemnantsChance() * 10000)}, + new int[] { (int) (tRecipe.getRemnantsChance() * 10000) }, null, - new FluidStack[] {tRecipe.getFluidOutput()}, + new FluidStack[] { tRecipe.getFluidOutput() }, 32, 8, 0); 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 60e0e2649d..93c7f35746 100644 --- a/src/main/java/gregtech/api/util/GT_GC_Compat.java +++ b/src/main/java/gregtech/api/util/GT_GC_Compat.java @@ -1,15 +1,17 @@ package gregtech.api.util; -import gregtech.api.GregTech_API; import micdoodle8.mods.galacticraft.api.power.EnergySource; import micdoodle8.mods.galacticraft.api.power.EnergySource.EnergySourceAdjacent; import micdoodle8.mods.galacticraft.api.power.IEnergyHandlerGC; import micdoodle8.mods.galacticraft.api.transmission.NetworkType; import micdoodle8.mods.galacticraft.api.transmission.tile.IConnector; import micdoodle8.mods.galacticraft.core.energy.EnergyConfigHandler; + import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.GregTech_API; + public class GT_GC_Compat { public static long insertEnergyInto(TileEntity tTileEntity, long aVoltage, ForgeDirection tDirection) { @@ -27,8 +29,8 @@ public class GT_GC_Compat { 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; } @@ -43,10 +45,10 @@ public class GT_GC_Compat { public static boolean canConnect(TileEntity tTileEntity, ForgeDirection tDirection) { // GC Compat - if (GregTech_API.mGalacticraft - && tTileEntity instanceof IEnergyHandlerGC + if (GregTech_API.mGalacticraft && tTileEntity instanceof IEnergyHandlerGC && (!(tTileEntity instanceof IConnector) - || ((IConnector) tTileEntity).canConnect(tDirection, NetworkType.POWER))) return true; + || ((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 d8e9289f54..96e721e9be 100644 --- a/src/main/java/gregtech/api/util/GT_HatchElementBuilder.java +++ b/src/main/java/gregtech/api/util/GT_HatchElementBuilder.java @@ -2,19 +2,10 @@ 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; -import gnu.trove.TIntCollection; -import gnu.trove.list.array.TIntArrayList; -import gnu.trove.set.hash.TIntHashSet; -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; @@ -24,8 +15,22 @@ import net.minecraft.util.IChatComponent; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import com.gtnewhorizon.structurelib.StructureLibAPI; +import com.gtnewhorizon.structurelib.structure.*; +import com.gtnewhorizon.structurelib.util.ItemStackPredicate; + +import gnu.trove.TIntCollection; +import gnu.trove.list.array.TIntArrayList; +import gnu.trove.set.hash.TIntHashSet; +import gregtech.api.interfaces.IHatchElement; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.common.blocks.GT_Item_Machines; + public class GT_HatchElementBuilder<T> { - private interface Builtin {} + + private interface Builtin { + } private IGT_HatchAdder<? super T> mAdder; private int mCasingIndex = -1; @@ -47,80 +52,72 @@ public class GT_HatchElementBuilder<T> { // region composite /** - * Set all of adder, hint and hatchItemFilter. Provide a reasonable default for shouldSkip. - * TODO add doc + * Set all of adder, hint and hatchItemFilter. Provide a reasonable default for shouldSkip. TODO add doc */ @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 ", ""))); } /** * Set all of adder, hint and hatchItemFilter. Provide a reasonable default for shouldSkip. * <p> - * Will rotate through all elements - * TODO add doc + * Will rotate through all elements TODO add doc */ @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()))); } /** * Set all of adder, hint and hatchItemFilter. Provide a reasonable default for shouldSkip. * <p> - * Will rotate through all elements - * TODO add doc + * Will rotate through all elements TODO add doc */ 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()))); } /** - * Set all of adder, hint and hatchItemFilter. Provide a reasonable default for shouldSkip. - * TODO add doc + * Set all of adder, hint and hatchItemFilter. Provide a reasonable default for shouldSkip. TODO add doc */ 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 @@ -228,6 +225,7 @@ public class GT_HatchElementBuilder<T> { * This will clear the sides set by previous call to this or {@link #allowOnly(ForgeDirection...)} * <p> * Usually mandatory for multis with multiple slices, and otherwise not needed if it contains a single slice only. + * * @param facings disallowed direction in ABC coordinate system */ public GT_HatchElementBuilder<T> disallowOnly(ForgeDirection... facings) { @@ -243,6 +241,7 @@ public class GT_HatchElementBuilder<T> { * This will clear the sides set by previous call to this or {@link #disallowOnly(ForgeDirection...)} * <p> * Usually mandatory for multis with multiple slices, and otherwise not needed if it contains a single slice only. + * * @param facings allowed direction in ABC coordinate system */ public GT_HatchElementBuilder<T> allowOnly(ForgeDirection... facings) { @@ -256,9 +255,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 @@ -269,36 +268,35 @@ 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 + 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())); + .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 @@ -324,6 +322,7 @@ public class GT_HatchElementBuilder<T> { if (mHatchItemFilter == null) { // no item filter -> no placement return new IStructureElementNoPlacement<T>() { + @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); @@ -339,6 +338,7 @@ public class GT_HatchElementBuilder<T> { }; } return new IStructureElement<T>() { + private String mHint = mHatchItemType == null ? "unspecified GT hatch" : mHatchItemType.get(); @Override @@ -376,34 +376,33 @@ public class GT_HatchElementBuilder<T> { } @Override - public BlocksToPlace getBlocksToPlace( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { return BlocksToPlace.create(mHatchItemFilter.apply(t, trigger)); } @Deprecated @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) { return survivalPlaceBlock( - t, world, x, y, z, trigger, AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); + t, + world, + x, + y, + z, + trigger, + AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); } @Override - public PlaceResult survivalPlaceBlock( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { if (mShouldSkip != null) { TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof IGregTechTileEntity - && mShouldSkip.test(t, (IGregTechTileEntity) tileEntity)) return PlaceResult.SKIP; + && mShouldSkip.test(t, (IGregTechTileEntity) tileEntity)) + return PlaceResult.SKIP; } if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, env.getActor())) return PlaceResult.REJECT; @@ -415,17 +414,16 @@ public class GT_HatchElementBuilder<T> { return PlaceResult.REJECT; } if (StructureUtility.survivalPlaceBlock( - taken, - ItemStackPredicate.NBTMode.IGNORE, - null, - true, - world, - x, - y, - z, - env.getSource(), - env.getActor()) - != PlaceResult.ACCEPT) { + taken, + ItemStackPredicate.NBTMode.IGNORE, + null, + true, + world, + x, + y, + z, + env.getSource(), + env.getActor()) != PlaceResult.ACCEPT) { return PlaceResult.REJECT; } // try to infer facing diff --git a/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java b/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java index 747ca15249..796699c261 100644 --- a/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java +++ b/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java @@ -1,9 +1,11 @@ package gregtech.api.util; -import ic2.api.item.IBoxable; import net.minecraft.item.ItemStack; +import ic2.api.item.IBoxable; + public class GT_IBoxableWrapper implements IBoxable { + @Override public boolean canBeStoredInToolbox(ItemStack itemstack) { return GT_Utility.isStackInList(itemstack, GT_ModHandler.sBoxableItems); diff --git a/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java b/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java index 174b4618e8..7097e877bd 100644 --- a/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java +++ b/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java @@ -1,6 +1,7 @@ package gregtech.api.util; public class GT_ItsNotMyFaultException extends RuntimeException { + private static final long serialVersionUID = -8752778866486460495L; private String mError; diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java index a40f154035..ab077ff946 100644 --- a/src/main/java/gregtech/api/util/GT_LanguageManager.java +++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java @@ -2,50 +2,47 @@ 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 cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.ReflectionHelper; +import gregtech.api.GregTech_API; + public class GT_LanguageManager { - public static final HashMap<String, String> TEMPMAP = new HashMap<>(), - BUFFERMAP = 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 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"); - //noinspection unchecked - stringTranslateLanguageList = - (Map<String, String>) fieldStringTranslateLanguageList.get(fieldStringTranslateInstance.get(null)); + 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)); } catch (Exception e) { e.printStackTrace(); } @@ -92,9 +89,7 @@ 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; } @@ -216,11 +211,13 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_065", "Emit if 5 Maintenance Needed(inverted)"); addStringLocalization("Interaction_DESCRIPTION_Index_066", "Emit if rotor needs maintenance low accuracy mod"); addStringLocalization( - "Interaction_DESCRIPTION_Index_067", "Emit if rotor needs maintenance low accuracy mod(inverted)"); + "Interaction_DESCRIPTION_Index_067", + "Emit if rotor needs maintenance low accuracy mod(inverted)"); addStringLocalization("Interaction_DESCRIPTION_Index_068", "Emit if rotor needs maintenance high accuracy mod"); addStringLocalization("Interaction_DESCRIPTION_Index_068.1", "Emit if any Player is close"); addStringLocalization( - "Interaction_DESCRIPTION_Index_069", "Emit if rotor needs maintenance high accuracy mod(inverted)"); + "Interaction_DESCRIPTION_Index_069", + "Emit if rotor needs maintenance high accuracy mod(inverted)"); addStringLocalization("Interaction_DESCRIPTION_Index_069.1", "Emit if other Player is close"); addStringLocalization("Interaction_DESCRIPTION_Index_070", "Emit if you are close"); addStringLocalization("Interaction_DESCRIPTION_Index_071", "Conducts strongest Input"); @@ -368,7 +365,8 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_204", "No Pollution in Chunk! HAYO!"); addStringLocalization("Interaction_DESCRIPTION_Index_206", "Scan for Assembly Line"); addStringLocalization( - "Interaction_DESCRIPTION_Index_207", "Pump speed: %dL every %d ticks, %.2f L/sec on average"); + "Interaction_DESCRIPTION_Index_207", + "Pump speed: %dL every %d ticks, %.2f L/sec on average"); addStringLocalization("Interaction_DESCRIPTION_Index_208", " L"); addStringLocalization("Interaction_DESCRIPTION_Index_209", " ticks"); addStringLocalization("Interaction_DESCRIPTION_Index_209.1", " tick"); @@ -385,7 +383,8 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_222", "Fluid threshold"); addStringLocalization("Interaction_DESCRIPTION_Index_222.1", "Energy threshold"); addStringLocalization( - "Interaction_DESCRIPTION_Index_223", "Single recipe locking enabled. Will lock to next recipe."); + "Interaction_DESCRIPTION_Index_223", + "Single recipe locking enabled. Will lock to next recipe."); addStringLocalization("Interaction_DESCRIPTION_Index_224", "Always On"); addStringLocalization("Interaction_DESCRIPTION_Index_225", "Active with Redstone Signal"); addStringLocalization("Interaction_DESCRIPTION_Index_226", "Inactive with Redstone Signal"); @@ -429,7 +428,8 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_262", "Fluid Auto Output Disabled"); addStringLocalization("Interaction_DESCRIPTION_Index_263", "Fluid Auto Output Enabled"); addStringLocalization( - "Interaction_DESCRIPTION_Index_264", "currently none, will be locked to the next that is put in"); + "Interaction_DESCRIPTION_Index_264", + "currently none, will be locked to the next that is put in"); addStringLocalization("Interaction_DESCRIPTION_Index_265", "1 specific Fluid"); addStringLocalization("Interaction_DESCRIPTION_Index_266", "Lock Fluid Mode Disabled"); addStringLocalization("Interaction_DESCRIPTION_Index_267", "Overflow Voiding Mode Disabled"); diff --git a/src/main/java/gregtech/api/util/GT_Log.java b/src/main/java/gregtech/api/util/GT_Log.java index 49f44b968b..db7edf7779 100644 --- a/src/main/java/gregtech/api/util/GT_Log.java +++ b/src/main/java/gregtech/api/util/GT_Log.java @@ -12,6 +12,7 @@ import java.util.List; * Just a simple Logging Function. If on Server, then this will point to System.out and System.err */ public class GT_Log { + public static PrintStream out = System.out; public static PrintStream err = System.err; public static PrintStream ore = new LogBuffer(); @@ -23,13 +24,15 @@ public class GT_Log { public static File mExplosionLog; public static class LogBuffer extends PrintStream { + public final List<String> mBufferedOreDictLog = new ArrayList<String>(); public LogBuffer() { super(new OutputStream() { + @Override public void write(int arg0) { - /*Do nothing*/ + /* 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 f7bfb13cb2..c5060ff93f 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -10,28 +10,6 @@ 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; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OreDictNames; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.ToolDictNames; -import gregtech.api.interfaces.IDamagableItem; -import gregtech.api.interfaces.IItemContainer; -import gregtech.api.interfaces.internal.IGT_CraftingRecipe; -import gregtech.api.objects.GT_HashSet; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.ItemData; -import ic2.api.item.IBoxable; -import ic2.api.item.IC2Items; -import ic2.api.item.IElectricItem; -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; @@ -44,6 +22,7 @@ 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; @@ -69,6 +48,29 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OreDictNames; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.ToolDictNames; +import gregtech.api.interfaces.IDamagableItem; +import gregtech.api.interfaces.IItemContainer; +import gregtech.api.interfaces.internal.IGT_CraftingRecipe; +import gregtech.api.objects.GT_HashSet; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.ItemData; +import ic2.api.item.IBoxable; +import ic2.api.item.IC2Items; +import ic2.api.item.IElectricItem; +import ic2.api.reactor.IReactorComponent; +import ic2.api.recipe.IRecipeInput; +import ic2.api.recipe.RecipeInputItemStack; +import ic2.api.recipe.RecipeOutput; + /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -77,6 +79,7 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; * Due to the many imports, this File can cause compile Problems if not all the APIs are installed */ public class GT_ModHandler { + public static final List<IRecipe> sSingleNonBlockDamagableRecipeList = new ArrayList<>(1000); private static final Map<String, ItemStack> sIC2ItemMap = new HashMap<>(); @@ -103,51 +106,50 @@ public class GT_ModHandler { 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} - }; + { 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; public static List<Integer> sSingleNonBlockDamagableRecipeList_warntOutput = new ArrayList<>(50); @@ -304,7 +306,9 @@ public class GT_ModHandler { } /** - * @param aValue the Value of this Stack, when burning inside a Furnace (200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU)), limited to Short because the vanilla Furnace otherwise can't handle it properly, stupid Mojang... + * @param aValue the Value of this Stack, when burning inside a Furnace (200 = 1 Burn Process = 500 EU, max = 32767 + * (that is 81917.5 EU)), limited to Short because the vanilla Furnace otherwise can't handle it + * properly, stupid Mojang... */ public static ItemStack setFuelValue(ItemStack aStack, short aValue) { aStack.setTagCompound(GT_Utility.getNBTContainingShort(aStack.getTagCompound(), "GT.ItemFuelValue", aValue)); @@ -312,7 +316,9 @@ public class GT_ModHandler { } /** - * @return the Value of this Stack, when burning inside a Furnace (200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU)), limited to Short because the vanilla Furnace otherwise can't handle it properly, stupid Mojang... + * @return the Value of this Stack, when burning inside a Furnace (200 = 1 Burn Process = 500 EU, max = 32767 (that + * is 81917.5 EU)), limited to Short because the vanilla Furnace otherwise can't handle it properly, stupid + * Mojang... */ public static int getFuelValue(ItemStack aStack) { return TileEntityFurnace.getItemBurnTime(aStack); @@ -341,19 +347,19 @@ 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 (!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); } /** - * Gets an Item from IndustrialCraft, but the Damage Value can be specified, and returns a Replacement Item with the same Damage if not possible + * Gets an Item from IndustrialCraft, but the Damage Value can be specified, and returns a Replacement Item with the + * same Damage if not possible */ public static ItemStack getIC2Item(String aItem, long aAmount, int aMeta, ItemStack aReplacement) { ItemStack rStack = getIC2Item(aItem, aAmount, aReplacement); @@ -402,7 +408,8 @@ public class GT_ModHandler { } /** - * Gets an Item from the specified mod, but the Damage Value can be specified, and returns a Replacement Item with the same Damage if not possible + * Gets an Item from the specified mod, but the Damage Value can be specified, and returns a Replacement Item with + * the same Damage if not possible */ public static ItemStack getModItem(String aModID, String aItem, long aAmount, int aMeta, ItemStack aReplacement) { ItemStack rStack = getModItem(aModID, aItem, aAmount, aReplacement); @@ -438,11 +445,10 @@ 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) + 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*/ + /* Do nothing */ } return true; } @@ -475,7 +481,7 @@ public class GT_ModHandler { GT_Utility.copyOrNull(aOutput), aChance); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return true; } @@ -488,7 +494,7 @@ public class GT_ModHandler { try { ic2.api.recipe.Recipes.recyclerBlacklist.add(new RecipeInputItemStack(aRecycledStack)); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return true; } @@ -513,10 +519,8 @@ public class GT_ModHandler { 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.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, @@ -527,24 +531,24 @@ public class GT_ModHandler { /** * 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; } @@ -575,8 +579,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); } @@ -584,27 +588,21 @@ 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; @@ -612,16 +610,16 @@ public class GT_ModHandler { 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}, + 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; @@ -636,13 +634,13 @@ public class GT_ModHandler { return true; } - public static boolean addImmersiveEngineeringRecipe( - ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, ItemStack aOutput3, int aChance3) { + 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; } @@ -656,13 +654,8 @@ 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); @@ -671,8 +664,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; } @@ -689,11 +682,8 @@ 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, + 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()) { @@ -703,11 +693,10 @@ public class GT_ModHandler { 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": @@ -715,16 +704,10 @@ public class GT_ModHandler { case "gt.recipe.compressor": aGTRecipeMap.addRecipe( true, - new ItemStack[] { - GT_Utility.copyAmount( - iRecipeInputRecipeOutputEntry - .getKey() - .getAmount(), - tStack) - }, - iRecipeInputRecipeOutputEntry - .getValue() - .items + new ItemStack[] { GT_Utility.copyAmount( + iRecipeInputRecipeOutputEntry.getKey().getAmount(), + tStack) }, + iRecipeInputRecipeOutputEntry.getValue().items .toArray(new ItemStack[0]), null, null, @@ -737,16 +720,10 @@ public class GT_ModHandler { case "gt.recipe.thermalcentrifuge": aGTRecipeMap.addRecipe( true, - new ItemStack[] { - GT_Utility.copyAmount( - iRecipeInputRecipeOutputEntry - .getKey() - .getAmount(), - tStack) - }, - iRecipeInputRecipeOutputEntry - .getValue() - .items + new ItemStack[] { GT_Utility.copyAmount( + iRecipeInputRecipeOutputEntry.getKey().getAmount(), + tStack) }, + iRecipeInputRecipeOutputEntry.getValue().items .toArray(new ItemStack[0]), null, null, @@ -762,12 +739,7 @@ public class GT_ModHandler { } } if (aRemoveIC2Recipe) - aRecipesToRemove.put( - tStack, - iRecipeInputRecipeOutputEntry - .getValue() - .items - .get(0)); + aRecipesToRemove.put(tStack, iRecipeInputRecipeOutputEntry.getValue().items.get(0)); } } } @@ -779,7 +751,7 @@ public class GT_ModHandler { try { return ic2.api.recipe.Recipes.extractor.getRecipes(); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return sExtractorRecipes; } @@ -788,7 +760,7 @@ public class GT_ModHandler { try { return ic2.api.recipe.Recipes.compressor.getRecipes(); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return sCompressorRecipes; } @@ -797,7 +769,7 @@ public class GT_ModHandler { try { return ic2.api.recipe.Recipes.macerator.getRecipes(); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return sMaceratorRecipes; } @@ -806,7 +778,7 @@ public class GT_ModHandler { try { return ic2.api.recipe.Recipes.centrifuge.getRecipes(); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return sThermalCentrifugeRecipes; } @@ -815,7 +787,7 @@ public class GT_ModHandler { try { return ic2.api.recipe.Recipes.oreWashing.getRecipes(); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return sOreWashingRecipes; } @@ -824,7 +796,7 @@ public class GT_ModHandler { try { return ic2.api.recipe.Recipes.matterAmplifier.getRecipes(); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return sMassfabRecipes; } @@ -936,9 +908,15 @@ public class GT_ModHandler { NBTTagCompound tNBT = new NBTTagCompound(); tNBT.setInteger("amplification", aValue); GT_Utility.callMethod( - ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", false, false, false, aAmplifier, tNBT); + ic2.api.recipe.Recipes.matterAmplifier, + "addRecipe", + false, + false, + false, + aAmplifier, + tNBT); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return true; } @@ -950,8 +928,7 @@ 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() + 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); @@ -974,8 +951,8 @@ public class GT_ModHandler { /** * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ - public static boolean addCraftingRecipe( - ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) { + public static boolean addCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, + int[] aEnchantmentLevelsAdded, Object[] aRecipe) { return addCraftingRecipe( aResult, aEnchantmentsAdded, @@ -999,25 +976,19 @@ public class GT_ModHandler { /** * Regular Crafting Recipes. Deletes conflicting Recipes too. * <p/> - * You can insert instances of IItemContainer into the Recipe Input Array directly without having to call "get(1)" on them. + * You can insert instances of IItemContainer into the Recipe Input Array directly without having to call "get(1)" + * on them. * <p/> * Enums are automatically getting their "name()"-Method called in order to deliver an OreDict String. * <p/> * Lowercase Letters are reserved for Tools. They are as follows: * <p/> - * 'b' ToolDictNames.craftingToolBlade - * 'c' ToolDictNames.craftingToolCrowbar, - * 'd' ToolDictNames.craftingToolScrewdriver, - * 'f' ToolDictNames.craftingToolFile, - * 'h' ToolDictNames.craftingToolHardHammer, - * 'i' ToolDictNames.craftingToolSolderingIron, - * 'j' ToolDictNames.craftingToolSolderingMetal, - * 'k' ToolDictNames.craftingToolKnive - * 'm' ToolDictNames.craftingToolMortar, - * 'p' ToolDictNames.craftingToolDrawplate, - * 'r' ToolDictNames.craftingToolSoftHammer, - * 's' ToolDictNames.craftingToolSaw, - * 'w' ToolDictNames.craftingToolWrench, + * 'b' ToolDictNames.craftingToolBlade 'c' ToolDictNames.craftingToolCrowbar, 'd' + * ToolDictNames.craftingToolScrewdriver, 'f' ToolDictNames.craftingToolFile, 'h' + * ToolDictNames.craftingToolHardHammer, 'i' ToolDictNames.craftingToolSolderingIron, 'j' + * ToolDictNames.craftingToolSolderingMetal, 'k' ToolDictNames.craftingToolKnive 'm' + * ToolDictNames.craftingToolMortar, 'p' ToolDictNames.craftingToolDrawplate, 'r' + * ToolDictNames.craftingToolSoftHammer, 's' ToolDictNames.craftingToolSaw, 'w' ToolDictNames.craftingToolWrench, * 'x' ToolDictNames.craftingToolWireCutter, */ public static boolean addCraftingRecipe(ItemStack aResult, Object[] aRecipe) { @@ -1027,25 +998,19 @@ public class GT_ModHandler { /** * Regular Crafting Recipes. Deletes conflicting Recipes too. * <p/> - * You can insert instances of IItemContainer into the Recipe Input Array directly without having to call "get(1)" on them. + * You can insert instances of IItemContainer into the Recipe Input Array directly without having to call "get(1)" + * on them. * <p/> * Enums are automatically getting their "name()"-Method called in order to deliver an OreDict String. * <p/> * Lowercase Letters are reserved for Tools. They are as follows: * <p/> - * 'b' ToolDictNames.craftingToolBlade - * 'c' ToolDictNames.craftingToolCrowbar, - * 'd' ToolDictNames.craftingToolScrewdriver, - * 'f' ToolDictNames.craftingToolFile, - * 'h' ToolDictNames.craftingToolHardHammer, - * 'i' ToolDictNames.craftingToolSolderingIron, - * 'j' ToolDictNames.craftingToolSolderingMetal, - * 'k' ToolDictNames.craftingToolKnive - * 'm' ToolDictNames.craftingToolMortar, - * 'p' ToolDictNames.craftingToolDrawplate, - * 'r' ToolDictNames.craftingToolSoftHammer, - * 's' ToolDictNames.craftingToolSaw, - * 'w' ToolDictNames.craftingToolWrench, + * 'b' ToolDictNames.craftingToolBlade 'c' ToolDictNames.craftingToolCrowbar, 'd' + * ToolDictNames.craftingToolScrewdriver, 'f' ToolDictNames.craftingToolFile, 'h' + * ToolDictNames.craftingToolHardHammer, 'i' ToolDictNames.craftingToolSolderingIron, 'j' + * ToolDictNames.craftingToolSolderingMetal, 'k' ToolDictNames.craftingToolKnive 'm' + * ToolDictNames.craftingToolMortar, 'p' ToolDictNames.craftingToolDrawplate, 'r' + * ToolDictNames.craftingToolSoftHammer, 's' ToolDictNames.craftingToolSaw, 'w' ToolDictNames.craftingToolWrench, * 'x' ToolDictNames.craftingToolWireCutter, */ public static boolean addCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) { @@ -1072,24 +1037,12 @@ public class GT_ModHandler { /** * 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) { + 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) { 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); @@ -1101,11 +1054,11 @@ public class GT_ModHandler { 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 + 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(); + || aRecipe[i] instanceof Character)) + aRecipe[i] = aRecipe[i].toString(); } try { @@ -1199,8 +1152,9 @@ 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; @@ -1281,23 +1235,19 @@ public class GT_ModHandler { if (aResult == null || aResult.stackSize <= 0) return false; - if (aRemoveAllOthersWithSameOutput - || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT + if (aRemoveAllOthersWithSameOutput || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT || aRemoveAllOtherShapedsWithSameOutput || aRemoveAllOtherNativeRecipes) { - if (tDoWeCareIfThereWasARecipe || !aBuffered) - tThereWasARecipe = removeRecipeByOutput( - aResult, - !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, - aRemoveAllOtherShapedsWithSameOutput, - aRemoveAllOtherNativeRecipes) - || tThereWasARecipe; + 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(); + 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); @@ -1316,26 +1266,24 @@ public class GT_ModHandler { GT_Utility.updateItemStack(aResult); if (tThereWasARecipe || !aOnlyAddIfThereIsAnyRecipeOutputtingThis) { - if (sBufferCraftingRecipes && aBuffered) - 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)); + if (sBufferCraftingRecipes && aBuffered) 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)); } return true; } @@ -1343,10 +1291,17 @@ public class GT_ModHandler { /** * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ - public static boolean addShapelessEnchantingRecipe( - ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) { + public static boolean addShapelessEnchantingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, + int[] aEnchantmentLevelsAdded, Object[] aRecipe) { return addShapelessCraftingRecipe( - aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, true, false, false, false, aRecipe); + aResult, + aEnchantmentsAdded, + aEnchantmentLevelsAdded, + true, + false, + false, + false, + aRecipe); } /** @@ -1354,7 +1309,9 @@ public class GT_ModHandler { */ public static boolean addShapelessCraftingRecipe(ItemStack aResult, Object[] aRecipe) { return addShapelessCraftingRecipe( - aResult, RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | RecipeBits.BUFFERED, aRecipe); + aResult, + RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | RecipeBits.BUFFERED, + aRecipe); } /** @@ -1375,33 +1332,27 @@ public class GT_ModHandler { /** * 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 + else if (!(aRecipe[i] == null || aRecipe[i] instanceof ItemStack || aRecipe[i] instanceof String - || aRecipe[i] instanceof Character)) aRecipe[i] = aRecipe[i].toString(); + || aRecipe[i] instanceof Character)) + aRecipe[i] = aRecipe[i].toString(); } try { ItemStack[] tRecipe = new ItemStack[9]; int i = 0; for (Object tObject : aRecipe) { if (tObject == null) { - if (D1) - GT_Log.err.println("WARNING: Missing Item for shapeless Recipe: " - + (aResult == null ? "null" : aResult.getDisplayName())); + if (D1) 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; } @@ -1426,24 +1377,24 @@ 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)); - else - GameRegistry.addRecipe(new GT_Shapeless_Recipe( - GT_Utility.copyOrNull(aResult), - aDismantleable, - aRemovable, - aKeepNBT, - aEnchantmentsAdded, - aEnchantmentLevelsAdded, - aRecipe)); + if (sBufferCraftingRecipes && aBuffered) 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)); return true; } @@ -1467,10 +1418,8 @@ public class GT_ModHandler { */ public static boolean removeFurnaceSmeltingByOutput(ItemStack aOutput) { if (aOutput != null) { - return FurnaceRecipes.smelting() - .getSmeltingList() - .values() - .removeIf(tOutput -> GT_Utility.isStackValid(tOutput) + return FurnaceRecipes.smelting().getSmeltingList().values().removeIf( + tOutput -> GT_Utility.isStackValid(tOutput) && GT_Utility.areStacksEqual(aOutput, (ItemStack) tOutput, true)); } return false; @@ -1487,24 +1436,21 @@ 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(); + 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()) + || ((IGT_CraftingRecipe) tList.get(i)).isRemovable()) && tList.get(i).matches(aCrafting, DW)) { rReturn = tList.get(i).getCraftingResult(aCrafting); if (rReturn != null) tList.remove(i--); @@ -1527,32 +1473,26 @@ 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(); + 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); } @@ -1562,11 +1502,8 @@ public class GT_ModHandler { 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); @@ -1583,21 +1520,18 @@ 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(); for (int i = 0; i < tList_sS; i++) { IRecipe tRecipe = tList.get(i); if (aNotRemoveShapelessRecipes - && (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) continue; + && (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) + continue; if (aOnlyRemoveNativeHandlers) { if (!sNativeRecipeClasses.contains(tRecipe.getClass().getName())) continue; } else { @@ -1615,31 +1549,26 @@ 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()); - 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; } /** - * Checks all Crafting Handlers for Recipe Output - * Used for the Autocrafting Table + * Checks all Crafting Handlers for Recipe Output Used for the Autocrafting Table */ public static ItemStack getAllRecipeOutput(World aWorld, ItemStack... aRecipe) { if (aRecipe == null || aRecipe.length == 0) return null; @@ -1654,15 +1583,13 @@ 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) { @@ -1695,12 +1622,10 @@ public class GT_ModHandler { if (tIndex == 2) { assert tStack1 != null && tStack2 != null; - if (tStack1.getItem() == tStack2.getItem() - && tStack1.stackSize == 1 + if (tStack1.getItem() == tStack2.getItem() && tStack1.stackSize == 1 && tStack2.stackSize == 1 && tStack1.getItem().isRepairable()) { - int tNewDamage = tStack1.getMaxDamage() - + tStack1.getItemDamage() + int tNewDamage = tStack1.getMaxDamage() + tStack1.getItemDamage() - tStack2.getItemDamage() + tStack1.getMaxDamage() / 20; return new ItemStack(tStack1.getItem(), 1, tNewDamage < 0 ? 0 : tNewDamage); @@ -1711,8 +1636,7 @@ public class GT_ModHandler { } /** - * Gives you a copy of the Output from a Crafting Recipe - * Used for Recipe Detection. + * Gives you a copy of the Output from a Crafting Recipe Used for Recipe Detection. */ public static ItemStack getRecipeOutput(ItemStack... aRecipe) { return getRecipeOutput(false, true, aRecipe); @@ -1727,25 +1651,21 @@ public class GT_ModHandler { } /** - * Gives you a copy of the Output from a Crafting Recipe - * Used for Recipe Detection. + * Gives you a copy of the Output from a Crafting Recipe Used for Recipe Detection. */ @SuppressWarnings("unchecked") 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) { @@ -1761,9 +1681,8 @@ public class GT_ModHandler { ItemStack tOutput = aUncopiedStack ? iRecipe.getRecipeOutput() : iRecipe.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."); + 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."); } else { if (aUncopiedStack) return tOutput; return GT_Utility.copyOrNull(tOutput); @@ -1774,19 +1693,16 @@ public class GT_ModHandler { } /** - * Gives you a list of the Outputs from a Crafting Recipe - * If you have multiple Mods, which add Bronze Armor for example - * This also removes old Recipes from the List. + * Gives you a list of the Outputs from a Crafting Recipe If you have multiple Mods, which add Bronze Armor for + * example This also removes old Recipes from the List. */ public static List<ItemStack> getVanillyToolRecipeOutputs(ItemStack... aRecipe) { 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 + if (GT_Utility.isStackValid(tStack) && tStack.getMaxStackSize() == 1 && tStack.getMaxDamage() > 0 && !(tStack.getItem() instanceof ItemBlock) && !(tStack.getItem() instanceof IReactorComponent) @@ -1795,30 +1711,26 @@ public class GT_ModHandler { 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)) { - temp = false; - break; - } - if (tObject instanceof List && ((List) tObject).isEmpty()) { - temp = false; - break; - } + 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)) { + temp = false; + break; + } + if (tObject instanceof List && ((List) tObject).isEmpty()) { + temp = false; + break; } + } if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe); } 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; } @@ -1830,11 +1742,12 @@ 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) @@ -1843,8 +1756,8 @@ public class GT_ModHandler { } /** - * Gives you a list of the Outputs from a Crafting Recipe - * If you have multiple Mods, which add Bronze Armor for example + * Gives you a list of the Outputs from a Crafting Recipe If you have multiple Mods, which add Bronze Armor for + * example */ public static List<ItemStack> getRecipeOutputs(ItemStack... aRecipe) { return getRecipeOutputs(CraftingManager.getInstance().getRecipeList(), false, aRecipe); @@ -1853,99 +1766,87 @@ public class GT_ModHandler { private static List<IRecipe> bufferedRecipes = null; /** - * Gives you a list of the Outputs from a Crafting Recipe - * If you have multiple Mods, which add Bronze Armor for example - * Buffers a List which only has armor-alike crafting in it + * Gives you a list of the Outputs from a Crafting Recipe If you have multiple Mods, which add Bronze Armor for + * example Buffers a List which only has armor-alike crafting in it */ 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) { + 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; } - return false; - }) - .collect(Collectors.toList()); + } catch (Exception ignored) {} + return false; + }).collect(Collectors.toList()); return getRecipeOutputs(bufferedRecipes, false, aRecipe); } /** - * Gives you a list of the Outputs from a Crafting Recipe - * If you have multiple Mods, which add Bronze Armor for example + * Gives you a list of the Outputs from a Crafting Recipe If you have multiple Mods, which add Bronze Armor for + * example */ 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); + 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; - 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; - + aList.stream().filter(tRecipe -> { + if (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe + || tRecipe instanceof IGT_CraftingRecipe) + return false; try { - matched = tRecipe.matches(aCrafting, DW); + return tRecipe.matches(aCrafting, DW); } catch (Throwable e) { e.printStackTrace(GT_Log.err); + return false; } - 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(); + }).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); + + 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(); } + } return rList; } @@ -1972,8 +1873,13 @@ 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]); } /** @@ -1983,10 +1889,8 @@ public class GT_ModHandler { 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; } @@ -1998,12 +1902,8 @@ 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 { @@ -2016,10 +1916,9 @@ 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]; @@ -2042,8 +1941,8 @@ public class GT_ModHandler { /** * Used in my own Recycler. * <p/> - * Only produces Scrap if aScrapChance == 0. aScrapChance is usually the random Number I give to the Function - * If you directly insert 0 as aScrapChance then you can check if its Recycler-Blacklisted or similar + * Only produces Scrap if aScrapChance == 0. aScrapChance is usually the random Number I give to the Function If you + * directly insert 0 as aScrapChance then you can check if its Recycler-Blacklisted or similar */ public static ItemStack getRecyclerOutput(ItemStack aInput, int aScrapChance) { if (aInput == null || aScrapChance != 0) return null; @@ -2052,12 +1951,12 @@ public class GT_ModHandler { 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*/ + /* Do nothing */ } try { return ic2.api.recipe.Recipes.recyclerBlacklist.contains(aInput) ? null : ItemList.IC2_Scrap.get(1); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return null; } @@ -2070,14 +1969,14 @@ public class GT_ModHandler { } /** - * Charges an Electric Item. Only if it's a valid Electric Item of course. - * This forces the Usage of proper Voltages (so not the transfer limits defined by the Items) unless you ignore the Transfer Limit. - * If aTier is Integer.MAX_VALUE it will ignore Tier based Limitations. + * Charges an Electric Item. Only if it's a valid Electric Item of course. This forces the Usage of proper Voltages + * (so not the transfer limits defined by the Items) unless you ignore the Transfer Limit. If aTier is + * Integer.MAX_VALUE it will ignore Tier based Limitations. * * @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); @@ -2086,44 +1985,39 @@ public class GT_ModHandler { 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)); + 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*/ + /* Do nothing */ } return 0; } /** - * Discharges an Electric Item. Only if it's a valid Electric Item for that of course. - * This forces the Usage of proper Voltages (so not the transfer limits defined by the Items) unless you ignore the Transfer Limit. - * If aTier is Integer.MAX_VALUE it will ignore Tier based Limitations. + * Discharges an Electric Item. Only if it's a valid Electric Item for that of course. This forces the Usage of + * proper Voltages (so not the transfer limits defined by the Items) unless you ignore the Transfer Limit. If aTier + * is Integer.MAX_VALUE it will ignore Tier based Limitations. * * @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 || + // 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))]); + 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))]); if (aCharge > 0) { - // int rCharge = Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + + // 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, @@ -2139,7 +2033,7 @@ public class GT_ModHandler { } } } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return 0; } @@ -2155,7 +2049,7 @@ public class GT_ModHandler { return ic2.api.item.ElectricItem.manager.canUse(aStack, aCharge); } } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return false; } @@ -2174,7 +2068,7 @@ public class GT_ModHandler { } } } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return false; } @@ -2233,8 +2127,9 @@ public class GT_ModHandler { return GT_ModHandler.useElectricItem(aStack, 10000, (EntityPlayer) aPlayer); } GT_ModHandler.useElectricItem( - aStack, (int) ic2.api.item.ElectricItem.manager.getCharge(aStack), (EntityPlayer) - aPlayer); + aStack, + (int) ic2.api.item.ElectricItem.manager.getCharge(aStack), + (EntityPlayer) aPlayer); return false; } } @@ -2291,7 +2186,7 @@ public class GT_ModHandler { return ((ic2.api.item.IElectricItem) aStack.getItem()).canProvideEnergy(aStack); } } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return false; } @@ -2301,22 +2196,20 @@ public class GT_ModHandler { */ public static boolean isElectricItem(ItemStack aStack) { try { - return aStack != null - && aStack.getItem() instanceof ic2.api.item.IElectricItem + return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem) aStack.getItem()).getTier(aStack) < Integer.MAX_VALUE; } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return false; } public static boolean isElectricItem(ItemStack aStack, byte aTier) { try { - return aStack != null - && aStack.getItem() instanceof ic2.api.item.IElectricItem + return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem) aStack.getItem()).getTier(aStack) == aTier; } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return false; } @@ -2329,7 +2222,7 @@ public class GT_ModHandler { try { ic2.api.item.ItemWrapper.registerBoxable(aStack.getItem(), (IBoxable) sBoxableWrapper); } catch (Throwable ignored) { - /*Do nothing*/ + /* Do nothing */ } sBoxableItems.add(new GT_ItemStack(aStack)); } @@ -2368,6 +2261,7 @@ public class GT_ModHandler { } public static class RecipeBits { + /** * Mirrors the Recipe */ @@ -2393,7 +2287,8 @@ public class GT_ModHandler { */ public static long REVERSIBLE = B[5]; /** - * Removes all Recipes with the same Output Item regardless of NBT, unless another Recipe Deletion Bit is added too. + * Removes all Recipes with the same Output Item regardless of NBT, unless another Recipe Deletion Bit is added + * too. */ public static long DELETE_ALL_OTHER_RECIPES = B[6]; /** @@ -2427,54 +2322,47 @@ 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 + * 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 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, + ItemStack secondaryOutput) {} - 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, int secondaryChance) {} public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) {} - public static void addSawmillRecipe( - int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {} + public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, + ItemStack secondaryOutput) {} - 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, int secondaryChance) {} - public static void addSmelterRecipe( - int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput) {} + 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) {} + 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 addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, + ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {} public static void addSmelterBlastOre(Materials aMaterial) {} 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) {} 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 bd69f33a8a..e428c10c70 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 @@ -1,17 +1,19 @@ package gregtech.api.util; -import com.google.common.collect.Multimaps; -import com.google.common.collect.SetMultimap; -import com.gtnewhorizon.structurelib.StructureLibAPI; 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; +import com.google.common.collect.Multimaps; +import com.google.common.collect.SetMultimap; +import com.gtnewhorizon.structurelib.StructureLibAPI; + /** * This makes it easier to build multi tooltips, with a standardized format. <br> * Info section order should be:<br> @@ -29,13 +31,13 @@ import net.minecraft.util.StatCollector; * addMaintenanceHatch<br> * addMufflerHatch<br> * addInputBus/addInputHatch/addOutputBus/addOutputHatch, in that order<br> - * Use addStructureInfo for any comments on nonstandard structure info wherever needed - * <br> + * Use addStructureInfo for any comments on nonstandard structure info wherever needed <br> * toolTipFinisher goes at the very end<br> * <br> * 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 = ", "; @@ -87,8 +89,7 @@ public class GT_Multiblock_Tooltip_Builder { * 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 + * @param machine Name of the machine type * * @return Instance this method was called on. */ @@ -100,8 +101,7 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a basic line of information about this structure * - * @param info - * The line to be added. + * @param info The line to be added. * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addInfo(String info) { @@ -123,29 +123,29 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line telling how much this machine pollutes. * - * @param pollution - * Amount of pollution per second when active + * @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); + 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. + * 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 + * @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) { @@ -162,30 +162,48 @@ public class GT_Multiblock_Tooltip_Builder { * 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 + * @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) { + 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); + 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_dimensions + COLON + + wmin + + "-" + + wmax + + "x" + + hmin + + "-" + + hmax + + "x" + + lmin + + "-" + + lmax + + " (WxHxL)"); } sLines.add(TT_structure + COLON); return this; @@ -193,9 +211,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Controller: info - * @param info - * Positional information. + * (indent)Controller: info + * + * @param info Positional information. * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addController(String info) { @@ -205,11 +223,10 @@ public class GT_Multiblock_Tooltip_Builder { /** * 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. + * (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) { @@ -220,10 +237,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * 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 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) { @@ -233,9 +249,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Maintenance Hatch: info - * @param info - * Positional information. + * (indent)Maintenance Hatch: info + * + * @param info Positional information. * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addMaintenanceHatch(String info) { @@ -245,9 +261,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Muffler Hatch: info - * @param info - * Location where the hatch goes + * (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) { @@ -257,9 +273,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Energy Hatch: info - * @param info - * Positional information. + * (indent)Energy Hatch: info + * + * @param info Positional information. * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addEnergyHatch(String info) { @@ -269,9 +285,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Dynamo Hatch: info - * @param info - * Positional information. + * (indent)Dynamo Hatch: info + * + * @param info Positional information. * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addDynamoHatch(String info) { @@ -281,9 +297,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Input Bus: info - * @param info - * Location where the bus goes + * (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) { @@ -293,9 +309,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Input Hatch: info - * @param info - * Location where the hatch goes + * (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) { @@ -305,9 +321,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Output Bus: info - * @param info - * Location where the bus goes + * (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) { @@ -317,9 +333,9 @@ public class GT_Multiblock_Tooltip_Builder { /** * Add a line of information about the structure:<br> - * (indent)Output Hatch: info - * @param info - * Location where the bus goes + * (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) { @@ -330,12 +346,10 @@ public class GT_Multiblock_Tooltip_Builder { /** * 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 + * + * @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) { @@ -459,8 +473,8 @@ public class GT_Multiblock_Tooltip_Builder { /** * Use this method to add non-standard structural info.<br> * (indent)info - * @param info - * The line to be added. + * + * @param info The line to be added. * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addStructureInfo(String info) { @@ -471,6 +485,7 @@ public class GT_Multiblock_Tooltip_Builder { /** * Use this method to add non-standard structural info.<br> * (indent)info + * * @param channel the name of subchannel * @param purpose the purpose of subchannel * @return Instance this method was called on. @@ -482,8 +497,8 @@ public class GT_Multiblock_Tooltip_Builder { /** * 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. + * + * @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) { @@ -492,11 +507,11 @@ public class GT_Multiblock_Tooltip_Builder { } /** - * 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 + * 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) { @@ -509,18 +524,24 @@ public class GT_Multiblock_Tooltip_Builder { * 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 + * @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_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( + hArray = Stream + .concat( hLines.stream(), hBlocks.asMap().entrySet().stream() .map(e -> TT_dots[e.getKey() - 1] + COLON + String.join(SEPARATOR, e.getValue()))) diff --git a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java index 959707c18f..7719b52fed 100644 --- a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java +++ b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java @@ -4,15 +4,6 @@ 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; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_ItemStack2; -import gregtech.api.objects.ItemData; -import gregtech.api.objects.MaterialStack; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -21,11 +12,23 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; + import javax.annotation.Nullable; + import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_ItemStack2; +import gregtech.api.objects.ItemData; +import gregtech.api.objects.MaterialStack; + /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -36,6 +39,7 @@ import net.minecraftforge.oredict.OreDictionary; * P.S. It is intended to be named "Unificator" and not "Unifier", because that sounds more awesome. */ public class GT_OreDictUnificator { + private static final Map<String, ItemStack> sName2StackMap = new HashMap<>(); private static final Map<GT_ItemStack2, ItemData> sItemStack2DataMap = new HashMap<>(); private static final Map<GT_ItemStack2, List<ItemStack>> sUnificationTable = new HashMap<>(); @@ -50,8 +54,8 @@ public class GT_OreDictUnificator { } /** - * The Blacklist just prevents the Item from being unificated into something else. - * Useful if you have things like the Industrial Diamond, which is better than regular Diamond, but also usable in absolutely all Diamond Recipes. + * The Blacklist just prevents the Item from being unificated into something else. Useful if you have things like + * the Industrial Diamond, which is better than regular Diamond, but also usable in absolutely all Diamond Recipes. */ public static void addToBlacklist(ItemStack aStack) { if (GT_Utility.isStackValid(aStack) && !GT_Utility.isStackInList(aStack, sNoUnificationList)) @@ -70,23 +74,17 @@ public class GT_OreDictUnificator { set(aPrefix, aMaterial, aStack, true, false); } - public static void set( - OrePrefixes aPrefix, - Materials aMaterial, - ItemStack aStack, - boolean aOverwrite, + public static void set(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aOverwrite, boolean aAlreadyRegistered) { - if (aMaterial == null - || aPrefix == null + if (aMaterial == null || aPrefix == null || GT_Utility.isStackInvalid(aStack) - || Items.feather.getDamage(aStack) == W) return; + || 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--; } @@ -126,11 +124,7 @@ public class GT_OreDictUnificator { return get(aPrefix.get(aMaterial), null, aAmount, false, aNoInvalidAmounts); } - public static ItemStack get( - Object aName, - ItemStack aReplacement, - long aAmount, - boolean aMentionPossibleTypos, + 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()); @@ -182,9 +176,9 @@ public class GT_OreDictUnificator { public static ItemStack get(boolean aUseBlackList, ItemStack aStack, boolean unsafe) { if (GT_Utility.isStackInvalid(aStack)) return null; ItemData tPrefixMaterial = getAssociation(aStack); - 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); @@ -201,21 +195,25 @@ public class GT_OreDictUnificator { } } - /** Doesn't copy the returned stack or set quantity. Be careful and do not mutate it; - * intended only to optimize comparisons */ + /** + * Doesn't copy the returned stack or set quantity. Be careful and do not mutate it; intended only to optimize + * comparisons + */ 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 */ + /** + * 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; @@ -229,8 +227,10 @@ public class GT_OreDictUnificator { return rStack; } - /** Compares the first argument against an already-unificated second argument as if - * aUseBlackList was both true and false. */ + /** + * Compares the first argument against an already-unificated second argument as if aUseBlackList was both true and + * false. + */ public static boolean isInputStackEqual(ItemStack aStack, ItemStack unified_tStack) { boolean alreadyCompared = false; if (GT_Utility.isStackInvalid(aStack)) return false; @@ -277,7 +277,7 @@ public class GT_OreDictUnificator { } } ItemStack[] aStacks = {}; - if (obj instanceof ItemStack) aStacks = new ItemStack[] {(ItemStack) obj}; + 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<>(); @@ -303,9 +303,8 @@ 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; @@ -313,12 +312,10 @@ public class GT_OreDictUnificator { } sItemStack2DataMap.put(new GT_ItemStack2(aStack), aData); if (aData.hasValidMaterialData()) { - long tValidMaterialAmount = aData.mMaterial.mMaterial.contains(SubTag.NO_RECYCLING) - ? 0 + 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 + tValidMaterialAmount += tMaterial.mMaterial.contains(SubTag.NO_RECYCLING) ? 0 : tMaterial.mAmount >= 0 ? tMaterial.mAmount : M; if (tValidMaterialAmount < M) GT_ModHandler.addToRecyclerBlackList(aStack); } @@ -327,8 +324,8 @@ public class GT_OreDictUnificator { mRunThroughTheList = false; for (Entry<GT_ItemStack2, 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) @@ -340,13 +337,11 @@ public class GT_OreDictUnificator { } } - public static void addAssociation( - OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean 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)); + 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)); } @@ -513,14 +508,13 @@ public class GT_OreDictUnificator { } /** - * Fast version of {@link #getOres(Object)}, - * which doesn't call {@link System#arraycopy(Object, int, Object, int, int)} in {@link ArrayList#addAll} + * Fast version of {@link #getOres(Object)}, which doesn't call + * {@link System#arraycopy(Object, int, Object, int, int)} in {@link ArrayList#addAll} */ 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)) + return GT_Utility.isStringValid(aName) ? Collections.unmodifiableList(OreDictionary.getOres(aName)) : Collections.emptyList(); } } diff --git a/src/main/java/gregtech/api/util/GT_OverclockCalculator.java b/src/main/java/gregtech/api/util/GT_OverclockCalculator.java index 6ea873e6b4..e19c8c904b 100644 --- a/src/main/java/gregtech/api/util/GT_OverclockCalculator.java +++ b/src/main/java/gregtech/api/util/GT_OverclockCalculator.java @@ -1,6 +1,7 @@ package gregtech.api.util; public class GT_OverclockCalculator { + /** * @mAmps - Amperage of the multiblock * @mEUt - Voltage of the multiblock @@ -10,26 +11,25 @@ public class GT_OverclockCalculator { private long mAmps = 1, mEUt = 0, mRecipeEUt = 0, mRecipeAmps = 1; /** * @mEUtDiscount - Discount for EUt at the beginning of calculating overclocks, like GT++ machines - * @mSpeedBoost - Speeding/Slowing up/down the duration of a recipe at the beginning of calculating overclocks, like GT++ machines + * @mSpeedBoost - Speeding/Slowing up/down the duration of a recipe at the beginning of calculating overclocks, like + * GT++ machines * @mHeatDiscountAmont - The value used for discount final eut per 900 heat */ private float mEUtDiscount = 1, mSpeedBoost = 1, mHeatDiscountAmount = 0.95f; /** - * @mEUtIncreasePerOC - How much the bits should be moved to the left when it is overclocking (Going up, 2 meaning it is multiplied with 4x) - * @mDurationDecreasePerOC - How much the bits should be moved to the right when its overclocking (Going down, 1 meaning it is halved) + * @mEUtIncreasePerOC - How much the bits should be moved to the left when it is overclocking (Going up, 2 meaning + * it is multiplied with 4x) + * @mDurationDecreasePerOC - How much the bits should be moved to the right when its overclocking (Going down, 1 + * meaning it is halved) * @mDuration - Duration of the recipe * @mParallel - The parallel the multi has when trying to overclock * @mRecipeHeat - The min heat required for the recipe * @mMultiHeat - The heat the multi has when starting the recipe - * @mHeatPerfectOC - How much the bits should be moved to the right for each 1800 above recipe heat (Used for duration) + * @mHeatPerfectOC - How much the bits should be moved to the right for each 1800 above recipe heat (Used for + * duration) */ - private int mEUtIncreasePerOC = 2, - mDurationDecreasePerOC = 1, - mDuration = 0, - mParallel = 1, - mRecipeHeat = 0, - mMultiHeat = 0, - mHeatPerfectOC = 2; + private int mEUtIncreasePerOC = 2, mDurationDecreasePerOC = 1, mDuration = 0, mParallel = 1, mRecipeHeat = 0, + mMultiHeat = 0, mHeatPerfectOC = 2; /** * @mHeatOC - Whether to enable overclocking with heat like the EBF every 1800 heat difference * @mOneTickDiscount - Whether to give EUt Discount when the duration goes below one tick @@ -40,6 +40,7 @@ public class GT_OverclockCalculator { private static final int HEAT_DISCOUNT_THRESHOLD = 900; private static final int HEAT_PERFECT_OVERCLOCK_THRESHOLD = 1800; + /** * An Overclock helper for calculating overclocks in many different situations */ @@ -150,8 +151,8 @@ public class GT_OverclockCalculator { } /** - * Sets the heat discount during OC calculation if HeatOC is used. Default: 0.95 = 5% discount - * Used like a EU/t Discount + * Sets the heat discount during OC calculation if HeatOC is used. Default: 0.95 = 5% discount Used like a EU/t + * Discount */ public GT_OverclockCalculator setHeatDiscount(float aHeatDiscount) { mHeatDiscountAmount = aHeatDiscount; @@ -159,7 +160,8 @@ public class GT_OverclockCalculator { } /** - * Sets the Overclock that should be calculated when one. This uses BitShifting! Default is 2, which is a 4x decrease + * Sets the Overclock that should be calculated when one. This uses BitShifting! Default is 2, which is a 4x + * decrease */ public GT_OverclockCalculator setHeatPerfectOC(int aHeatPerfectOC) { mHeatPerfectOC = aHeatPerfectOC; @@ -167,7 +169,7 @@ public class GT_OverclockCalculator { } /** - * Sets the amount that the EUt increases per overclock. This uses BitShifting! Default is 2, which is a 4x increase + * Sets the amount that the EUt increases per overclock. This uses BitShifting! Default is 2, which is a 4x increase */ public GT_OverclockCalculator setEUtIncreasePerOC(int aEUtIncreasePerOC) { mEUtIncreasePerOC = aEUtIncreasePerOC; @@ -175,7 +177,8 @@ public class GT_OverclockCalculator { } /** - * Sets the amount that the duration decreases per overclock. This uses BitShifting! Default is 1, which halves the duration + * Sets the amount that the duration decreases per overclock. This uses BitShifting! Default is 1, which halves the + * duration */ public GT_OverclockCalculator setDurationDecreasePerOC(int aDurationDecreasePerOC) { mDurationDecreasePerOC = aDurationDecreasePerOC; @@ -183,7 +186,8 @@ public class GT_OverclockCalculator { } /** - * Enables One Tick Discount on EUt based on Duration Decrease Per Overclock. This functions the same as single blocks. + * Enables One Tick Discount on EUt based on Duration Decrease Per Overclock. This functions the same as single + * blocks. */ public GT_OverclockCalculator enableOneTickDiscount() { mOneTickDiscount = true; @@ -223,8 +227,8 @@ public class GT_OverclockCalculator { if (tRecipeTier == 0) { int tTier = GT_Utility.getTier(mEUt); int tTierDifference = tTier - 1; - long tNextConsumption = - ((long) Math.ceil(mRecipeEUt * mParallel * mRecipeAmps * mEUtDiscount)) << mEUtIncreasePerOC; + long tNextConsumption = ((long) Math.ceil(mRecipeEUt * mParallel * mRecipeAmps * mEUtDiscount)) + << mEUtIncreasePerOC; while (tTierDifference > 0 && tNextConsumption < mEUt * mAmps) { mRecipeEUt <<= mEUtIncreasePerOC; mDuration >>= mDurationDecreasePerOC; @@ -232,8 +236,8 @@ public class GT_OverclockCalculator { tTierDifference--; } } else { - long tNextConsumption = - ((long) Math.ceil(mRecipeEUt * mParallel * mRecipeAmps * mEUtDiscount)) << mEUtIncreasePerOC; + long tNextConsumption = ((long) Math.ceil(mRecipeEUt * mParallel * mRecipeAmps * mEUtDiscount)) + << mEUtIncreasePerOC; while (tNextConsumption < mEUt * mAmps) { if (mDuration <= 1) { break; diff --git a/src/main/java/gregtech/api/util/GT_PCBFactoryManager.java b/src/main/java/gregtech/api/util/GT_PCBFactoryManager.java index 1543a9d2a6..dfc2af49ff 100644 --- a/src/main/java/gregtech/api/util/GT_PCBFactoryManager.java +++ b/src/main/java/gregtech/api/util/GT_PCBFactoryManager.java @@ -4,6 +4,7 @@ import com.google.common.collect.HashBiMap; import gregtech.api.enums.Materials; public class GT_PCBFactoryManager { + private static final HashBiMap<Materials, Integer> mPlasticTiers = HashBiMap.create(); public static int mTiersOfPlastics = 0; diff --git a/src/main/java/gregtech/api/util/GT_ParallelHelper.java b/src/main/java/gregtech/api/util/GT_ParallelHelper.java index 7f32d95d1e..c493184424 100644 --- a/src/main/java/gregtech/api/util/GT_ParallelHelper.java +++ b/src/main/java/gregtech/api/util/GT_ParallelHelper.java @@ -1,25 +1,30 @@ package gregtech.api.util; -import com.gtnewhorizon.gtnhlib.util.map.ItemStackMap; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.multitileentity.multiblock.base.MultiBlockController; -import gregtech.api.objects.XSTR; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_OutputBus_ME; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Output_ME; import java.util.Comparator; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.PriorityQueue; + import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; + import org.apache.commons.lang3.tuple.MutablePair; import org.apache.commons.lang3.tuple.MutableTriple; +import com.gtnewhorizon.gtnhlib.util.map.ItemStackMap; + +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.multitileentity.multiblock.base.MultiBlockController; +import gregtech.api.objects.XSTR; +import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_OutputBus_ME; +import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Output_ME; + public class GT_ParallelHelper { + /** * @mMachineMeta a MetaTileEntity Controller */ @@ -39,7 +44,8 @@ public class GT_ParallelHelper { /** * @mCurrentParallel The current parallel possible for the multiblock * @mMaxParallel The maximum possible parallel possible for the multiblock - * @mBatchModifier The Batch Modifier applied when batch mode is enabled. 1 does nothing. 2 doubles max possible parallel, but also duration + * @mBatchModifier The Batch Modifier applied when batch mode is enabled. 1 does nothing. 2 doubles max possible + * parallel, but also duration */ private int mCurrentParallel = 0, mMaxParallel = 1, mBatchModifier = 1; /** @@ -56,7 +62,8 @@ public class GT_ParallelHelper { * @mVoidProtection Does the multi have void protection enabled * @mConsume Should the Parallel Helper automatically consume for the multi * @mBatchMode Is batch mode turned on? - * @mCalculateOutputs Should the Parallel Helper automatically calculate the outputs of the recipe with current parallel + * @mCalculateOutputs Should the Parallel Helper automatically calculate the outputs of the recipe with current + * parallel * @mBuilt Has the Parallel Helper been built? */ private boolean mVoidProtection, mConsume, mBatchMode, mCalculateOutputs, mBuilt; @@ -143,8 +150,8 @@ public class GT_ParallelHelper { } /** - * Enables Batch mode. Can do up to an additional processed recipes of mCurrentParallel * mBatchModifier - * A batch modifier of 1 does nothing + * Enables Batch mode. Can do up to an additional processed recipes of mCurrentParallel * mBatchModifier A batch + * modifier of 1 does nothing */ public GT_ParallelHelper enableBatchMode(int aBatchModifier) { mBatchMode = true; @@ -153,7 +160,8 @@ public class GT_ParallelHelper { } /** - * Enables the outputs to be calculated with its current Parallels, useful if one isn't doing anything special with outputs + * Enables the outputs to be calculated with its current Parallels, useful if one isn't doing anything special with + * outputs */ public GT_ParallelHelper enableOutputCalculation() { mCalculateOutputs = true; @@ -278,9 +286,8 @@ public class GT_ParallelHelper { float tRecipeEUt = mRecipe.mEUt * mEUtModifier; // Consume inputs to determine normal parallel - for (; - mCurrentParallel < mMaxParallel / mBatchModifier && tCurrentUsage < (mAvailableEUt - tRecipeEUt); - mCurrentParallel++) { + for (; mCurrentParallel < mMaxParallel / mBatchModifier + && tCurrentUsage < (mAvailableEUt - tRecipeEUt); mCurrentParallel++) { if (mRecipe.isRecipeInputEqual(true, false, tFluidInputs, tItemInputs)) { tCurrentUsage += tRecipeEUt; } else { @@ -373,10 +380,8 @@ public class GT_ParallelHelper { if (!tHatch.outputsLiquids()) { continue; } - if (tHatch.isFluidLocked() - && tLockedFluidName != null - && !tLockedFluidName.equals( - tFluidOutput.getFluid().getName())) { + if (tHatch.isFluidLocked() && tLockedFluidName != null + && !tLockedFluidName.equals(tFluidOutput.getFluid().getName())) { continue; } } @@ -391,8 +396,8 @@ public class GT_ParallelHelper { } // now that all partial/restricted hatches have been counted, create a priority queue for our outputs // the lowest priority fluid is the number of complete parallel crafts we can support - PriorityQueue<MutableTriple<Integer, Integer, FluidStack>> aParallelQueue = - new PriorityQueue<>(Comparator.comparing(MutableTriple::getLeft)); + PriorityQueue<MutableTriple<Integer, Integer, FluidStack>> aParallelQueue = new PriorityQueue<>( + Comparator.comparing(MutableTriple::getLeft)); for (Entry<FluidStack, MutablePair<Integer, Integer>> entry : tParallels.entrySet()) { aParallelQueue.add(new MutableTriple<>(entry.getValue().left, entry.getValue().right, entry.getKey())); } @@ -470,8 +475,8 @@ public class GT_ParallelHelper { } // now that all partial stacks have been counted, create a priority queue for our outputs // the lowest priority item is the number of complete parallel crafts we can support - PriorityQueue<MutableTriple<Integer, Integer, ItemStack>> aParallelQueue = - new PriorityQueue<>(Comparator.comparing(MutableTriple::getLeft)); + PriorityQueue<MutableTriple<Integer, Integer, ItemStack>> aParallelQueue = new PriorityQueue<>( + Comparator.comparing(MutableTriple::getLeft)); for (Entry<ItemStack, MutablePair<Integer, Integer>> entry : tParallels.entrySet()) { aParallelQueue.add(new MutableTriple<>(entry.getValue().left, entry.getValue().right, entry.getKey())); } diff --git a/src/main/java/gregtech/api/util/GT_PlayedSound.java b/src/main/java/gregtech/api/util/GT_PlayedSound.java index 87743517d0..cdafc010d7 100644 --- a/src/main/java/gregtech/api/util/GT_PlayedSound.java +++ b/src/main/java/gregtech/api/util/GT_PlayedSound.java @@ -5,6 +5,7 @@ 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,8 +28,7 @@ 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 + return ((GT_PlayedSound) aObject).mX == mX && ((GT_PlayedSound) aObject).mY == mY && ((GT_PlayedSound) aObject).mZ == mZ && ((GT_PlayedSound) aObject).mSoundName.equals(mSoundName); } 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 548795cc49..923402c5d9 100644 --- a/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java +++ b/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java @@ -1,18 +1,21 @@ package gregtech.api.util; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import java.util.HashMap; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; + 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 + // 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. public static GT_Recipe_Map giveRecipeMap(String aMachineName) { if (aMachineName != null) { diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index c538028770..895dbf5ac3 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -3,7 +3,33 @@ package gregtech.api.util; import static gregtech.api.enums.GT_Values.*; import static net.minecraft.util.EnumChatFormatting.GRAY; +import java.awt.*; +import java.util.*; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Supplier; + +import javax.annotation.Nullable; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +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.minecraft.tileentity.TileEntityFurnace; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; + +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; + import codechicken.nei.PositionedStack; + import com.gtnewhorizons.modularui.api.GlStateManager; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; @@ -17,6 +43,7 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.ProgressBar; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; import gnu.trove.map.TByteObjectMap; @@ -47,53 +74,40 @@ import gregtech.nei.HeatingCoilSpecialValueFormatter; import gregtech.nei.INEISpecialInfoFormatter; import gregtech.nei.NEIRecipeInfo; import ic2.core.Ic2Items; -import java.awt.*; -import java.util.*; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Supplier; -import javax.annotation.Nullable; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -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.minecraft.tileentity.TileEntityFurnace; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> - * This File contains the functions used for Recipes. Please do not include this File AT ALL in your Moddownload as it ruins compatibility - * This is just the Core of my Recipe System, if you just want to GET the Recipes I add, then you can access this File. - * Do NOT add Recipes using the Constructors inside this Class, The GregTech_API File calls the correct Functions for these Constructors. + * This File contains the functions used for Recipes. Please do not include this File AT ALL in your Moddownload as it + * ruins compatibility This is just the Core of my Recipe System, if you just want to GET the Recipes I add, then you + * can access this File. Do NOT add Recipes using the Constructors inside this Class, The GregTech_API File calls the + * correct Functions for these Constructors. * <p/> - * I know this File causes some Errors, because of missing Main Functions, but if you just need to compile Stuff, then remove said erroreous Functions. + * I know this File causes some Errors, because of missing Main Functions, but if you just need to compile Stuff, then + * remove said erroreous Functions. */ public class GT_Recipe implements Comparable<GT_Recipe> { + public static volatile int VERSION = 509; /** - * If you want to change the Output, feel free to modify or even replace the whole ItemStack Array, for Inputs, please add a new Recipe, because of the HashMaps. + * If you want to change the Output, feel free to modify or even replace the whole ItemStack Array, for Inputs, + * please add a new Recipe, because of the HashMaps. */ public ItemStack[] mInputs, mOutputs; /** - * If you want to change the Output, feel free to modify or even replace the whole ItemStack Array, for Inputs, please add a new Recipe, because of the HashMaps. + * If you want to change the Output, feel free to modify or even replace the whole ItemStack Array, for Inputs, + * please add a new Recipe, because of the HashMaps. */ public FluidStack[] mFluidInputs, mFluidOutputs; /** - * If you changed the amount of Array-Items inside the Output Array then the length of this Array must be larger or equal to the Output Array. A chance of 10000 equals 100% + * If you changed the amount of Array-Items inside the Output Array then the length of this Array must be larger or + * equal to the Output Array. A chance of 10000 equals 100% */ public int[] mChances; /** - * 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. + * 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; @@ -107,11 +121,14 @@ public class GT_Recipe implements Comparable<GT_Recipe> { */ public boolean mHidden = false; /** - * If this Recipe is Fake and therefore doesn't get found by the findRecipe Function (It is still in the HashMaps, so that containsInput does return T on those fake Inputs) + * If this Recipe is Fake and therefore doesn't get found by the findRecipe Function (It is still in the HashMaps, + * so that containsInput does return T on those fake Inputs) */ public boolean mFakeRecipe = false; /** - * If this Recipe can be stored inside a Machine in order to make Recipe searching more Efficient by trying the previously used Recipe first. In case you have a Recipe Map overriding things and returning one time use Recipes, you have to set this to F. + * If this Recipe can be stored inside a Machine in order to make Recipe searching more Efficient by trying the + * previously used Recipe first. In case you have a Recipe Map overriding things and returning one time use Recipes, + * you have to set this to F. */ public boolean mCanBeBuffered = true; /** @@ -150,17 +167,8 @@ 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) { + 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]; @@ -183,17 +191,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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) - for (int j = 0; j < aOutputs.length; j++) { - if (GT_Utility.areStacksEqual(aInput, aOutputs[j]) && aChances[j] >= 10000) { - if (aInput.stackSize >= aOutputs[j].stackSize) { - aInput.stackSize -= aOutputs[j].stackSize; - aOutputs[j] = null; - } else { - aOutputs[j].stackSize -= aInput.stackSize; - } + if (aInput != null && Items.feather.getDamage(aInput) != W) for (int j = 0; j < aOutputs.length; j++) { + if (GT_Utility.areStacksEqual(aInput, aOutputs[j]) && aChances[j] >= 10000) { + if (aInput.stackSize >= aOutputs[j].stackSize) { + aInput.stackSize -= aOutputs[j].stackSize; + aOutputs[j] = null; + } else { + aOutputs[j].stackSize -= aInput.stackSize; } } + } if (aOptimize && aDuration >= 32) { ArrayList<ItemStack> tList = new ArrayList<>(); @@ -201,33 +208,27 @@ public class GT_Recipe implements Comparable<GT_Recipe> { tList.addAll(Arrays.asList(aOutputs)); for (int i = 0; i < tList.size(); i++) if (tList.get(i) == null) tList.remove(i--); - for (byte i = (byte) Math.min(64, aDuration / 16); i > 1; i--) - if (aDuration / i >= 16) { - boolean temp = true; - for (ItemStack stack : tList) - if (stack.stackSize % i != 0) { - temp = false; - break; - } - if (temp) - for (FluidStack aFluidInput : aFluidInputs) - if (aFluidInput.amount % i != 0) { - temp = false; - break; - } - if (temp) - for (FluidStack aFluidOutput : aFluidOutputs) - if (aFluidOutput.amount % i != 0) { - temp = false; - break; - } - if (temp) { - for (ItemStack itemStack : tList) itemStack.stackSize /= i; - for (FluidStack aFluidInput : aFluidInputs) aFluidInput.amount /= i; - for (FluidStack aFluidOutput : aFluidOutputs) aFluidOutput.amount /= i; - aDuration /= i; - } + for (byte i = (byte) Math.min(64, aDuration / 16); i > 1; i--) if (aDuration / i >= 16) { + boolean temp = true; + for (ItemStack stack : tList) if (stack.stackSize % i != 0) { + temp = false; + break; + } + if (temp) for (FluidStack aFluidInput : aFluidInputs) if (aFluidInput.amount % i != 0) { + temp = false; + break; + } + if (temp) for (FluidStack aFluidOutput : aFluidOutputs) if (aFluidOutput.amount % i != 0) { + temp = false; + break; + } + if (temp) { + for (ItemStack itemStack : tList) itemStack.stackSize /= i; + for (FluidStack aFluidInput : aFluidInputs) aFluidInput.amount /= i; + for (FluidStack aFluidOutput : aFluidOutputs) aFluidOutput.amount /= i; + aDuration /= i; } + } } mInputs = aInputs; @@ -239,7 +240,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { mDuration = aDuration; mSpecialValue = aSpecialValue; mEUt = aEUt; - // checkCellBalance(); + // checkCellBalance(); reloadOwner(); } @@ -249,22 +250,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> { private static FluidStack[] tryGetFluidInputsFromCells(ItemStack aInput) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true); - return tFluid == null ? null : new FluidStack[] {tFluid}; + return tFluid == null ? null : new FluidStack[] { tFluid }; } // 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) { + 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}, + new ItemStack[] { aInput1 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, null, null, null, @@ -275,28 +270,28 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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); @@ -305,16 +300,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } - public GT_Recipe( - FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt, int aSpecialValue) { + 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}, + new FluidStack[] { aInput1, aInput2 }, + new FluidStack[] { aOutput1 }, Math.max(aDuration, 1), aEUt, Math.max(Math.min(aSpecialValue, 160000000), 0)); @@ -326,8 +321,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { this( true, - new ItemStack[] {aInput1}, - new ItemStack[] {aOutput1, aOutput2}, + new ItemStack[] { aInput1 }, + new ItemStack[] { aOutput1, aOutput2 }, null, null, null, @@ -340,21 +335,13 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } - public GT_Recipe( - ItemStack aInput1, - int aCellAmount, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - int aDuration, - int aEUt) { + 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}, + 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, @@ -370,14 +357,12 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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}, + 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, @@ -393,8 +378,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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}, + new ItemStack[] { aInput1, ItemList.Circuit_Integrated.getWithDamage(0, aInput1.stackSize) }, + new ItemStack[] { aOutput1 }, null, null, null, @@ -410,8 +395,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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}, + aInput2 == null ? new ItemStack[] { aInput1 } : new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput1 }, null, null, null, @@ -424,12 +409,12 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } - public GT_Recipe( - ItemStack aInput1, int aEUt, ItemStack aInput2, int aDuration, ItemStack aOutput1, ItemStack aOutput2) { + 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}, + aInput2 == null ? new ItemStack[] { aInput1 } : new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput1, aOutput2 }, null, null, null, @@ -445,8 +430,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, int aDuration) { this( true, - new ItemStack[] {aInput1}, - new ItemStack[] {aOutput1}, + new ItemStack[] { aInput1 }, + new ItemStack[] { aOutput1 }, null, null, null, @@ -462,8 +447,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt, int VACUUM) { this( true, - new ItemStack[] {aInput1}, - new ItemStack[] {aOutput1}, + new ItemStack[] { aInput1 }, + new ItemStack[] { aOutput1 }, null, null, null, @@ -483,8 +468,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { null, null, null, - new FluidStack[] {aInput1}, - new FluidStack[] {aOutput1}, + new FluidStack[] { aInput1 }, + new FluidStack[] { aOutput1 }, Math.max(aDuration, 1), aEUt, 0); @@ -494,16 +479,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } // 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) { + public GT_Recipe(ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, + FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { this( true, aInputs, @@ -575,45 +552,40 @@ 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, 1, aFluidInputs, aInputs); } // For non-multiplied recipe amount values - public boolean isRecipeInputEqual( - boolean aDecreaseStacksizeBySuccess, - boolean aDontCheckStackSizes, - FluidStack[] aFluidInputs, - ItemStack... aInputs) { + public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, + FluidStack[] aFluidInputs, ItemStack... aInputs) { return isRecipeInputEqual(aDecreaseStacksizeBySuccess, aDontCheckStackSizes, 1, aFluidInputs, aInputs); } /** * Okay, did some code archeology to figure out what's going on here. * - * <p>This variable was added in - * <a href=https://github.com/GTNewHorizons/GT5-Unofficial/commit/9959ab7443982a19ad329bca424ab515493432e9>this commit,</a> - * in order to fix the issues mentioned in - * <a href=https://github.com/GTNewHorizons/GT5-Unofficial/pull/183>the PR</a>. + * <p> + * This variable was added in <a + * href=https://github.com/GTNewHorizons/GT5-Unofficial/commit/9959ab7443982a19ad329bca424ab515493432e9>this + * commit,</a> in order to fix the issues mentioned in <a + * href=https://github.com/GTNewHorizons/GT5-Unofficial/pull/183>the PR</a>. * - * <p>It looks like it controls checking NBT. At this point, since we are still using universal - * fluid cells which store their fluids in NBT, it probably will not be safe to disable the NBT - * checks in the near future. Data sticks may be another case. Anyway, we probably can't get rid - * of this without some significant changes to clean up recipe inputs. + * <p> + * It looks like it controls checking NBT. At this point, since we are still using universal fluid cells which store + * their fluids in NBT, it probably will not be safe to disable the NBT checks in the near future. Data sticks may + * be another case. Anyway, we probably can't get rid of this without some significant changes to clean up recipe + * inputs. */ public static boolean GTppRecipeHelper; /** - * WARNING: Do not call this method with both {@code aDecreaseStacksizeBySuccess} and {@code aDontCheckStackSizes} set to {@code true}! - * You'll get weird behavior. + * 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, - int amountMultiplier, - FluidStack[] aFluidInputs, - ItemStack... aInputs) { + public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, + int amountMultiplier, FluidStack[] aFluidInputs, ItemStack... aInputs) { if (mInputs.length > 0 && aInputs == null) return false; if (mFluidInputs.length > 0 && aFluidInputs == null) return false; @@ -676,10 +648,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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)) { + || 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; } } @@ -756,16 +728,17 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } /** - * Sets description shown on NEI. - * <br>If you have a large number of recipes for the recipemap, - * this is not efficient memory wise, so use {@link GT_Recipe_Map#setNEISpecialInfoFormatter} instead. + * Sets description shown on NEI. <br> + * If you have a large number of recipes for the recipemap, this is not efficient memory wise, so use + * {@link GT_Recipe_Map#setNEISpecialInfoFormatter} instead. */ protected void setNeiDesc(String... neiDesc) { this.neiDesc = neiDesc; } /** - * Use {@link GT_Recipe_Map#getItemInputPositions} or {@link GT_Recipe_Map#getSpecialItemPosition} or {@link GT_Recipe_Map#getFluidInputPositions} instead + * Use {@link GT_Recipe_Map#getItemInputPositions} or {@link GT_Recipe_Map#getSpecialItemPosition} or + * {@link GT_Recipe_Map#getFluidInputPositions} instead */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated @@ -793,8 +766,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { if (GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace) { List<StackTraceElement> toAdd = new ArrayList<>(); for (StackTraceElement stackTrace : Thread.currentThread().getStackTrace()) { - if (excludedClasses.stream() - .noneMatch(c -> stackTrace.getClassName().equals(c))) { + if (excludedClasses.stream().noneMatch(c -> stackTrace.getClassName().equals(c))) { toAdd.add(stackTrace); } } @@ -822,8 +794,8 @@ 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 final ArrayList<GT_Recipe_AssemblyLine> sAssemblylineRecipes = new ArrayList<GT_Recipe_AssemblyLine>(); static { if (!Boolean.getBoolean("com.gtnh.gt5u.ignore-invalid-assline-recipe")) @@ -840,9 +812,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { GT_Log.err.printf("Invalid recipe: %s%n", recipe); } } - if (invalidCount > 0) - throw new RuntimeException("There are " + invalidCount - + " invalid assembly line recipe(s)! Check GregTech.log for details!"); + if (invalidCount > 0) throw new RuntimeException( + "There are " + invalidCount + " invalid assembly line recipe(s)! Check GregTech.log for details!"); } public ItemStack mResearchItem; @@ -860,14 +831,8 @@ 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) { + public GT_Recipe_AssemblyLine(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, + FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { this( aResearchItem, aResearchTime, @@ -895,15 +860,8 @@ 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) { + 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; @@ -929,7 +887,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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}); + new Object[] { totalInputStackSize, mDuration, mEUt, thisOutput, thisResearch, mResearchTime }); result = prime * result + inputFluidHash; result = prime * result + inputHash; result = prime * result + miscRecipeDataHash; @@ -982,8 +940,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } - return this.mDuration == other.mDuration - && this.mEUt == other.mEUt + return this.mDuration == other.mDuration && this.mEUt == other.mEUt && this.mResearchTime == other.mResearchTime; } @@ -996,19 +953,28 @@ 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) + '}'; + + mResearchItem + + ", mResearchTime=" + + mResearchTime + + ", mInputs=" + + Arrays.toString(mInputs) + + ", mFluidInputs=" + + Arrays.toString(mFluidInputs) + + ", mOutput=" + + mOutput + + ", mDuration=" + + mDuration + + ", mEUt=" + + mEUt + + ", mOreDictAlt=" + + Arrays.toString(mOreDictAlt) + + '}'; } /** - * @param aPersistentHash the persistent hash. it should reflect the exact input used to generate this recipe - * If 0 is passed in, the actual persistent hash will be automatically remapped to 1 instead. + * @param aPersistentHash the persistent hash. it should reflect the exact input used to generate this recipe If + * 0 is passed in, the actual persistent hash will be automatically remapped to 1 + * instead. * @throws IllegalStateException if the persistent hash has been set already */ public void setPersistentHash(int aPersistentHash) { @@ -1020,6 +986,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @SuppressWarnings("StaticInitializerReferencesSubClass") public static class GT_Recipe_Map { + /** * Contains all Recipe Maps */ @@ -1030,139 +997,132 @@ 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) - .setProgressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW); + 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).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(1000), + "gt.recipe.thermalcentrifuge", + "Thermal Centrifuge", + null, + RES_PATH_GUI + "basicmachines/ThermalCentrifuge", + 1, + 3, + 1, + 0, + 2, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_COMPRESSOR) - .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT) - .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_COMPRESSOR_STEAM) - .setProgressBarSteam(GT_UITextures.PROGRESSBAR_COMPRESS_STEAM); + new HashSet<>(750), + "gt.recipe.compressor", + "Compressor", + null, + RES_PATH_GUI + "basicmachines/Compressor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_COMPRESSOR) + .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_COMPRESSOR_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_COMPRESS_STEAM); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) - .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT) - .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE_STEAM) - .setProgressBarSteam(GT_UITextures.PROGRESSBAR_EXTRACT_STEAM); + new HashSet<>(250), + "gt.recipe.extractor", + "Extractor", + null, + RES_PATH_GUI + "basicmachines/Extractor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_EXTRACT_STEAM); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_RECYCLE) - .setProgressBar(GT_UITextures.PROGRESSBAR_RECYCLE, ProgressBar.Direction.CIRCULAR_CW); + new HashSet<>(0), + "ic.recipe.recycler", + "Recycler", + "ic2.recycler", + RES_PATH_GUI + "basicmachines/Recycler", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_RECYCLE) + .setProgressBar(GT_UITextures.PROGRESSBAR_RECYCLE, ProgressBar.Direction.CIRCULAR_CW); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_FURNACE) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM) - .setProgressBarSteam(GT_UITextures.PROGRESSBAR_ARROW_STEAM); + new HashSet<>(0), + "mc.recipe.furnace", + "Furnace", + "smelting", + RES_PATH_GUI + "basicmachines/E_Furnace", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_FURNACE) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_ARROW_STEAM); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_FURNACE) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(0), + "gt.recipe.microwave", + "Microwave", + "smelting", + RES_PATH_GUI + "basicmachines/E_Furnace", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_FURNACE) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); /** 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( @@ -1181,6 +1141,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { E, true, false) { + @Override public IDrawable getOverlayForSlot(boolean isFluid, boolean isOutput, int index, boolean isSpecial) { if (isOutput) { @@ -1200,697 +1161,654 @@ public class GT_Recipe implements Comparable<GT_Recipe> { .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_MICROSCOPE) - .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(300), + "gt.recipe.scanner", + "Scanner", + null, + RES_PATH_GUI + "basicmachines/Scanner", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_MICROSCOPE) + .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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", - 2, - 1, - 0, - 0, - 1, - E, - 1, - E, - true, - true) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) - .setProgressBar(GT_UITextures.PROGRESSBAR_MACERATE, ProgressBar.Direction.RIGHT); + new HashSet<>(200), + "gt.recipe.rockbreaker", + "Rock Breaker", + null, + RES_PATH_GUI + "basicmachines/RockBreaker", + 2, + 1, + 0, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setProgressBar(GT_UITextures.PROGRESSBAR_MACERATE, ProgressBar.Direction.RIGHT); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) - .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_UUM) - .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(100), + "gt.recipe.replicator", + "Replicator", + null, + RES_PATH_GUI + "basicmachines/Replicator", + 0, + 1, + 0, + 1, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_UUM) + .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); // 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_AssemblyLineFake( - new HashSet<>(110), - "gt.recipe.fakeAssemblylineProcess", - "Assemblyline Process", - null, - RES_PATH_GUI + "FakeAssemblyline", - 16, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - true) - .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) - .setUsualFluidInputCount(4); + new HashSet<>(110), + "gt.recipe.fakeAssemblylineProcess", + "Assemblyline Process", + null, + RES_PATH_GUI + "FakeAssemblyline", + 16, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) + .setUsualFluidInputCount(4); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(20000), + "gt.recipe.arcfurnace", + "Arc Furnace", + null, + RES_PATH_GUI + "basicmachines/ArcFurnace", + 1, + 4, + 1, + 1, + 3, + E, + 1, + E, + true, + true).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_PAGE_BLANK) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_PAGE_PRINTED) - .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_STICK) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(5), + "gt.recipe.printer", + "Printer", + null, + RES_PATH_GUI + "basicmachines/Printer", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_PAGE_BLANK) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_PAGE_PRINTED) + .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_STICK) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_SIFT, ProgressBar.Direction.DOWN); + new HashSet<>(105), + "gt.recipe.sifter", + "Sifter", + null, + RES_PATH_GUI + "basicmachines/Sifter", + 1, + 9, + 0, + 0, + 1, + E, + 1, + E, + true, + true).setProgressBar(GT_UITextures.PROGRESSBAR_SIFT, ProgressBar.Direction.DOWN); 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/Press3", - 6, - 1, - 2, - 0, - 1, - E, - 1, - E, - true, - true) - .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_PRESS_1) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_PRESS_2) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_PRESS_3) - .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT); + new HashSet<>(300), + "gt.recipe.press", + "Forming Press", + null, + RES_PATH_GUI + "basicmachines/Press3", + 6, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_PRESS_1) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_PRESS_2) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_PRESS_3) + .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT); 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/LaserEngraver2", - 4, - 4, - 0, - 0, - 1, - E, - 1, - E, - true, - true) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_LENS) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setUsualFluidInputCount(2) - .setUsualFluidOutputCount(2); + new HashSet<>(810), + "gt.recipe.laserengraver", + "Precision Laser Engraver", + null, + RES_PATH_GUI + "basicmachines/LaserEngraver2", + 4, + 4, + 0, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_LENS) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(2).setUsualFluidOutputCount(2); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) - .setProgressBar(GT_UITextures.PROGRESSBAR_MIXER, ProgressBar.Direction.CIRCULAR_CW); + new HashSet<>(900), + "gt.recipe.mixer", + "Mixer", + null, + RES_PATH_GUI + "basicmachines/Mixer6", + 9, + 4, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_MIXER, ProgressBar.Direction.CIRCULAR_CW); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) - .setSlotOverlay(false, true, true, GT_UITextures.OVERLAY_SLOT_GEM) - .setSlotOverlay(false, true, false, GT_UITextures.OVERLAY_SLOT_DUST) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(300), + "gt.recipe.autoclave", + "Autoclave", + null, + RES_PATH_GUI + "basicmachines/Autoclave4", + 2, + 4, + 1, + 1, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setSlotOverlay(false, true, true, GT_UITextures.OVERLAY_SLOT_GEM) + .setSlotOverlay(false, true, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) - .setProgressBar(GT_UITextures.PROGRESSBAR_MAGNET, ProgressBar.Direction.RIGHT); + new HashSet<>(50), + "gt.recipe.electromagneticseparator", + "Electromagnetic Separator", + null, + RES_PATH_GUI + "basicmachines/ElectromagneticSeparator", + 1, + 3, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_MAGNET, ProgressBar.Direction.RIGHT); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_MAGNET, ProgressBar.Direction.RIGHT); + new HashSet<>(300), + "gt.recipe.polarizer", + "Electromagnetic Polarizer", + null, + RES_PATH_GUI + "basicmachines/Polarizer", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setProgressBar(GT_UITextures.PROGRESSBAR_MAGNET, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) - .setProgressBar(GT_UITextures.PROGRESSBAR_MACERATE, ProgressBar.Direction.RIGHT) - .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE_STEAM) - .setSlotOverlaySteam(true, GT_UITextures.OVERLAY_SLOT_DUST_STEAM) - .setProgressBarSteam(GT_UITextures.PROGRESSBAR_MACERATE_STEAM); + new HashSet<>(16600), + "gt.recipe.macerator", + "Pulverization", + null, + RES_PATH_GUI + "basicmachines/Macerator4", + 1, + 4, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_MACERATE, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE_STEAM) + .setSlotOverlaySteam(true, GT_UITextures.OVERLAY_SLOT_DUST_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_MACERATE_STEAM); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW); + new HashSet<>(2550), + "gt.recipe.chemicalbath", + "Chemical Bath", + null, + RES_PATH_GUI + "basicmachines/ChemicalBath", + 1, + 3, + 1, + 1, + 1, + E, + 1, + E, + true, + true).setProgressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_CANISTER) - .setProgressBar(GT_UITextures.PROGRESSBAR_CANNER, ProgressBar.Direction.RIGHT); + 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).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setProgressBar(GT_UITextures.PROGRESSBAR_CANNER, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CAULDRON) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); + new HashSet<>(450), + "gt.recipe.brewer", + "Brewing Machine", + null, + RES_PATH_GUI + "basicmachines/PotionBrewer", + 1, + 0, + 1, + 1, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CAULDRON) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); 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, - 0, - 1, - E, - 1, - E, - true, - true) - .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_HEATER_1) - .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_HEATER_2) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); + new HashSet<>(10), + "gt.recipe.fluidheater", + "Fluid Heater", + null, + RES_PATH_GUI + "basicmachines/FluidHeater", + 1, + 0, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_HEATER_1) + .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_HEATER_2) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_BEAKER_1) - .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_BEAKER_2) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); + new HashSet<>(400), + "gt.recipe.distillery", + "Distillery", + null, + RES_PATH_GUI + "basicmachines/Distillery", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_BEAKER_1) + .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_BEAKER_2) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); + new HashSet<>(50), + "gt.recipe.fermenter", + "Fermenter", + null, + RES_PATH_GUI + "basicmachines/Fermenter", + 0, + 0, + 0, + 1, + 1, + E, + 1, + E, + true, + true).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_MOLD) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(35000), + "gt.recipe.fluidsolidifier", + "Fluid Solidifier", + null, + RES_PATH_GUI + "basicmachines/FluidSolidifier", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_MOLD) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) - .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); + new HashSet<>(15000), + "gt.recipe.fluidextractor", + "Fluid Extractor", + null, + RES_PATH_GUI + "basicmachines/FluidExtractor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_BOX) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_BOXED) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(2500), + "gt.recipe.packager", + "Packager", + null, + RES_PATH_GUI + "basicmachines/Packager", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_BOX) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_BOXED) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_BOXED) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(2500), + "gt.recipe.unpackager", + "Unpackager", + null, + RES_PATH_GUI + "basicmachines/Unpackager", + 1, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_BOXED) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sFusionRecipes = new GT_Recipe_Map_FluidOnly( - new HashSet<>(50), - "gt.recipe.fusionreactor", - "Fusion Reactor", - null, - RES_PATH_GUI + "basicmachines/FusionReactor", - 0, - 0, - 0, - 2, - 1, - "Start: ", - 1, - " EU", - true, - true) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setUsualFluidInputCount(2) - .setNEISpecialInfoFormatter(FusionSpecialValueFormatter.INSTANCE); + new HashSet<>(50), + "gt.recipe.fusionreactor", + "Fusion Reactor", + null, + RES_PATH_GUI + "basicmachines/FusionReactor", + 0, + 0, + 0, + 2, + 1, + "Start: ", + 1, + " EU", + true, + true).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(2).setNEISpecialInfoFormatter(FusionSpecialValueFormatter.INSTANCE); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setUsualFluidInputCount(16) - .setUsualFluidOutputCount(16) - .setNEITransferRect(new Rectangle(79, 34, 18, 18)) - .setLogoPos(80, 61) - .setNEISpecialInfoFormatter(FusionSpecialValueFormatter.INSTANCE); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(16).setUsualFluidOutputCount(16) + .setNEITransferRect(new Rectangle(79, 34, 18, 18)).setLogoPos(80, 61) + .setNEISpecialInfoFormatter(FusionSpecialValueFormatter.INSTANCE); 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) - .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) - .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE_FLUID) - .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); + new HashSet<>(1200), + "gt.recipe.centrifuge", + "Centrifuge", + null, + RES_PATH_GUI + "basicmachines/Centrifuge", + 2, + 6, + 0, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE_FLUID) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_CHARGER) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) - .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_CHARGER_FLUID) - .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); + new HashSet<>(300), + "gt.recipe.electrolyzer", + "Electrolyzer", + null, + RES_PATH_GUI + "basicmachines/Electrolyzer", + 2, + 6, + 0, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_CHARGER) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_CHARGER_FLUID) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setNEISpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setNEISpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE); public static final GT_Recipe_Map sPlasmaForgeRecipes = new GT_Recipe_Map_LargeNEI( - new HashSet<>(20), - "gt.recipe.plasmaforge", - "DTPF", - null, - RES_PATH_GUI + "basicmachines/PlasmaForge", - 9, - 9, - 0, - 0, - 1, - "Heat Capacity: ", - 1, - " K", - false, - true) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setUsualFluidInputCount(9) - .setUsualFluidOutputCount(9) - .setNEISpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE); + new HashSet<>(20), + "gt.recipe.plasmaforge", + "DTPF", + null, + RES_PATH_GUI + "basicmachines/PlasmaForge", + 9, + 9, + 0, + 0, + 1, + "Heat Capacity: ", + 1, + " K", + false, + true).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(9).setUsualFluidOutputCount(9) + .setNEISpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_IMPLOSION) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_EXPLOSIVE) - .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT); + new HashSet<>(900), + "gt.recipe.implosioncompressor", + "Implosion Compressor", + null, + RES_PATH_GUI + "basicmachines/Default", + 2, + 2, + 2, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_IMPLOSION) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_EXPLOSIVE) + .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setUsualFluidInputCount(2); + new HashSet<>(305), + "gt.recipe.vacuumfreezer", + "Vacuum Freezer", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + E, + 1, + E, + false, + true).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(2); 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) - .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_MOLECULAR_1) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_MOLECULAR_2) - .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_MOLECULAR_3) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_VIAL_1) - .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_VIAL_2) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); + new HashSet<>(1170), + "gt.recipe.chemicalreactor", + "Chemical Reactor", + null, + RES_PATH_GUI + "basicmachines/ChemicalReactor", + 2, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_MOLECULAR_1) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_MOLECULAR_2) + .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_MOLECULAR_3) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_VIAL_1) + .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_VIAL_2) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sMultiblockChemicalRecipes = new GT_Recipe_Map_LargeChemicalReactor() .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT) - .setUsualFluidInputCount(6) - .setUsualFluidOutputCount(6); + .setUsualFluidInputCount(6).setUsualFluidOutputCount(6); public static final GT_Recipe_Map sDistillationRecipes = new GT_Recipe_Map_DistillationTower() .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT) .setUsualFluidOutputCount(11); - public static final GT_Recipe_Map_OilCracker sCrackingRecipes = - (GT_Recipe_Map_OilCracker) new GT_Recipe_Map_OilCracker() - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT) - .setUsualFluidInputCount(2); + public static final GT_Recipe_Map_OilCracker sCrackingRecipes = (GT_Recipe_Map_OilCracker) new GT_Recipe_Map_OilCracker() + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(2); /** * Use sCrackingRecipes instead */ @@ -1898,344 +1816,325 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(150), + "gt.recipe.pyro", + "Pyrolyse Oven", + null, + RES_PATH_GUI + "basicmachines/Default", + 2, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sWiremillRecipes = new GT_Recipe_Map( - new HashSet<>(450), - "gt.recipe.wiremill", - "Wiremill", - null, - RES_PATH_GUI + "basicmachines/Wiremill", - 2, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - true) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_WIREMILL) - .setProgressBar(GT_UITextures.PROGRESSBAR_WIREMILL, ProgressBar.Direction.RIGHT); + new HashSet<>(450), + "gt.recipe.wiremill", + "Wiremill", + null, + RES_PATH_GUI + "basicmachines/Wiremill", + 2, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_WIREMILL) + .setProgressBar(GT_UITextures.PROGRESSBAR_WIREMILL, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_BENDER) - .setProgressBar(GT_UITextures.PROGRESSBAR_BENDING, ProgressBar.Direction.RIGHT); + new HashSet<>(5000), + "gt.recipe.metalbender", + "Bending Machine", + null, + RES_PATH_GUI + "basicmachines/Bender", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_BENDER) + .setProgressBar(GT_UITextures.PROGRESSBAR_BENDING, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_FURNACE) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM) - .setProgressBarSteam(GT_UITextures.PROGRESSBAR_ARROW_STEAM); + new HashSet<>(12000), + "gt.recipe.alloysmelter", + "Alloy Smelter", + null, + RES_PATH_GUI + "basicmachines/AlloySmelter", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_FURNACE) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_ARROW_STEAM); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CIRCUIT) - .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT); + new HashSet<>(8200), + "gt.recipe.assembler", + "Assembler", + null, + RES_PATH_GUI + "basicmachines/Assembler2", + 9, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CIRCUIT) + .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT); 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) - .setNEIUnificateOutput(!Loader.isModLoaded("neicustomdiagram")) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CIRCUIT) - .setProgressBar(GT_UITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER, ProgressBar.Direction.RIGHT); + new HashSet<>(605), + "gt.recipe.circuitassembler", + "Circuit Assembler", + null, + RES_PATH_GUI + "basicmachines/CircuitAssembler", + 6, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setNEIUnificateOutput(!Loader.isModLoaded("neicustomdiagram")) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CIRCUIT) + .setProgressBar(GT_UITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_CANNER) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) - .setProgressBar(GT_UITextures.PROGRESSBAR_CANNER, ProgressBar.Direction.RIGHT); + new HashSet<>(900), + "gt.recipe.canner", + "Canning Machine", + null, + RES_PATH_GUI + "basicmachines/Canner", + 2, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_CANNER) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setProgressBar(GT_UITextures.PROGRESSBAR_CANNER, ProgressBar.Direction.RIGHT); 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(100), + "gt.recipe.cncmachine", + "CNC Machine", + null, + RES_PATH_GUI + "basicmachines/Default", + 2, + 1, + 2, + 1, + 1, + E, + 1, + E, + true, + true).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_ROD_1) - .setSlotOverlay(false, true, true, GT_UITextures.OVERLAY_SLOT_ROD_2) - .setSlotOverlay(false, true, false, GT_UITextures.OVERLAY_SLOT_DUST) - .setProgressBar(GT_UITextures.PROGRESSBAR_LATHE, ProgressBar.Direction.RIGHT) - .addSpecialTexture(5, 18, 98, 24, GT_UITextures.PROGRESSBAR_LATHE_BASE); + new HashSet<>(1150), + "gt.recipe.lathe", + "Lathe", + null, + RES_PATH_GUI + "basicmachines/Lathe", + 1, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_ROD_1) + .setSlotOverlay(false, true, true, GT_UITextures.OVERLAY_SLOT_ROD_2) + .setSlotOverlay(false, true, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_LATHE, ProgressBar.Direction.RIGHT) + .addSpecialTexture(5, 18, 98, 24, GT_UITextures.PROGRESSBAR_LATHE_BASE); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_BOX) - .setSlotOverlay(false, true, true, GT_UITextures.OVERLAY_SLOT_CUTTER_SLICED) - .setSlotOverlay(false, true, false, GT_UITextures.OVERLAY_SLOT_DUST) - .setProgressBar(GT_UITextures.PROGRESSBAR_CUT, ProgressBar.Direction.RIGHT); + new HashSet<>(5125), + "gt.recipe.cuttingsaw", + "Cutting Machine", + null, + RES_PATH_GUI + "basicmachines/Cutter4", + 2, + 4, + 1, + 1, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_BOX) + .setSlotOverlay(false, true, true, GT_UITextures.OVERLAY_SLOT_CUTTER_SLICED) + .setSlotOverlay(false, true, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_CUT, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_SQUARE) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_SLICE_SHAPE) - .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_SLICER_SLICED) - .setProgressBar(GT_UITextures.PROGRESSBAR_SLICE, ProgressBar.Direction.RIGHT); + new HashSet<>(20), + "gt.recipe.slicer", + "Slicing Machine", + null, + RES_PATH_GUI + "basicmachines/Slicer", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_SQUARE) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_SLICE_SHAPE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_SLICER_SLICED) + .setProgressBar(GT_UITextures.PROGRESSBAR_SLICE, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_EXTRUDER_SHAPE) - .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRUDE, ProgressBar.Direction.RIGHT); + new HashSet<>(13000), + "gt.recipe.extruder", + "Extruder", + null, + RES_PATH_GUI + "basicmachines/Extruder", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_EXTRUDER_SHAPE) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRUDE, ProgressBar.Direction.RIGHT); 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", - 2, - 2, - 1, - 0, - 1, - E, - 1, - E, - true, - true) - .setUsualFluidInputCount(2) - .setUsualFluidOutputCount(2) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_HAMMER) - .setProgressBar(GT_UITextures.PROGRESSBAR_HAMMER, ProgressBar.Direction.DOWN) - .addSpecialTexture(20, 6, 78, 42, GT_UITextures.PROGRESSBAR_HAMMER_BASE) - .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_HAMMER_STEAM) - .setProgressBarSteam(GT_UITextures.PROGRESSBAR_HAMMER_STEAM) - .addSpecialTextureSteam(20, 6, 78, 42, GT_UITextures.PROGRESSBAR_HAMMER_BASE_STEAM); + new HashSet<>(3800), + "gt.recipe.hammer", + "Forge Hammer", + null, + RES_PATH_GUI + "basicmachines/Hammer", + 2, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setUsualFluidInputCount(2).setUsualFluidOutputCount(2) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_HAMMER) + .setProgressBar(GT_UITextures.PROGRESSBAR_HAMMER, ProgressBar.Direction.DOWN) + .addSpecialTexture(20, 6, 78, 42, GT_UITextures.PROGRESSBAR_HAMMER_BASE) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_HAMMER_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_HAMMER_STEAM) + .addSpecialTextureSteam(20, 6, 78, 42, GT_UITextures.PROGRESSBAR_HAMMER_BASE_STEAM); 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) - .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) - .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_UUA) - .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); + new HashSet<>(2), + "gt.recipe.uuamplifier", + "Amplifabricator", + null, + RES_PATH_GUI + "basicmachines/Amplifabricator", + 1, + 0, + 1, + 0, + 1, + E, + 1, + E, + true, + true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) + .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_UUA) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); 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) - .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_UUA) - .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_UUM) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + new HashSet<>(2), + "gt.recipe.massfab", + "Mass Fabrication", + null, + RES_PATH_GUI + "basicmachines/Massfabricator", + 1, + 0, + 1, + 0, + 8, + E, + 1, + E, + true, + true).setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_UUA) + .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_UUM) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sDieselFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sExtremeDieselFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sTurbineFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel( new HashSet<>(10), "gt.recipe.thermalgeneratorfuel", @@ -2253,160 +2152,149 @@ public class GT_Recipe implements Comparable<GT_Recipe> { true, false); public static final GT_Recipe_Map_Fuel sDenseLiquidFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sPlasmaFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sMagicFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sSmallNaquadahReactorFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sHugeNaquadahReactorFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); - public static final GT_Recipe_Map_Fuel sExtremeNaquadahReactorFuels = - (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); - public static final GT_Recipe_Map_Fuel sUltraHugeNaquadahReactorFuels = - (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + public static final GT_Recipe_Map_Fuel sExtremeNaquadahReactorFuels = (GT_Recipe_Map_Fuel) 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + public static final GT_Recipe_Map_Fuel sUltraHugeNaquadahReactorFuels = (GT_Recipe_Map_Fuel) 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = (GT_Recipe_Map_Fuel) 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) - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + 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).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sMultiblockElectrolyzerRecipes = new GT_Recipe_Map( new HashSet<>(300), "gt.recipe.largeelectrolyzer", @@ -2455,77 +2343,72 @@ public class GT_Recipe implements Comparable<GT_Recipe> { "", true, false); - public static final GT_Recipe_Map_LargeBoilerFakeFuels sLargeBoilerFakeFuels = - (GT_Recipe_Map_LargeBoilerFakeFuels) new GT_Recipe_Map_LargeBoilerFakeFuels() - .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + public static final GT_Recipe_Map_LargeBoilerFakeFuels sLargeBoilerFakeFuels = (GT_Recipe_Map_LargeBoilerFakeFuels) new GT_Recipe_Map_LargeBoilerFakeFuels() + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sNanoForge = new GT_Recipe_Map( - new HashSet<>(10), - "gt.recipe.nanoforge", - "Nano Forge", - null, - RES_PATH_GUI + "basicmachines/LCRNEI", - 6, - 2, - 2, - 1, - 1, - "Tier: ", - 1, - "", - false, - true) - .useModularUI(true) - .setUsualFluidInputCount(3) - .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_LENS) - .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT); + new HashSet<>(10), + "gt.recipe.nanoforge", + "Nano Forge", + null, + RES_PATH_GUI + "basicmachines/LCRNEI", + 6, + 2, + 2, + 1, + 1, + "Tier: ", + 1, + "", + false, + true).useModularUI(true).setUsualFluidInputCount(3) + .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_LENS) + .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sPCBFactory = new GT_Recipe_Map( - new HashSet<>(10), - "gt.recipe.pcbfactory", - "PCB Factory", - null, - RES_PATH_GUI + "basicmachines/LCRNEI", - 6, - 9, - 3, - 1, - 1, - E, - 0, - E, - true, - true) - .useModularUI(true) - .setUsualFluidInputCount(3) - .setUsualFluidOutputCount(0) - .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT) - .setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> { - List<String> result = new ArrayList<>(); - int bitmap = recipeInfo.recipe.mSpecialValue; - if ((bitmap & 0b1) > 0) { - result.add(GT_Utility.trans("336", "PCB Factory Tier: ") + 1); - } else if ((bitmap & 0b10) > 0) { - result.add(GT_Utility.trans("336", "PCB Factory Tier: ") + 2); - } else if ((bitmap & 0b100) > 0) { - result.add(GT_Utility.trans("336", "PCB Factory Tier: ") + 3); - } - if ((bitmap & 0b1000) > 0) { - result.add(GT_Utility.trans("337", "Upgrade Required: ") + GT_Utility.trans("338", "Bio")); - } - return result; - }); + new HashSet<>(10), + "gt.recipe.pcbfactory", + "PCB Factory", + null, + RES_PATH_GUI + "basicmachines/LCRNEI", + 6, + 9, + 3, + 1, + 1, + E, + 0, + E, + true, + true).useModularUI(true).setUsualFluidInputCount(3).setUsualFluidOutputCount(0) + .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT) + .setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> { + List<String> result = new ArrayList<>(); + int bitmap = recipeInfo.recipe.mSpecialValue; + if ((bitmap & 0b1) > 0) { + result.add(GT_Utility.trans("336", "PCB Factory Tier: ") + 1); + } else if ((bitmap & 0b10) > 0) { + result.add(GT_Utility.trans("336", "PCB Factory Tier: ") + 2); + } else if ((bitmap & 0b100) > 0) { + result.add(GT_Utility.trans("336", "PCB Factory Tier: ") + 3); + } + if ((bitmap & 0b1000) > 0) { + result.add( + GT_Utility.trans("337", "Upgrade Required: ") + GT_Utility.trans("338", "Bio")); + } + return result; + }); public static final GT_Recipe_Map_IC2NuclearFake sIC2NuclearFakeRecipe = new GT_Recipe_Map_IC2NuclearFake(); /** * 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<>(); /** @@ -2546,12 +2429,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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; /** @@ -2560,8 +2439,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public boolean mNEIUnificateOutput = true; /** - * Unique identifier for this recipe map. Generated from aUnlocalizedName and a few other parameters. - * See constructor for details. + * Unique identifier for this recipe map. Generated from aUnlocalizedName and a few other parameters. See + * constructor for details. */ public final String mUniqueIdentifier; @@ -2576,14 +2455,14 @@ public class GT_Recipe implements Comparable<GT_Recipe> { private boolean mUsesSpecialSlot = false; /** - * How many fluid inputs does this recipemap has at most. Currently used only for NEI slot placements - * and does not actually restrict number of fluids used in the recipe. + * How many fluid inputs does this recipemap has at most. Currently used only for NEI slot placements and does + * not actually restrict number of fluids used in the recipe. */ private int usualFluidInputCount; /** - * How many fluid outputs does this recipemap has at most. Currently used only for NEI slot placements - * and does not actually restrict number of fluids used in the recipe. + * How many fluid outputs does this recipemap has at most. Currently used only for NEI slot placements and does + * not actually restrict number of fluids used in the recipe. */ private int usualFluidOutputCount; @@ -2593,36 +2472,28 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public boolean useModularUI = false; /** - * Overlays used for GUI. - * 1 = If it's fluid slot. - * 2 = If it's output slot. - * 4 = If it's first slot in the same section, e.g. first slot in the item output slots - * 8 = If it's special item slot. + * Overlays used for GUI. 1 = If it's fluid slot. 2 = If it's output slot. 4 = If it's first slot in the same + * section, e.g. first slot in the item output slots 8 = If it's special item slot. */ private final TByteObjectMap<IDrawable> slotOverlays = new TByteObjectHashMap<>(); /** - * Overlays used for GUI on steam machine. - * 1 = If it's fluid slot. - * 2 = If it's output slot. - * 4 = If it's first slot in the same section, e.g. first slot in the item output slots - * 8 = If it's special item slot. + * Overlays used for GUI on steam machine. 1 = If it's fluid slot. 2 = If it's output slot. 4 = If it's first + * slot in the same section, e.g. first slot in the item output slots 8 = If it's special item slot. */ private final TByteObjectMap<SteamTexture> slotOverlaysSteam = new TByteObjectHashMap<>(); /** - * Progressbar used for BasicMachine GUI and/or NEI. - * Unless specified, size should be (20, 36), consisting of two parts; - * First is (20, 18) size of "empty" image at the top, - * Second is (20, 18) size of "filled" image at the bottom. + * Progressbar used for BasicMachine GUI and/or NEI. Unless specified, size should be (20, 36), consisting of + * two parts; First is (20, 18) size of "empty" image at the top, Second is (20, 18) size of "filled" image at + * the bottom. */ private FallbackableUITexture progressBarTexture; /** - * Progressbar used for steam machine GUI and/or NEI. - * Unless specified, size should be (20, 36), consisting of two parts; - * First is (20, 18) size of "empty" image at the top, - * Second is (20, 18) size of "filled" image at the bottom. + * Progressbar used for steam machine GUI and/or NEI. Unless specified, size should be (20, 36), consisting of + * two parts; First is (20, 18) size of "empty" image at the top, Second is (20, 18) size of "filled" image at + * the bottom. */ private FallbackableSteamTexture progressBarTextureSteam; @@ -2633,7 +2504,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public Pos2d progressBarPos = new Pos2d(78, 24); public Rectangle neiTransferRect = new Rectangle( - progressBarPos.x - (16 / 2), progressBarPos.y, progressBarSize.width + 16, progressBarSize.height); + progressBarPos.x - (16 / 2), + progressBarPos.y, + progressBarSize.width + 16, + progressBarSize.height); /** * Image size in direction of progress. Used for non-smooth rendering. @@ -2668,10 +2542,12 @@ public class GT_Recipe implements Comparable<GT_Recipe> { /** * Initialises a new type of Recipe Handler. * - * @param aRecipeList a List you specify as Recipe List. Usually just an ArrayList with a pre-initialised Size. + * @param aRecipeList a List you specify as Recipe List. Usually just an ArrayList with a + * pre-initialised Size. * @param aUnlocalizedName the unlocalised Name of this Recipe Handler, used mainly for NEI. * @param aLocalName the displayed Name inside the NEI Recipe GUI. - * @param aNEIGUIPath the displayed GUI Texture, usually just a Machine GUI. Auto-Attaches ".png" if forgotten. + * @param aNEIGUIPath the displayed GUI Texture, usually just a Machine GUI. Auto-Attaches ".png" + * if forgotten. * @param aUsualInputCount the usual amount of Input Slots this Recipe Class has. * @param aUsualOutputCount the usual amount of Output Slots this Recipe Class has. * @param aNEISpecialValuePre the String in front of the Special Value in NEI. @@ -2679,21 +2555,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * @param aNEISpecialValuePost the String after the Special Value. Usually for a Unit or something. * @param aNEIAllowed if NEI is allowed to display this Recipe Handler in general. */ - 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, + 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) { sMappings.add(this); mNEIAllowed = aNEIAllowed; @@ -2729,23 +2594,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Deprecated - 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) { this( aRecipeList, aUnlocalizedName, @@ -2775,8 +2628,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return this; } - public GT_Recipe_Map setSlotOverlay( - boolean isFluid, boolean isOutput, boolean isFirst, boolean isSpecial, IDrawable slotOverlay) { + public GT_Recipe_Map setSlotOverlay(boolean isFluid, boolean isOutput, boolean isFirst, boolean isSpecial, + IDrawable slotOverlay) { useModularUI(true); this.slotOverlays.put( (byte) ((isFluid ? 1 : 0) + (isOutput ? 2 : 0) + (isFirst ? 4 : 0) + (isSpecial ? 8 : 0)), @@ -2793,8 +2646,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { .setSlotOverlay(isFluid, isOutput, false, slotOverlay); } - public GT_Recipe_Map setSlotOverlaySteam( - boolean isFluid, boolean isOutput, boolean isFirst, boolean isSpecial, SteamTexture slotOverlay) { + public GT_Recipe_Map setSlotOverlaySteam(boolean isFluid, boolean isOutput, boolean isFirst, boolean isSpecial, + SteamTexture slotOverlay) { useModularUI(true); this.slotOverlaysSteam.put( (byte) ((isFluid ? 1 : 0) + (isOutput ? 2 : 0) + (isFirst ? 4 : 0) + (isSpecial ? 8 : 0)), @@ -2814,7 +2667,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public GT_Recipe_Map setProgressBar(UITexture progressBarTexture, ProgressBar.Direction progressBarDirection) { return setProgressBarWithFallback( new FallbackableUITexture( - UITexture.fullImage("gregtech", "gui/progressbar/" + mUnlocalizedName), progressBarTexture), + UITexture.fullImage("gregtech", "gui/progressbar/" + mUnlocalizedName), + progressBarTexture), progressBarDirection); } @@ -2823,12 +2677,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } /** - * Some resource packs want to use custom progress bar textures even for plain arrow. - * This method allows them to add unique textures, yet other packs don't need to make textures - * for every recipemap. + * Some resource packs want to use custom progress bar textures even for plain arrow. This method allows them to + * add unique textures, yet other packs don't need to make textures for every recipemap. */ - public GT_Recipe_Map setProgressBarWithFallback( - FallbackableUITexture progressBarTexture, ProgressBar.Direction progressBarDirection) { + public GT_Recipe_Map setProgressBarWithFallback(FallbackableUITexture progressBarTexture, + ProgressBar.Direction progressBarDirection) { useModularUI(true); this.progressBarTexture = progressBarTexture; this.progressBarDirection = progressBarDirection; @@ -2836,9 +2689,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } public GT_Recipe_Map setProgressBarSteam(SteamTexture progressBarTexture) { - return setProgressBarSteamWithFallback(new FallbackableSteamTexture( - SteamTexture.fullImage("gregtech", "gui/progressbar/" + mUnlocalizedName + "_%s"), - progressBarTexture)); + return setProgressBarSteamWithFallback( + new FallbackableSteamTexture( + SteamTexture.fullImage("gregtech", "gui/progressbar/" + mUnlocalizedName + "_%s"), + progressBarTexture)); } public GT_Recipe_Map setProgressBarSteamWithFallback(FallbackableSteamTexture progressBarTexture) { @@ -2872,15 +2726,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public GT_Recipe_Map addSpecialTexture(int width, int height, int x, int y, IDrawable texture) { useModularUI(true); - specialTextures.add( - new ImmutablePair<>(texture, new ImmutablePair<>(new Size(width, height), new Pos2d(x, y)))); + specialTextures + .add(new ImmutablePair<>(texture, new ImmutablePair<>(new Size(width, height), new Pos2d(x, y)))); return this; } public GT_Recipe_Map addSpecialTextureSteam(int width, int height, int x, int y, SteamTexture texture) { useModularUI(true); - specialTexturesSteam.add( - new ImmutablePair<>(texture, new ImmutablePair<>(new Size(width, height), new Pos2d(x, y)))); + specialTexturesSteam + .add(new ImmutablePair<>(texture, new ImmutablePair<>(new Size(width, height), new Pos2d(x, y)))); return this; } @@ -2931,37 +2785,25 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return this; } - public GT_Recipe addRecipe( - boolean aOptimize, - ItemStack[] aInputs, - ItemStack[] aOutputs, - Object aSpecial, - int[] aOutputChances, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - int aDuration, - int aEUt, + 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)); + 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) { + public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, + int aDuration, int aEUt, int aSpecialValue) { return addRecipe( new GT_Recipe( false, @@ -2979,35 +2821,28 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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(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) @@ -3019,19 +2854,12 @@ 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 + * 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) { + 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( @@ -3048,17 +2876,11 @@ 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 + * 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, + 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, @@ -3075,17 +2897,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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) { + 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( @@ -3102,18 +2916,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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) { + 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( @@ -3132,7 +2937,8 @@ 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 + * 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, GT_Recipe aRecipe) { return addRecipe(aRecipe, aCheckForCollisions, true, false); @@ -3146,8 +2952,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()); } @@ -3174,9 +2980,8 @@ 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))); } /** @@ -3193,79 +2998,66 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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) { + 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); + 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, 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) { + 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); + 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) { + 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. * - * @param aTileEntity an Object representing the current coordinates of the executing Block/Entity/Whatever. This may be null, especially during Startup. - * @param aRecipe in case this is != null it will try to use this Recipe first when looking things up. - * @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs - * @param aDontCheckStackSizes if set to false will only return recipes that can be executed at least once with the provided input - * @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage - * @param aFluids the Fluid Inputs - * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with this, but some custom ones do. - * @param aInputs the Item Inputs + * @param aTileEntity an Object representing the current coordinates of the executing + * Block/Entity/Whatever. This may be null, especially during Startup. + * @param aRecipe in case this is != null it will try to use this Recipe first when looking things + * up. + * @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs + * @param aDontCheckStackSizes if set to false will only return recipes that can be executed at least once with + * the provided input + * @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage + * @param aFluids the Fluid Inputs + * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with + * this, but some custom ones do. + * @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, + 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; @@ -3293,54 +3085,41 @@ public class GT_Recipe implements Comparable<GT_Recipe> { if (aNotUnificated) aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs); // 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)) - return aRecipe.mEnabled && aVoltage * mAmperage >= aRecipe.mEUt ? aRecipe : null; + if (aRecipe != null) 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 (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; } protected GT_Recipe addToItemMap(GT_Recipe aRecipe) { - for (ItemStack aStack : aRecipe.mInputs) - if (aStack != null) { - GT_ItemStack tStack = new GT_ItemStack(aStack); - Collection<GT_Recipe> tList = mRecipeItemMap.computeIfAbsent(tStack, k -> new HashSet<>(1)); - tList.add(aRecipe); - } + for (ItemStack aStack : aRecipe.mInputs) if (aStack != null) { + GT_ItemStack tStack = new GT_ItemStack(aStack); + Collection<GT_Recipe> tList = mRecipeItemMap.computeIfAbsent(tStack, k -> new HashSet<>(1)); + tList.add(aRecipe); + } return aRecipe; } @@ -3375,8 +3154,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @Nullable public IDrawable getOverlayForSlot(boolean isFluid, boolean isOutput, int index, boolean isSpecial) { - byte overlayKey = - (byte) ((isFluid ? 1 : 0) + (isOutput ? 2 : 0) + (index == 0 ? 4 : 0) + (isSpecial ? 8 : 0)); + byte overlayKey = (byte) ((isFluid ? 1 : 0) + (isOutput ? 2 : 0) + + (index == 0 ? 4 : 0) + + (isSpecial ? 8 : 0)); if (slotOverlays.containsKey(overlayKey)) { return slotOverlays.get(overlayKey); } @@ -3385,8 +3165,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @Nullable public SteamTexture getOverlayForSlotSteam(boolean isFluid, boolean isOutput, int index, boolean isSpecial) { - byte overlayKey = - (byte) ((isFluid ? 1 : 0) + (isOutput ? 2 : 0) + (index == 0 ? 4 : 0) + (isSpecial ? 8 : 0)); + byte overlayKey = (byte) ((isFluid ? 1 : 0) + (isOutput ? 2 : 0) + + (index == 0 ? 4 : 0) + + (isSpecial ? 8 : 0)); if (slotOverlaysSteam.containsKey(overlayKey)) { return slotOverlaysSteam.get(overlayKey); } @@ -3432,41 +3213,31 @@ public class GT_Recipe implements Comparable<GT_Recipe> { /** * Adds slot backgrounds, progressBar, etc. */ - public ModularWindow.Builder createNEITemplate( - IItemHandlerModifiable itemInputsInventory, - IItemHandlerModifiable itemOutputsInventory, - IItemHandlerModifiable specialSlotInventory, - IItemHandlerModifiable fluidInputsInventory, - IItemHandlerModifiable fluidOutputsInventory, - Supplier<Float> progressSupplier, - Pos2d windowOffset) { - ModularWindow.Builder builder = - ModularWindow.builder(neiBackgroundSize).setBackground(ModularUITextures.VANILLA_BACKGROUND); + public ModularWindow.Builder createNEITemplate(IItemHandlerModifiable itemInputsInventory, + IItemHandlerModifiable itemOutputsInventory, IItemHandlerModifiable specialSlotInventory, + IItemHandlerModifiable fluidInputsInventory, IItemHandlerModifiable fluidOutputsInventory, + Supplier<Float> progressSupplier, Pos2d windowOffset) { + ModularWindow.Builder builder = ModularWindow.builder(neiBackgroundSize) + .setBackground(ModularUITextures.VANILLA_BACKGROUND); UIHelper.forEachSlots( - (i, backgrounds, pos) -> builder.widget(SlotWidget.phantom(itemInputsInventory, i) - .setBackground(backgrounds) - .setPos(pos) - .setSize(18, 18)), - (i, backgrounds, pos) -> builder.widget(SlotWidget.phantom(itemOutputsInventory, i) - .setBackground(backgrounds) - .setPos(pos) - .setSize(18, 18)), + (i, backgrounds, pos) -> builder.widget( + SlotWidget.phantom(itemInputsInventory, i).setBackground(backgrounds).setPos(pos) + .setSize(18, 18)), + (i, backgrounds, pos) -> builder.widget( + SlotWidget.phantom(itemOutputsInventory, i).setBackground(backgrounds).setPos(pos) + .setSize(18, 18)), (i, backgrounds, pos) -> { - if (usesSpecialSlot()) - builder.widget(SlotWidget.phantom(specialSlotInventory, 0) - .setBackground(backgrounds) - .setPos(pos) - .setSize(18, 18)); + if (usesSpecialSlot()) builder.widget( + SlotWidget.phantom(specialSlotInventory, 0).setBackground(backgrounds).setPos(pos) + .setSize(18, 18)); }, - (i, backgrounds, pos) -> builder.widget(SlotWidget.phantom(fluidInputsInventory, i) - .setBackground(backgrounds) - .setPos(pos) - .setSize(18, 18)), - (i, backgrounds, pos) -> builder.widget(SlotWidget.phantom(fluidOutputsInventory, i) - .setBackground(backgrounds) - .setPos(pos) - .setSize(18, 18)), + (i, backgrounds, pos) -> builder.widget( + SlotWidget.phantom(fluidInputsInventory, i).setBackground(backgrounds).setPos(pos) + .setSize(18, 18)), + (i, backgrounds, pos) -> builder.widget( + SlotWidget.phantom(fluidOutputsInventory, i).setBackground(backgrounds).setPos(pos) + .setSize(18, 18)), ModularUITextures.ITEM_SLOT, ModularUITextures.FLUID_SLOT, this, @@ -3481,29 +3252,25 @@ public class GT_Recipe implements Comparable<GT_Recipe> { addGregTechLogoUI(builder, windowOffset); for (Pair<IDrawable, Pair<Size, Pos2d>> specialTexture : specialTextures) { - builder.widget(new DrawableWidget() - .setDrawable(specialTexture.getLeft()) - .setSize(specialTexture.getRight().getLeft()) - .setPos(specialTexture.getRight().getRight().add(windowOffset))); + builder.widget( + new DrawableWidget().setDrawable(specialTexture.getLeft()) + .setSize(specialTexture.getRight().getLeft()) + .setPos(specialTexture.getRight().getRight().add(windowOffset))); } return builder; } - public void addProgressBarUI( - ModularWindow.Builder builder, Supplier<Float> progressSupplier, Pos2d windowOffset) { - builder.widget(new ProgressBar() - .setTexture(getProgressBarTexture(), 20) - .setDirection(progressBarDirection) - .setProgress(progressSupplier) - .setSynced(false, false) - .setPos(progressBarPos.add(windowOffset)) - .setSize(progressBarSize)); + public void addProgressBarUI(ModularWindow.Builder builder, Supplier<Float> progressSupplier, + Pos2d windowOffset) { + builder.widget( + new ProgressBar().setTexture(getProgressBarTexture(), 20).setDirection(progressBarDirection) + .setProgress(progressSupplier).setSynced(false, false) + .setPos(progressBarPos.add(windowOffset)).setSize(progressBarSize)); } public void addGregTechLogoUI(ModularWindow.Builder builder, Pos2d windowOffset) { - builder.widget( - new DrawableWidget().setDrawable(logo).setSize(logoSize).setPos(logoPos.add(windowOffset))); + builder.widget(new DrawableWidget().setDrawable(logo).setSize(logoSize).setPos(logoPos.add(windowOffset))); } /** @@ -3604,7 +3371,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } else if (neiSpecialInfoFormatter != null) { drawNEITextMultipleLines( - recipeInfo, neiSpecialInfoFormatter.format(recipeInfo, this::formatSpecialValue)); + recipeInfo, + neiSpecialInfoFormatter.format(recipeInfo, this::formatSpecialValue)); } else { drawOptionalNEIText(recipeInfo, getNEISpecialInfo(recipeInfo.recipe.mSpecialValue)); } @@ -3632,8 +3400,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } protected String formatSpecialValue(int specialValue) { - return mNEISpecialValuePre - + GT_Utility.formatNumbers((long) specialValue * mNEISpecialValueMultiplier) + return mNEISpecialValuePre + GT_Utility.formatNumbers((long) specialValue * mNEISpecialValueMultiplier) + mNEISpecialValuePost; } @@ -3643,26 +3410,22 @@ public class GT_Recipe implements Comparable<GT_Recipe> { if (recipe.owners.size() > 1) { drawNEIText( recipeInfo, - EnumChatFormatting.ITALIC - + GT_Utility.trans("273", "Original Recipe by: ") + EnumChatFormatting.ITALIC + GT_Utility.trans("273", "Original Recipe by: ") + recipe.owners.get(0).getName()); for (int i = 1; i < recipe.owners.size(); i++) { drawNEIText( recipeInfo, - EnumChatFormatting.ITALIC - + GT_Utility.trans("274", "Modified by: ") + EnumChatFormatting.ITALIC + GT_Utility.trans("274", "Modified by: ") + recipe.owners.get(i).getName()); } } else if (recipe.owners.size() > 0) { drawNEIText( recipeInfo, - EnumChatFormatting.ITALIC - + GT_Utility.trans("272", "Recipe by: ") + EnumChatFormatting.ITALIC + GT_Utility.trans("272", "Recipe by: ") + recipe.owners.get(0).getName()); } } - if (GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace - && recipe.stackTraces != null + if (GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace && recipe.stackTraces != null && !recipe.stackTraces.isEmpty()) { drawNEIText(recipeInfo, "stackTrace:"); // todo: good way to show all stacktraces @@ -3678,6 +3441,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { /** * Draws text on NEI recipe. + * * @param yShift y position to shift after this text */ @SuppressWarnings("SameParameterValue") @@ -3687,18 +3451,17 @@ public class GT_Recipe implements Comparable<GT_Recipe> { /** * Draws text on NEI recipe. + * * @param xStart x position to start drawing * @param yShift y position to shift after this text */ @SuppressWarnings("SameParameterValue") protected void drawNEIText(NEIRecipeInfo recipeInfo, String text, int xStart, int yShift) { - Minecraft.getMinecraft() - .fontRenderer - .drawString( - text, - xStart, - recipeInfo.yPos, - neiTextColorOverride != -1 ? neiTextColorOverride : 0x000000); + Minecraft.getMinecraft().fontRenderer.drawString( + text, + xStart, + recipeInfo.yPos, + neiTextColorOverride != -1 ? neiTextColorOverride : 0x000000); recipeInfo.yPos += yShift; } @@ -3714,13 +3477,14 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } - public List<String> handleNEIItemTooltip( - ItemStack stack, List<String> currentTip, GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + public List<String> handleNEIItemTooltip(ItemStack stack, List<String> currentTip, + GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { for (PositionedStack pStack : neiCachedRecipe.mInputs) { if (stack == pStack.item) { if (pStack instanceof GT_NEI_DefaultHandler.FixedPositionedStack) { currentTip = handleNEIItemInputTooltip( - currentTip, (GT_NEI_DefaultHandler.FixedPositionedStack) pStack); + currentTip, + (GT_NEI_DefaultHandler.FixedPositionedStack) pStack); } break; } @@ -3729,7 +3493,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { if (stack == pStack.item) { if (pStack instanceof GT_NEI_DefaultHandler.FixedPositionedStack) { currentTip = handleNEIItemOutputTooltip( - currentTip, (GT_NEI_DefaultHandler.FixedPositionedStack) pStack); + currentTip, + (GT_NEI_DefaultHandler.FixedPositionedStack) pStack); } break; } @@ -3737,16 +3502,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return currentTip; } - protected List<String> handleNEIItemInputTooltip( - List<String> currentTip, GT_NEI_DefaultHandler.FixedPositionedStack pStack) { + protected List<String> handleNEIItemInputTooltip(List<String> currentTip, + GT_NEI_DefaultHandler.FixedPositionedStack pStack) { if (pStack.isNotConsumed()) { currentTip.add(GRAY + GT_Utility.trans("151", "Does not get consumed in the process")); } return currentTip; } - protected List<String> handleNEIItemOutputTooltip( - List<String> currentTip, GT_NEI_DefaultHandler.FixedPositionedStack pStack) { + protected List<String> handleNEIItemOutputTooltip(List<String> currentTip, + GT_NEI_DefaultHandler.FixedPositionedStack pStack) { if (pStack.isChanceBased()) { currentTip.add(GRAY + GT_Utility.trans("150", "Chance: ") + pStack.getChanceText()); } @@ -3779,8 +3544,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @SuppressWarnings("SameParameterValue") - protected void drawNEIOverlayText( - String text, PositionedStack stack, int color, float scale, boolean shadow, Alignment alignment) { + protected void drawNEIOverlayText(String text, PositionedStack stack, int color, float scale, boolean shadow, + Alignment alignment) { FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; int width = fontRenderer.getStringWidth(text); int x = (int) ((stack.relx + 8 + 8 * alignment.x) / scale) - (width / 2 * (alignment.x + 1)); @@ -3820,7 +3585,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } /** - * Use {@link #getItemInputPositions} or {@link #getSpecialItemPosition} or {@link #getFluidInputPositions} instead + * Use {@link #getItemInputPositions} or {@link #getSpecialItemPosition} or {@link #getFluidInputPositions} + * instead */ @Deprecated public ArrayList<PositionedStack> getInputPositionedStacks(GT_Recipe recipe) { @@ -3843,30 +3609,19 @@ public class GT_Recipe implements Comparable<GT_Recipe> { // ----------------------------------------------------------------------------------------------------------------- /** - * Nicely display NEI with many items and fluids. - * Remember to call {@link GT_Recipe_Map#setUsualFluidInputCount} and {@link GT_Recipe_Map#setUsualFluidOutputCount}. - * If row count >= 6, it doesn't fit in 2 recipes per page, so change it via IMC. + * Nicely display NEI with many items and fluids. Remember to call {@link GT_Recipe_Map#setUsualFluidInputCount} and + * {@link GT_Recipe_Map#setUsualFluidOutputCount}. If row count >= 6, it doesn't fit in 2 recipes per page, so + * change it via IMC. */ public static class GT_Recipe_Map_LargeNEI extends GT_Recipe_Map { private static final int xDirMaxCount = 3; private static final int yOrigin = 8; - public GT_Recipe_Map_LargeNEI( - 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, + public GT_Recipe_Map_LargeNEI(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, @@ -3909,14 +3664,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Override - public ModularWindow.Builder createNEITemplate( - IItemHandlerModifiable itemInputsInventory, - IItemHandlerModifiable itemOutputsInventory, - IItemHandlerModifiable specialSlotInventory, - IItemHandlerModifiable fluidInputsInventory, - IItemHandlerModifiable fluidOutputsInventory, - Supplier<Float> progressSupplier, - Pos2d windowOffset) { + public ModularWindow.Builder createNEITemplate(IItemHandlerModifiable itemInputsInventory, + IItemHandlerModifiable itemOutputsInventory, IItemHandlerModifiable specialSlotInventory, + IItemHandlerModifiable fluidInputsInventory, IItemHandlerModifiable fluidOutputsInventory, + Supplier<Float> progressSupplier, Pos2d windowOffset) { // Delay setter so that calls to #setUsualFluidInputCount and #setUsualFluidOutputCount are considered setNEIBackgroundSize(172, 82 + (Math.max(getItemRowCount() + getFluidRowCount() - 4, 0)) * 18); return super.createNEITemplate( @@ -3943,21 +3694,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { */ public static class GT_Recipe_Map_FluidOnly extends GT_Recipe_Map { - public GT_Recipe_Map_FluidOnly( - 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, + public GT_Recipe_Map_FluidOnly(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, @@ -3993,21 +3733,11 @@ 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, + + 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, @@ -4043,31 +3773,15 @@ 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, + 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; } @@ -4077,46 +3791,23 @@ 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, + 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; } @@ -4145,23 +3836,13 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Just a Recipe Map with Utility specifically for Fuels. */ 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, + 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, @@ -4193,30 +3874,21 @@ 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, + 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) { + 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}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, null, - new int[] {aChance}, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new int[] { aChance }, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, 0, 0, aFuelValueInEU); @@ -4225,8 +3897,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @Override public GT_Recipe add(GT_Recipe aRecipe) { aRecipe = super.add(aRecipe); - if (aRecipe.mInputs != null - && GT_Utility.getNonnullElementCount(aRecipe.mInputs) == 1 + 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) { @@ -4237,8 +3908,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { && aRecipe.mFluidInputs != null && GT_Utility.getNonnullElementCount(aRecipe.mFluidInputs) == 1 && aRecipe.mFluidInputs[0] != null) { - mRecipesByFluidInput.put(aRecipe.mFluidInputs[0].getUnlocalizedName(), aRecipe); - } + mRecipesByFluidInput.put(aRecipe.mFluidInputs[0].getUnlocalizedName(), aRecipe); + } return aRecipe; } @@ -4251,21 +3922,11 @@ 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, + + 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, @@ -4286,23 +3947,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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 + return tOutput == null ? null : new GT_Recipe( false, - new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, - new ItemStack[] {tOutput}, + new ItemStack[] { GT_Utility.copyAmount(1, aInputs[0]) }, + new ItemStack[] { tOutput }, null, null, null, @@ -4322,21 +3976,11 @@ 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, + + 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, @@ -4357,14 +4001,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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); @@ -4372,9 +4010,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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)) - }, + new ItemStack[] { GT_Utility.copyAmount(1, aInputs[0]) }, + new ItemStack[] { + GT_Utility.getWrittenBook("Manual_Microwave", ItemList.Book_Written_03.get(1)) }, null, null, null, @@ -4386,12 +4024,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { // 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 - }) + 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) @@ -4426,24 +4060,23 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return null; } } - for (MaterialStack tMaterial : tData.mByProducts) - if (tMaterial != null) { - 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); - } - return null; + for (MaterialStack tMaterial : tData.mByProducts) if (tMaterial != null) { + 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); } - if (tMaterial.mMaterial.contains(SubTag.FLAMMABLE)) { - if (aTileEntity instanceof IGregTechTileEntity) { - ((IGregTechTileEntity) aTileEntity).setOnFire(); - GT_Log.exp.println("Microwave INFLAMMATION due to FLAMMABLE insertion"); - } - return null; + return null; + } + if (tMaterial.mMaterial.contains(SubTag.FLAMMABLE)) { + if (aTileEntity instanceof IGregTechTileEntity) { + ((IGregTechTileEntity) aTileEntity).setOnFire(); + GT_Log.exp.println("Microwave INFLAMMATION due to FLAMMABLE insertion"); } + return null; } + } } if (TileEntityFurnace.getItemBurnTime(tStack) > 0) { if (aTileEntity instanceof IGregTechTileEntity) { @@ -4454,12 +4087,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } - return tOutput == null - ? null + return tOutput == null ? null : new GT_Recipe( false, - new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, - new ItemStack[] {tOutput}, + new ItemStack[] { GT_Utility.copyAmount(1, aInputs[0]) }, + new ItemStack[] { tOutput }, null, null, null, @@ -4479,21 +4111,11 @@ 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, + + 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, @@ -4514,14 +4136,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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(); @@ -4529,8 +4145,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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}, + new ItemStack[] { ItemList.IC2_Scrapbox.get(1) }, + new ItemStack[] { tOutput }, null, null, null, @@ -4556,21 +4172,11 @@ 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, + + 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, @@ -4591,51 +4197,49 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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 + 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; + || !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); + 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); } 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); + 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); } if (rRecipe != null) rRecipe.mCanBeBuffered = false; return rRecipe; @@ -4643,10 +4247,8 @@ 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 @@ -4664,21 +4266,11 @@ 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, + + 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, @@ -4699,24 +4291,17 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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)}, + 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}, + new int[] { 1250 }, null, null, 45, @@ -4734,21 +4319,11 @@ 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, + + 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, @@ -4769,14 +4344,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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]); @@ -4791,9 +4360,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe( false, - new ItemStack[] { - GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) - }, + new ItemStack[] { GT_Utility + .copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) }, tOutputItems, null, null, @@ -4807,14 +4375,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @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)); } } @@ -4822,21 +4391,11 @@ 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, + + 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, @@ -4857,14 +4416,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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]); @@ -4879,9 +4432,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe( false, - new ItemStack[] { - GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) - }, + new ItemStack[] { GT_Utility + .copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) }, tOutputItems, null, null, @@ -4895,14 +4447,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @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)); } } @@ -4910,21 +4463,11 @@ 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, + + 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, @@ -4945,14 +4488,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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]); @@ -4967,9 +4504,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe( false, - new ItemStack[] { - GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) - }, + new ItemStack[] { GT_Utility + .copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) }, tOutputItems, null, null, @@ -4983,14 +4519,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @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)); } } @@ -4998,21 +4535,11 @@ 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, + + 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, @@ -5033,20 +4560,14 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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 + 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; + || !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(); @@ -5061,17 +4582,14 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe( false, - new ItemStack[] { - GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) - }, + 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")) - }, + new FluidStack[] { new FluidStack( + aFluids[0].getFluid(), + ((NBTTagCompound) aRecipeMetaData.getTag("return")).getInteger("amount")) }, null, 400, 16, @@ -5081,14 +4599,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @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 @@ -5106,21 +4625,11 @@ 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, + + 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, @@ -5141,14 +4650,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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); @@ -5156,12 +4659,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { try { List<ItemStack> tRecipeOutputs = mods.railcraft.api.crafting.RailcraftCraftingManager.rockCrusher - .getRecipe(GT_Utility.copyAmount(1, aInputs[0])) - .getRandomizedOuputs(); + .getRecipe(GT_Utility.copyAmount(1, aInputs[0])).getRandomizedOuputs(); if (tRecipeOutputs != null) { aRecipe = new GT_Recipe( false, - new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + new ItemStack[] { GT_Utility.copyAmount(1, aInputs[0]) }, tRecipeOutputs.toArray(new ItemStack[0]), null, null, @@ -5192,9 +4694,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe( false, - new ItemStack[] { - GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) - }, + new ItemStack[] { GT_Utility + .copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) }, tOutputItems, null, null, @@ -5208,8 +4709,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @Override public boolean containsInput(ItemStack aStack) { - return super.containsInput(aStack) - || GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput( + return super.containsInput(aStack) || GT_Utility.arrayContainsNonNull( + GT_ModHandler.getMachineOutput( GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.macerator.getRecipes(), false, @@ -5225,21 +4726,10 @@ 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, + 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) { super( aRecipeList, @@ -5260,63 +4750,26 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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 - - 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; - } - else { - aInputs2.remove(IS); - } - } - if(rRecipe!= null) - break; - } - } - if(rRecipe!= null) - break; - }else - aInputs2.add(aInput); - if(rRecipe!= null) - break; - } - } - */ - if (aInputs == null - || aInputs.length <= 0 + * Doesnt work, keep it as a reminder tho 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; } else { aInputs2.remove(IS); } } if(rRecipe!= null) + * 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; + || !GregTech_API.sPostloadFinished) + return rRecipe; for (ItemStack aInput : aInputs) { if (ItemList.Paper_Printed_Pages.isStackEqual(aInput, false, true)) { @@ -5333,21 +4786,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * 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, + + 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, @@ -5368,14 +4811,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Override - public GT_Recipe findRecipe( - IHasWorldObjectAndCoords aTileEntity, - GT_Recipe aRecipe, - boolean aNotUnificated, - boolean aDontCheckStackSizes, - long aVoltage, - FluidStack[] aFluids, - ItemStack aSpecialSlot, + 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, @@ -5386,11 +4823,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { aFluids, aSpecialSlot, aInputs); - if (aInputs == null - || aInputs.length < 2 + if (aInputs == null || aInputs.length < 2 || aInputs[0] == null || aInputs[1] == null - || !GregTech_API.sPostloadFinished) return rRecipe; + || !GregTech_API.sPostloadFinished) + return rRecipe; if (rRecipe == null) return findRenamingRecipe(aInputs); for (ItemStack aMold : aInputs) { if (ItemList.Shape_Mold_Credit.isStackEqual(aMold, false, true)) { @@ -5432,8 +4869,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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}, + new ItemStack[] { ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, input) }, + new ItemStack[] { output }, null, null, null, @@ -5450,21 +4887,11 @@ 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, + + 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, @@ -5485,30 +4912,29 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @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 + 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; + || !GregTech_API.sPostloadFinished) + return rRecipe; Dyes aDye = null; - for (Dyes tDye : Dyes.VALUES) - if (tDye.isFluidDye(aFluids[0])) { - aDye = tDye; - break; - } + for (Dyes tDye : Dyes.VALUES) if (tDye.isFluidDye(aFluids[0])) { + aDye = tDye; + break; + } if (aDye == null) return rRecipe; @@ -5524,50 +4950,48 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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); + 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)); - 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); + 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); } 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; @@ -5591,8 +5015,11 @@ 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; } } @@ -5617,11 +5044,11 @@ 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( + 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"}, + 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() { @@ -5641,8 +5068,17 @@ public class GT_Recipe implements Comparable<GT_Recipe> { E, true, true); - GT_Recipe explanatoryRecipe = - new GT_Recipe(true, new ItemStack[] {}, new ItemStack[] {}, null, null, null, null, 1, 1, 1); + 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", @@ -5690,7 +5126,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return addRecipe( new GT_Recipe( true, - new ItemStack[] {fuelItemStack}, + new ItemStack[] { fuelItemStack }, new ItemStack[] {}, null, null, @@ -5758,6 +5194,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } public static class GT_Recipe_Map_IC2NuclearFake extends GT_Recipe_Map { + public GT_Recipe_Map_IC2NuclearFake() { super( new HashSet<>(10), @@ -5783,21 +5220,17 @@ public class GT_Recipe implements Comparable<GT_Recipe> { /** * Add a breeder cell. - * @param input raw stack. should be undamaged. - * @param output breed output + * + * @param input raw stack. should be undamaged. + * @param output breed output * @param heatMultiplier bonus progress per neutron pulse per heat step - * @param heatStep divisor for hull heat - * @param reflector true if also acts as a neutron reflector, false otherwise. + * @param heatStep divisor for hull heat + * @param reflector true if also acts as a neutron reflector, false otherwise. * @param requiredPulses progress required to complete breeding * @return added fake recipe */ - public GT_Recipe addBreederCell( - ItemStack input, - ItemStack output, - boolean reflector, - int heatStep, - int heatMultiplier, - int requiredPulses) { + public GT_Recipe addBreederCell(ItemStack input, ItemStack output, boolean reflector, int heatStep, + int heatMultiplier, int requiredPulses) { return addFakeRecipe( input, output, @@ -5809,13 +5242,22 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public GT_Recipe addFakeRecipe(ItemStack input, ItemStack output, String... neiDesc) { GT_Recipe r = new GT_Recipe( - new ItemStack[] {input}, new ItemStack[] {output}, null, new int[] {10000}, null, null, 0, 0, 0); + new ItemStack[] { input }, + new ItemStack[] { output }, + null, + new int[] { 10000 }, + null, + null, + 0, + 0, + 0); r.setNeiDesc(neiDesc); return addRecipe(r, true, true, false); } } public static class GT_Recipe_Map_LargeChemicalReactor extends GT_Recipe_Map_LargeNEI { + private static final int TOTAL_INPUT_COUNT = 6; private static final int OUTPUT_COUNT = 6; @@ -5839,16 +5281,8 @@ 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, + 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<>(); @@ -5872,13 +5306,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { adjustedFluidInputs.add(inputFluidContent); } else { ItemData itemData = GT_OreDictUnificator.getItemData(input); - if (itemData != null - && itemData.hasValidPrefixMaterialData() + if (itemData != null && itemData.hasValidPrefixMaterialData() && itemData.mMaterial.mMaterial == Materials.Empty) { continue; } else { - if (itemData != null - && itemData.hasValidPrefixMaterialData() + if (itemData != null && itemData.hasValidPrefixMaterialData() && itemData.mPrefix == OrePrefixes.cell) { ItemStack dustStack = itemData.mMaterial.mMaterial.getDust(input.stackSize); if (dustStack != null) { @@ -5916,8 +5348,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { adjustedFluidOutputs.add(outputFluidContent); } else { ItemData itemData = GT_OreDictUnificator.getItemData(output); - if (!(itemData != null - && itemData.hasValidPrefixMaterialData() + if (!(itemData != null && itemData.hasValidPrefixMaterialData() && itemData.mMaterial.mMaterial == Materials.Empty)) { adjustedOutputs.add(output); } @@ -5994,6 +5425,7 @@ 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() { @@ -6033,18 +5465,9 @@ public class GT_Recipe implements Comparable<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) { + 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, @@ -6077,21 +5500,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { 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, + 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, @@ -6112,23 +5524,13 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Override - public GT_Recipe addFakeRecipe( - boolean aCheckForCollisions, - ItemStack[] aInputs, - ItemStack[] aOutputs, - Object aSpecial, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - int aDuration, - int aEUt, + 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 -> { + 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)); }); @@ -6150,21 +5552,10 @@ 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, + 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, @@ -6185,13 +5576,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Override - public GT_Recipe addRecipe( - int[] aOutputChances, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - int aDuration, - int aEUt, - int aSpecialValue) { + public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, + int aDuration, int aEUt, int aSpecialValue) { return addRecipe( new GT_Recipe( false, @@ -6222,21 +5608,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public static class GT_Recipe_Map_AssemblyLineFake extends GT_Recipe_Map { - public GT_Recipe_Map_AssemblyLineFake( - 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, + public GT_Recipe_Map_AssemblyLineFake(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, @@ -6278,32 +5653,27 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Override - public void addProgressBarUI( - ModularWindow.Builder builder, Supplier<Float> progressSupplier, Pos2d windowOffset) { + public void addProgressBarUI(ModularWindow.Builder builder, Supplier<Float> progressSupplier, + Pos2d windowOffset) { int bar1Width = 17; int bar2Width = 18; - builder.widget(new ProgressBar() - .setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_1, 17) - .setDirection(ProgressBar.Direction.RIGHT) - .setProgress(() -> progressSupplier.get() * ((float) (bar1Width + bar2Width) / bar1Width)) - .setSynced(false, false) - .setPos(new Pos2d(88, 8).add(windowOffset)) - .setSize(bar1Width, 72)); - builder.widget(new ProgressBar() - .setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_2, 18) - .setDirection(ProgressBar.Direction.RIGHT) - .setProgress(() -> (progressSupplier.get() - ((float) bar1Width / (bar1Width + bar2Width))) - * ((float) (bar1Width + bar2Width) / bar2Width)) - .setSynced(false, false) - .setPos(new Pos2d(124, 8).add(windowOffset)) - .setSize(bar2Width, 72)); - builder.widget(new ProgressBar() - .setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_3, 18) - .setDirection(ProgressBar.Direction.UP) - .setProgress(progressSupplier) - .setSynced(false, false) - .setPos(new Pos2d(146, 26).add(windowOffset)) - .setSize(10, 18)); + builder.widget( + new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_1, 17) + .setDirection(ProgressBar.Direction.RIGHT) + .setProgress(() -> progressSupplier.get() * ((float) (bar1Width + bar2Width) / bar1Width)) + .setSynced(false, false).setPos(new Pos2d(88, 8).add(windowOffset)).setSize(bar1Width, 72)); + builder.widget( + new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_2, 18) + .setDirection(ProgressBar.Direction.RIGHT) + .setProgress( + () -> (progressSupplier.get() - ((float) bar1Width / (bar1Width + bar2Width))) + * ((float) (bar1Width + bar2Width) / bar2Width)) + .setSynced(false, false).setPos(new Pos2d(124, 8).add(windowOffset)) + .setSize(bar2Width, 72)); + builder.widget( + new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_3, 18) + .setDirection(ProgressBar.Direction.UP).setProgress(progressSupplier) + .setSynced(false, false).setPos(new Pos2d(146, 26).add(windowOffset)).setSize(10, 18)); } } } diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java index a353eff44d..81d11ad7f2 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java +++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java @@ -5,18 +5,9 @@ import static gregtech.api.enums.Materials.*; import static gregtech.api.enums.Materials.Void; import static gregtech.api.util.GT_Utility.calculateRecipeEU; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.SetMultimap; -import cpw.mods.fml.relauncher.ReflectionHelper; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.*; -import gregtech.api.objects.ItemData; -import gregtech.api.objects.MaterialStack; -import ic2.api.reactor.IReactorComponent; import java.lang.reflect.Field; import java.util.*; + import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemBlock; @@ -28,112 +19,110 @@ import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.SetMultimap; + +import cpw.mods.fml.relauncher.ReflectionHelper; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.*; +import gregtech.api.objects.ItemData; +import gregtech.api.objects.MaterialStack; +import ic2.api.reactor.IReactorComponent; + /** * Class for Automatic Recipe registering. */ public class GT_RecipeRegistrator { + /** - * List of Materials, which are used in the Creation of Sticks. All Rod Materials are automatically added to this List. + * 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) - }; + 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) }; public static final Field SHAPED_ORE_RECIPE_WIDTH = ReflectionHelper.findField(ShapedOreRecipe.class, "width"); public static final Field SHAPED_ORE_RECIPE_HEIGHT = ReflectionHelper.findField(ShapedOreRecipe.class, "height"); private static volatile Map<RecipeShape, List<IRecipe>> indexedRecipeListCache; - 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; static { @@ -141,8 +130,8 @@ public class GT_RecipeRegistrator { GregTech_API.sAfterGTPostload.add(() -> indexedRecipeListCache = null); } - 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(); @@ -154,17 +143,20 @@ public class GT_RecipeRegistrator { } public static void registerMaterialRecycling(ItemStack aStack, ItemData aData) { - if (GT_Utility.isStackInvalid(aStack) - || GT_Utility.areStacksEqual(new ItemStack(Items.blaze_rod), aStack) + if (GT_Utility.isStackInvalid(aStack) || GT_Utility.areStacksEqual(new ItemStack(Items.blaze_rod), aStack) || aData == null || !aData.hasValidMaterialData() || !aData.mMaterial.mMaterial.mAutoGenerateRecycleRecipes || aData.mMaterial.mAmount <= 0 || GT_Utility.getFluidForFilledItem(aStack, false) != null - || aData.mMaterial.mMaterial.mSubTags.contains(SubTag.NO_RECIPES)) return; + || aData.mMaterial.mMaterial.mSubTags.contains(SubTag.NO_RECIPES)) + return; registerReverseMacerating(GT_Utility.copyAmount(1, aStack), aData, aData.mPrefix == null); registerReverseSmelting( - GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, aData.mMaterial.mAmount, true); + GT_Utility.copyAmount(1, aStack), + aData.mMaterial.mMaterial, + aData.mMaterial.mAmount, + true); registerReverseFluidSmelting( GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, @@ -178,43 +170,41 @@ 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 + 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; + || (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 + if (GT_Mod.gregtechproxy.mHideRecyclingRecipes && tData != null && tData.hasValidPrefixData() - && !(tData.mPrefix == OrePrefixes.dust - || tData.mPrefix == OrePrefixes.ingot + && !(tData.mPrefix == OrePrefixes.dust || tData.mPrefix == OrePrefixes.ingot || tData.mPrefix == OrePrefixes.block | tData.mPrefix == OrePrefixes.plate)) { tHide = true; } - // boolean tHide = (aMaterial != Materials.Iron && aMaterial!= + // boolean tHide = (aMaterial != Materials.Iron && aMaterial!= // Materials.Redstone)&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes); - // if(tHide && tData!=null&&tData.hasValidPrefixData()&&tData.mPrefix==OrePrefixes.ingot){ - // tHide=false; - // } + // if(tHide && tData!=null&&tData.hasValidPrefixData()&&tData.mPrefix==OrePrefixes.ingot){ + // tHide=false; + // } RA.addFluidSmelterRecipe( GT_Utility.copyAmount(1, aStack), - aByproduct == null - ? null + 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), + || !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), @@ -228,37 +218,30 @@ 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 + 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)) - || (aMaterial.getProcessingMaterialTierEU() > TierEU.IV)) return; + || (aMaterial.getProcessingMaterialTierEU() > TierEU.IV)) + return; if (aMaterial == Materials.Naquadah || aMaterial == Materials.NaquadahEnriched) return; aMaterialAmount /= aStack.stackSize; 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); - else - GT_ModHandler.addSmeltingRecipe( - GT_Utility.copyAmount(1, aStack), - GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount)); + if (aAllowAlloySmelter) 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)); } - public static void registerReverseArcSmelting( - ItemStack aStack, - Materials aMaterial, - long aMaterialAmount, - MaterialStack aByProduct01, - MaterialStack aByProduct02, - MaterialStack aByProduct03) { + public static void registerReverseArcSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, + MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03) { registerReverseArcSmelting( aStack, new ItemData( @@ -276,10 +259,10 @@ public class GT_RecipeRegistrator { boolean tIron = false; for (MaterialStack tMaterial : aData.getAllMaterialStacks()) { - if (tMaterial.mMaterial == Materials.Iron - || tMaterial.mMaterial == Materials.Copper + if (tMaterial.mMaterial == Materials.Iron || tMaterial.mMaterial == Materials.Copper || tMaterial.mMaterial == Materials.WroughtIron - || tMaterial.mMaterial == Materials.AnnealedCopper) tIron = true; + || tMaterial.mMaterial == Materials.AnnealedCopper) + tIron = true; if (tMaterial.mMaterial.contains(SubTag.UNBURNABLE)) { tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mArcSmeltInto; @@ -311,10 +294,9 @@ public class GT_RecipeRegistrator { } 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); @@ -327,26 +309,18 @@ public class GT_RecipeRegistrator { 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)) - }, + 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) { + public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, + MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) { registerReverseMacerating( aStack, new ItemData( @@ -376,59 +350,43 @@ public class GT_RecipeRegistrator { 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)) - }, + 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; - } + 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; + } } /** * 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, - }; + private static final Materials[] VANILLA_MATS = { Cobalt, Gold, Iron, Lead, FierySteel, Void, Bronze, Diamond, Ruby, + Sapphire, Steel, IronWood, Steeleaf, Knightmetal, Thaumium, DarkSteel, }; /** - * You give this Function a Material and it will scan almost everything for adding recycling Recipes and replacing Ingots, Gems etc. + * You give this Function a Material and it will scan almost everything for adding recycling Recipes and replacing + * Ingots, Gems etc. * * @param aMats Materials, for example an Ingot or a Gem. * @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); @@ -452,13 +410,14 @@ public class GT_RecipeRegistrator { GT_OreDictUnificator.addItemData( tCrafted, new ItemData( - aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tRecipe.amount1)); + 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: + // GT_Log.out.println("registerUsagesForMaterials used aPlate: "+aPlate); + // GT_Log.out.println("registerUsagesForMaterials used aPlate: // "+aMat.getUnlocalizedName()); - // GT_Log.out.println("registerUsagesForMaterials used aPlate: + // GT_Log.out.println("registerUsagesForMaterials used aPlate: // "+aMat.getDisplayName()); // // GT_Log.out.println("###################################################################################"); @@ -484,8 +443,7 @@ public class GT_RecipeRegistrator { private static Map<RecipeShape, List<IRecipe>> createIndexedRecipeListCache() { Map<RecipeShape, List<IRecipe>> result = new IdentityHashMap<>(); @SuppressWarnings("unchecked") - ArrayList<IRecipe> allRecipeList = - (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + ArrayList<IRecipe> allRecipeList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); // filter using the empty slots in the shape. // if the empty slots doesn't match, the recipe will definitely fail SetMultimap<List<Integer>, RecipeShape> filter = HashMultimap.create(); @@ -502,8 +460,7 @@ public class GT_RecipeRegistrator { } buffer.clear(); ItemStack tStack = tRecipe.getRecipeOutput(); - if (GT_Utility.isStackValid(tStack) - && tStack.getMaxStackSize() == 1 + if (GT_Utility.isStackValid(tStack) && tStack.getMaxStackSize() == 1 && tStack.getMaxDamage() > 0 && !(tStack.getItem() instanceof ItemBlock) && !(tStack.getItem() instanceof IReactorComponent) @@ -543,8 +500,8 @@ public class GT_RecipeRegistrator { return result; } - private static boolean checkRecipeShape( - List<Integer> emptySlotIndexesBuffer, Object[] input, int tRecipeWidth, int tRecipeHeight) { + private static boolean checkRecipeShape(List<Integer> emptySlotIndexesBuffer, Object[] input, int tRecipeWidth, + int tRecipeHeight) { for (int y = 0; y < 3; y++) { for (int x = 0; x < 3; x++) { if (x >= tRecipeWidth || y >= tRecipeHeight) { @@ -557,8 +514,7 @@ public class GT_RecipeRegistrator { continue; } if (tObject instanceof ItemStack - && (((ItemStack) tObject).getItem() == null - || ((ItemStack) tObject).getMaxStackSize() < 2 + && (((ItemStack) tObject).getItem() == null || ((ItemStack) tObject).getMaxStackSize() < 2 || ((ItemStack) tObject).getMaxDamage() > 0 || ((ItemStack) tObject).getItem() instanceof ItemBlock)) { return false; @@ -583,8 +539,8 @@ public class GT_RecipeRegistrator { for (int i = 0; i < sShapes.length; i++) { RecipeShape tRecipe = sShapes[i]; - for (ItemStack tCrafted : - GT_ModHandler.getRecipeOutputs(getRecipeList(tRecipe), true, tRecipe.shape)) { + for (ItemStack tCrafted : GT_ModHandler + .getRecipeOutputs(getRecipeList(tRecipe), true, tRecipe.shape)) { if (aItemData != null && aItemData.hasValidPrefixMaterialData()) GT_OreDictUnificator.addItemData( tCrafted, @@ -592,7 +548,8 @@ public class GT_RecipeRegistrator { aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tRecipe.amount1, new MaterialStack( - tMaterial, OrePrefixes.stick.mMaterialAmount * tRecipe.amount2))); + tMaterial, + OrePrefixes.stick.mMaterialAmount * tRecipe.amount2))); if (aRecipeReplacing && aPlate != null && sShapesA[i] != null && sShapesA[i].length > 1) { assert aItemData != null; @@ -604,42 +561,28 @@ public class GT_RecipeRegistrator { 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 - }); + 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 - }); + 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 - }); + 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; } } @@ -653,27 +596,34 @@ public class GT_RecipeRegistrator { /** * Registers wiremill recipes for given material using integrated circuits. - * @param aMaterial material to register + * + * @param aMaterial material to register * @param baseDuration base duration ticks for ingot -> 1x wire recipe - * @param aEUt EU/t for recipe - * If you provide a proper EU tier for recipe processing then aEUt will be overriden with it. + * @param aEUt EU/t for recipe If you provide a proper EU tier for recipe processing then aEUt will be + * overriden with it. */ public static void registerWiremillRecipes(Materials aMaterial, int baseDuration, int aEUt) { registerWiremillRecipes( - aMaterial, baseDuration, calculateRecipeEU(aMaterial, aEUt), OrePrefixes.ingot, OrePrefixes.stick, 2); + aMaterial, + baseDuration, + calculateRecipeEU(aMaterial, aEUt), + OrePrefixes.ingot, + OrePrefixes.stick, + 2); } /** * Registers wiremill recipes for given material using integrated circuits. - * @param aMaterial material to register + * + * @param aMaterial material to register * @param baseDuration base duration ticks for ingot -> 1x wire recipe - * @param aEUt EU/t for recipe - * @param prefix1 prefix corresponds to ingot - * @param prefix2 prefix corresponds to stick - * @param multiplier amount of wires created from 1 ingot + * @param aEUt EU/t for recipe + * @param prefix1 prefix corresponds to ingot + * @param prefix2 prefix corresponds to stick + * @param multiplier amount of wires created from 1 ingot */ - public static void registerWiremillRecipes( - Materials aMaterial, int baseDuration, int aEUt, OrePrefixes prefix1, OrePrefixes prefix2, int multiplier) { + public static void registerWiremillRecipes(Materials aMaterial, int baseDuration, int aEUt, OrePrefixes prefix1, + OrePrefixes prefix2, int multiplier) { GT_Values.RA.addWiremillRecipe( GT_OreDictUnificator.get(prefix1, aMaterial, 1L), GT_Utility.getIntegratedCircuit(1), @@ -789,6 +739,7 @@ public class GT_RecipeRegistrator { } private static class RecipeShape { + private final ItemStack[] shape; private int amount1; private int amount2; diff --git a/src/main/java/gregtech/api/util/GT_RenderingWorld.java b/src/main/java/gregtech/api/util/GT_RenderingWorld.java index 173631e99c..bab2a30505 100644 --- a/src/main/java/gregtech/api/util/GT_RenderingWorld.java +++ b/src/main/java/gregtech/api/util/GT_RenderingWorld.java @@ -1,13 +1,10 @@ package gregtech.api.util; -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; @@ -20,10 +17,16 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; +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; + /** * 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 @@ -56,8 +59,7 @@ public class GT_RenderingWorld implements IBlockAccess { 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); + 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) { @@ -123,6 +125,7 @@ public class GT_RenderingWorld implements IBlockAccess { } public class FMLEventHandler { + public FMLEventHandler() { FMLCommonHandler.instance().bus().register(this); } @@ -134,6 +137,7 @@ public class GT_RenderingWorld implements IBlockAccess { } public class ForgeEventHandler { + private ForgeEventHandler() { MinecraftForge.EVENT_BUS.register(this); } @@ -154,6 +158,7 @@ public class GT_RenderingWorld implements IBlockAccess { } private static class BlockInfo { + private final Block block; private final int meta; 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 ae8d804ee9..62096c1ebd 100644 --- a/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java @@ -1,7 +1,5 @@ package gregtech.api.util; -import gregtech.api.interfaces.internal.IGT_CraftingRecipe; -import gregtech.api.objects.ReverseShapedRecipe; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.inventory.InventoryCrafting; @@ -10,19 +8,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.oredict.ShapedOreRecipe; +import gregtech.api.interfaces.internal.IGT_CraftingRecipe; +import gregtech.api.objects.ReverseShapedRecipe; + public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRecipe { + public final boolean mRemovableByGT, mKeepingNBT; 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; @@ -42,8 +38,8 @@ public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRec if (tStack != null) { if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound()) || (tStack.hasTagCompound() - && !tStack.getTagCompound() - .equals(aGrid.getStackInSlot(i).getTagCompound()))) return false; + && !tStack.getTagCompound().equals(aGrid.getStackInSlot(i).getTagCompound()))) + return false; } tStack = aGrid.getStackInSlot(i); } @@ -60,33 +56,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); + for (int i = 0; i < aGrid.getSizeInventory(); i++) 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]); + for (int i = 0; i < mEnchantmentsAdded.length; 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 09d8730df5..02c479cc94 100644 --- a/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java @@ -1,7 +1,5 @@ package gregtech.api.util; -import gregtech.api.interfaces.internal.IGT_CraftingRecipe; -import gregtech.api.objects.ReverseShapelessRecipe; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.inventory.InventoryCrafting; @@ -10,19 +8,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.oredict.ShapelessOreRecipe; +import gregtech.api.interfaces.internal.IGT_CraftingRecipe; +import gregtech.api.objects.ReverseShapelessRecipe; + public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_CraftingRecipe { - public final boolean /*mDismantleable,*/ mRemovableByGT, mKeepingNBT; + + public final boolean /* mDismantleable, */ mRemovableByGT, mKeepingNBT; 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; @@ -42,8 +38,8 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft if (tStack != null) { if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound()) || (tStack.hasTagCompound() - && !tStack.getTagCompound() - .equals(aGrid.getStackInSlot(i).getTagCompound()))) return false; + && !tStack.getTagCompound().equals(aGrid.getStackInSlot(i).getTagCompound()))) + return false; } tStack = aGrid.getStackInSlot(i); } @@ -60,51 +56,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); + for (int i = 0; i < aGrid.getSizeInventory(); i++) 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 && + // 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, + // 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); - // } + // 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]); + for (int i = 0; i < mEnchantmentsAdded.length; 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 5ff631fad6..fae02badf2 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 @@ -1,17 +1,20 @@ 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 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; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; + /** Used by machines that are locked to a single recipe, for fast computation. */ public class GT_Single_Recipe_Check { + protected final GT_MetaTileEntity_MultiBlockBase multiBlockBase; protected final GT_Recipe recipe; protected final ImmutableMap<GT_Utility.ItemId, Integer> itemCost; @@ -20,20 +23,15 @@ public class GT_Single_Recipe_Check { protected final int totalItemCost; protected final int totalFluidCost; - protected GT_Single_Recipe_Check( - GT_MetaTileEntity_MultiBlockBase multiBlockBase, - GT_Recipe recipe, - ImmutableMap<GT_Utility.ItemId, Integer> itemCost, - ImmutableMap<Fluid, Integer> fluidCost) { + protected GT_Single_Recipe_Check(GT_MetaTileEntity_MultiBlockBase multiBlockBase, GT_Recipe recipe, + ImmutableMap<GT_Utility.ItemId, Integer> itemCost, ImmutableMap<Fluid, Integer> fluidCost) { this.multiBlockBase = multiBlockBase; this.recipe = recipe; 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() { @@ -41,10 +39,10 @@ public class GT_Single_Recipe_Check { } /** - * Use this method if recipes cannot require more than a single stack of any item or fluid. - * In particular, {@link GT_MetaTileEntity_MultiBlockBase#getCompactedInputs()} and - * {@link GT_MetaTileEntity_MultiBlockBase#getCompactedFluids()} both enforce this single-stack - * restriction, so any multi-block that calls those can use this method. + * Use this method if recipes cannot require more than a single stack of any item or fluid. In particular, + * {@link GT_MetaTileEntity_MultiBlockBase#getCompactedInputs()} and + * {@link GT_MetaTileEntity_MultiBlockBase#getCompactedFluids()} both enforce this single-stack restriction, so any + * multi-block that calls those can use this method. */ public boolean checkRecipeInputsSingleStack(boolean consumeInputs) { Map<GT_Utility.ItemId, ItemStack> itemMap = null; @@ -98,8 +96,8 @@ public class GT_Single_Recipe_Check { } /** - * Use this method if recipes can require more than a single stack of any item or fluid. - * It is less efficient, though. + * Use this method if recipes can require more than a single stack of any item or fluid. It is less efficient, + * though. */ public boolean checkRecipeInputs(boolean consumeInputs) { List<ItemStack> items = null; @@ -194,6 +192,7 @@ public class GT_Single_Recipe_Check { } public static final class Builder { + private final GT_MetaTileEntity_MultiBlockBase multiBlockBase; // In order to compute which items and fluids are consumed by the recipe, we compare the @@ -246,7 +245,10 @@ public class GT_Single_Recipe_Check { } return new GT_Single_Recipe_Check( - multiBlockBase, recipe, itemCostBuilder.build(), fluidCostBuilder.build()); + 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 e15ae792a1..c102d63f48 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 @@ -1,32 +1,30 @@ package gregtech.api.util; -import com.google.common.collect.ImmutableMap; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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; +import com.google.common.collect.ImmutableMap; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; + /** 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 { + protected final int recipeAmperage; /** - * The machine type that the locked recipe is for. - * We will not allow running with other machines. + * The machine type that the locked recipe is for. We will not allow running with other machines. */ protected final ItemStack machineStack; - protected GT_Single_Recipe_Check_Processing_Array( - GT_MetaTileEntity_MultiBlockBase multiBlockBase, - GT_Recipe recipe, - ImmutableMap<GT_Utility.ItemId, Integer> itemCost, - ImmutableMap<Fluid, Integer> fluidCost, - int recipeAmperage, - ItemStack machineStack) { + protected GT_Single_Recipe_Check_Processing_Array(GT_MetaTileEntity_MultiBlockBase multiBlockBase, GT_Recipe recipe, + ImmutableMap<GT_Utility.ItemId, Integer> itemCost, ImmutableMap<Fluid, Integer> fluidCost, + int recipeAmperage, ItemStack machineStack) { super(multiBlockBase, recipe, itemCost, fluidCost); this.recipeAmperage = recipeAmperage; @@ -138,6 +136,7 @@ public class GT_Single_Recipe_Check_Processing_Array extends GT_Single_Recipe_Ch } public static final class Builder { + private final GT_MetaTileEntity_MultiBlockBase multiBlockBase; // In order to compute which items and fluids are consumed by the recipe, we compare the diff --git a/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java b/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java index 0661ea56b7..7b03dd8884 100644 --- a/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java +++ b/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java @@ -1,18 +1,20 @@ package gregtech.api.util; -import cpw.mods.fml.common.eventhandler.Event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.enums.GT_Values; -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 cpw.mods.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.api.enums.GT_Values; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_MonsterRepellent; + public class GT_SpawnEventHandler { public static volatile List<int[]> mobReps = new CopyOnWriteArrayList<>(); @@ -62,17 +64,15 @@ public class GT_SpawnEventHandler { if (check > maxRangeCheck) continue; final TileEntity tTile = event.entity.worldObj.getTileEntity(rep[0], rep[1], rep[2]); - if (tTile instanceof BaseMetaTileEntity - && ((BaseMetaTileEntity) tTile).getMetaTileEntity() - instanceof GT_MetaTileEntity_MonsterRepellent) { - final int r = ((GT_MetaTileEntity_MonsterRepellent) - ((BaseMetaTileEntity) tTile).getMetaTileEntity()) - .mRange; + if (tTile instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTile) + .getMetaTileEntity() instanceof GT_MetaTileEntity_MonsterRepellent) { + final int r = ((GT_MetaTileEntity_MonsterRepellent) ((BaseMetaTileEntity) tTile) + .getMetaTileEntity()).mRange; if (check <= Math.pow(r, 2)) { if (event.entityLiving instanceof EntitySlime) ((EntitySlime) event.entityLiving).setCustomNameTag("DoNotSpawnSlimes"); event.setResult(Event.Result.DENY); - // We're already DENYing it. No reason to keep checking + // We're already DENYing it. No reason to keep checking return; } } diff --git a/src/main/java/gregtech/api/util/GT_StructureUtility.java b/src/main/java/gregtech/api/util/GT_StructureUtility.java index 756a1c3afa..25ba192794 100644 --- a/src/main/java/gregtech/api/util/GT_StructureUtility.java +++ b/src/main/java/gregtech/api/util/GT_StructureUtility.java @@ -6,25 +6,12 @@ import static com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceRes import static com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceResult.SKIP; import static com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode.EXACT; -import com.gtnewhorizon.structurelib.StructureLibAPI; -import com.gtnewhorizon.structurelib.structure.*; -import com.gtnewhorizon.structurelib.util.ItemStackPredicate; -import gregtech.api.GregTech_API; -import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.IHeatingCoil; -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_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; @@ -37,8 +24,26 @@ import net.minecraft.util.IChatComponent; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import com.gtnewhorizon.structurelib.StructureLibAPI; +import com.gtnewhorizon.structurelib.structure.*; +import com.gtnewhorizon.structurelib.util.ItemStackPredicate; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.HeatingCoilLevel; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.IHeatingCoil; +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_TieredMachineBlock; +import gregtech.common.blocks.GT_Block_Casings5; +import gregtech.common.blocks.GT_Item_Machines; + public class GT_StructureUtility { - // private static final Map<Class<?>, String> customNames = new HashMap<>(); + + // private static final Map<Class<?>, String> customNames = new HashMap<>(); private GT_StructureUtility() { throw new AssertionError("Not instantiable"); } @@ -47,8 +52,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); } @@ -87,7 +92,17 @@ public class GT_StructureUtility { return false; ItemBlock tFrameStackItem = (ItemBlock) tFrameStack.getItem(); return tFrameStackItem.placeBlockAt( - tFrameStack, null, world, x, y, z, 6, 0, 0, 0, Items.feather.getDamage(tFrameStack)); + tFrameStack, + null, + world, + x, + y, + z, + 6, + 0, + 0, + 0, + Items.feather.getDamage(tFrameStack)); } private ItemStack getFrameStack() { @@ -95,8 +110,8 @@ public class GT_StructureUtility { } @Override - public BlocksToPlace getBlocksToPlace( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { ItemStack tFrameStack = getFrameStack(); if (!GT_Utility.isStackValid(tFrameStack) || !(tFrameStack.getItem() instanceof ItemBlock)) return BlocksToPlace.errored; @@ -104,23 +119,21 @@ 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) { return survivalPlaceBlock( - t, world, x, y, z, trigger, AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); + t, + world, + x, + y, + z, + trigger, + AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); } @Override - public PlaceResult survivalPlaceBlock( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { if (check(t, world, x, y, z)) return SKIP; ItemStack tFrameStack = getFrameStack(); if (!GT_Utility.isStackValid(tFrameStack) || !(tFrameStack.getItem() instanceof ItemBlock)) @@ -146,18 +159,20 @@ public class GT_StructureUtility { } /** - * Completely equivalent to {@link #buildHatchAdder()}, except it plays nicer with type inference when statically imported + * Completely equivalent to {@link #buildHatchAdder()}, except it plays nicer with type inference when statically + * imported */ public static <T> GT_HatchElementBuilder<T> buildHatchAdder(Class<T> typeToken) { 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(); } return new IStructureElementNoPlacement<T>() { + @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); @@ -173,18 +188,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(); } return new IStructureElement<T>() { + @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); @@ -205,66 +216,63 @@ public class GT_StructureUtility { } @Override - public BlocksToPlace getBlocksToPlace( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { Class<? extends IMetaTileEntity> clazz = aMetaId.apply(t); if (clazz == null) return BlocksToPlace.createEmpty(); return BlocksToPlace.create(is -> clazz.isInstance(GT_Item_Machines.getMetaTileEntity(is))); } @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) { return survivalPlaceBlock( - t, world, x, y, z, trigger, AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); + t, + world, + x, + y, + z, + trigger, + AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); } @Override - public PlaceResult survivalPlaceBlock( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { if (shouldSkip != null) { TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof IGregTechTileEntity - && shouldSkip.test(t, (IGregTechTileEntity) tileEntity)) return SKIP; + && shouldSkip.test(t, (IGregTechTileEntity) tileEntity)) + return SKIP; } if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, env.getActor())) return REJECT; Class<? extends IMetaTileEntity> clazz = aMetaId.apply(t); if (clazz == null) return REJECT; - ItemStack taken = - env.getSource().takeOne(is -> clazz.isInstance(GT_Item_Machines.getMetaTileEntity(is)), true); + ItemStack taken = env.getSource() + .takeOne(is -> clazz.isInstance(GT_Item_Machines.getMetaTileEntity(is)), true); if (GT_Utility.isStackInvalid(taken)) { - env.getChatter() - .accept(new ChatComponentTranslation( - "GT5U.autoplace.error.no_mte.class_name", clazz.getSimpleName())); + env.getChatter().accept( + new ChatComponentTranslation( + "GT5U.autoplace.error.no_mte.class_name", + clazz.getSimpleName())); return REJECT; } - if (StructureUtility.survivalPlaceBlock( - taken, EXACT, null, true, world, x, y, z, env.getSource(), env.getActor()) - == ACCEPT) return acceptType; + if (StructureUtility + .survivalPlaceBlock(taken, EXACT, null, true, world, x, y, z, env.getSource(), env.getActor()) + == ACCEPT) + return acceptType; return 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(); } return new IStructureElement<T>() { + @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); @@ -285,8 +293,8 @@ public class GT_StructureUtility { } @Override - public BlocksToPlace getBlocksToPlace( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { GT_Item_Machines item = (GT_Item_Machines) Item.getItemFromBlock(GregTech_API.sBlockMachines); int meta = aMetaId.applyAsInt(t); if (meta < 0) return BlocksToPlace.createEmpty(); @@ -294,70 +302,67 @@ 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) { return survivalPlaceBlock( - t, world, x, y, z, trigger, AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); + t, + world, + x, + y, + z, + trigger, + AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); } @Override - public PlaceResult survivalPlaceBlock( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { if (shouldSkip != null) { TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof IGregTechTileEntity - && shouldSkip.test(t, (IGregTechTileEntity) tileEntity)) return SKIP; + && shouldSkip.test(t, (IGregTechTileEntity) tileEntity)) + return SKIP; } if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, env.getActor())) return REJECT; GT_Item_Machines item = (GT_Item_Machines) Item.getItemFromBlock(GregTech_API.sBlockMachines); int meta = aMetaId.applyAsInt(t); if (meta < 0) return REJECT; - ItemStack taken = - env.getSource().takeOne(ItemStackPredicate.from(item).setMeta(meta), true); + ItemStack taken = env.getSource().takeOne(ItemStackPredicate.from(item).setMeta(meta), true); if (GT_Utility.isStackInvalid(taken)) { env.getChatter().accept(new ChatComponentTranslation("GT5U.autoplace.error.no_mte.id", meta)); return REJECT; } - return StructureUtility.survivalPlaceBlock( - taken, EXACT, null, true, world, x, y, z, env.getSource(), env.getActor()) - == ACCEPT - ? ACCEPT_STOP - : REJECT; + return StructureUtility + .survivalPlaceBlock(taken, EXACT, null, true, world, x, y, z, env.getSource(), env.getActor()) + == ACCEPT ? ACCEPT_STOP : REJECT; } }; } - public static <T> IStructureElement<T> ofHatchAdderOptional( - IGT_HatchAdder<T> aHatchAdder, int textureIndex, int dots, Block placeCasing, int 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); + 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(); } return new IStructureElement<T>() { + @Override 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)) + && aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex)) || (worldBlock == placeCasing && worldBlock.getDamageValue(world, x, y, z) == placeCasingMeta); } @@ -374,19 +379,11 @@ 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 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); } }; } @@ -396,31 +393,29 @@ 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); } /** * Heating coil structure element. * - * @param aHeatingCoilSetter Notify the controller of this new coil. - * Got called exactly once per coil. - * Might be called less times if structure test fails. - * If the setter returns false then it assumes the coil is rejected. + * @param aHeatingCoilSetter Notify the controller of this new coil. Got called exactly once per coil. Might be + * called less times if structure test fails. 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(); } return new IStructureElement<T>() { + @Override public boolean check(T t, World world, int x, int y, int z) { Block block = world.getBlock(x, y, z); @@ -455,29 +450,27 @@ public class GT_StructureUtility { } @Override - public BlocksToPlace getBlocksToPlace( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { return BlocksToPlace.create(GregTech_API.sBlockCasings5, getMetaFromHint(trigger)); } @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) { return survivalPlaceBlock( - t, world, x, y, z, trigger, AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); + t, + world, + x, + y, + z, + trigger, + AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); } @Override - public PlaceResult survivalPlaceBlock( - T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, + AutoPlaceEnvironment env) { Block block = world.getBlock(x, y, z); boolean isCoil = block instanceof IHeatingCoil && ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)) diff --git a/src/main/java/gregtech/api/util/GT_TooltipDataCache.java b/src/main/java/gregtech/api/util/GT_TooltipDataCache.java index 15f7b69248..699517d288 100644 --- a/src/main/java/gregtech/api/util/GT_TooltipDataCache.java +++ b/src/main/java/gregtech/api/util/GT_TooltipDataCache.java @@ -1,15 +1,18 @@ 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 net.minecraft.util.StatCollector; +import gregtech.GT_Mod; + public class GT_TooltipDataCache { public static class TooltipData { + public List<String> text; public List<String> shiftText; @@ -24,7 +27,7 @@ public class GT_TooltipDataCache { /** * Returns tooltip data respecting the user's configured verbosity levels, applying any formatting arguments. * - * @param key the key to lookup + * @param key the key to lookup * @param args arguments for string formatting (prefer using positional arguments) * @return The tooltip data the user asked for */ @@ -40,7 +43,7 @@ public class GT_TooltipDataCache { /** * Builds tooltip data respecting the user's configured verbosity levels, applying any formatting arguments. * - * @param key the key to lookup + * @param key the key to lookup * @param args arguments for string formatting (prefer using positional arguments) * @return The tooltip data the user asked for */ @@ -48,8 +51,8 @@ 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 @@ -57,13 +60,14 @@ public class GT_TooltipDataCache { 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()))); + 0, + getVerbosityIndex(GT_Mod.gregtechproxy.mTooltipShiftVerbosity, normalLines, lines.size()))); } /** * Gets all the lines for the given key and every other subsequent consecutive key with a .n suffix, n in {1,2,3...} * - * @param key the key to lookup + * @param key the key to lookup * @param args arguments for string formatting (prefer using positional arguments) * @return The lines for the key and all of it's subkeys */ @@ -82,8 +86,8 @@ public class GT_TooltipDataCache { * Determines how many lines from a tooltip to include from the full line list to respect a given verbosity level. * * @param tooltipVerbosity the verbosity level we're applying - * @param defaultIndex return if tooltipVerbosity is 2 - * @param maxIndex return if tooltipVerbosity is greater than 2 + * @param defaultIndex return if tooltipVerbosity is 2 + * @param maxIndex return if tooltipVerbosity is greater than 2 * @return verbosity appropriate index */ private static int getVerbosityIndex(int tooltipVerbosity, int defaultIndex, int maxIndex) { diff --git a/src/main/java/gregtech/api/util/GT_Util.java b/src/main/java/gregtech/api/util/GT_Util.java index 9de1726162..6e203a2682 100644 --- a/src/main/java/gregtech/api/util/GT_Util.java +++ b/src/main/java/gregtech/api/util/GT_Util.java @@ -1,6 +1,5 @@ package gregtech.api.util; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTBase; @@ -11,7 +10,10 @@ import net.minecraft.util.Tuple; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity; + public class GT_Util { + // Last broken tile entity public static final ThreadLocal<TileEntity> LAST_BROKEN_TILEENTITY = new ThreadLocal<>(); @@ -23,13 +25,13 @@ public class GT_Util { 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*/()) + for (Object tKey : aNBT2.func_150296_c /* getKeySet */()) if (!rNBT.hasKey(tKey.toString())) rNBT.setTag(tKey.toString(), aNBT2.getTag(tKey.toString())); return rNBT; } /** - * Construct a NBTTagCompound from a series of key, value pairs. Inspired from GT6. + * Construct a NBTTagCompound from a series of key, value pairs. Inspired from GT6. */ public static NBTTagCompound makeNBT(Tuple... aTags) { final NBTTagCompound rNBT = new NBTTagCompound(); @@ -43,10 +45,8 @@ public class GT_Util { 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 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 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()); } @@ -70,22 +70,22 @@ public class GT_Util { } /** 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) { + 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) @@ -106,29 +106,29 @@ 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; } } aChunk.setChunkModified(); return true; } + /** 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) { @@ -152,12 +152,8 @@ 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) { diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index f1cdde1d48..2134d94253 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -12,50 +12,6 @@ import static gregtech.api.enums.GT_Values.W; import static gregtech.api.enums.Materials.FLUID_MAP; import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; -import cofh.api.transport.IItemDuct; -import com.google.auto.value.AutoValue; -import com.google.common.base.Suppliers; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Maps; -import com.gtnewhorizon.structurelib.alignment.IAlignment; -import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; -import com.mojang.authlib.GameProfile; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.damagesources.GT_DamageSources; -import gregtech.api.damagesources.GT_DamageSources.DamageSourceHotItem; -import gregtech.api.enchants.Enchantment_Hazmat; -import gregtech.api.enchants.Enchantment_Radioactivity; -import gregtech.api.enums.*; -import gregtech.api.events.BlockScanningEvent; -import gregtech.api.interfaces.IBlockContainer; -import gregtech.api.interfaces.IDebugableBlock; -import gregtech.api.interfaces.IHasIndexedTexture; -import gregtech.api.interfaces.IProjectileItem; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IBasicEnergyContainer; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.interfaces.tileentity.IMachineProgress; -import gregtech.api.interfaces.tileentity.IUpgradableMachine; -import gregtech.api.items.GT_EnergyArmor_Item; -import gregtech.api.items.GT_Generic_Item; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.net.GT_Packet_Sound; -import gregtech.api.objects.CollectorUtils; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_ItemStack2; -import gregtech.api.objects.ItemData; -import gregtech.api.threads.GT_Runnable_Sound; -import gregtech.api.util.extensions.ArrayExt; -import gregtech.common.GT_Pollution; -import gregtech.common.blocks.GT_Block_Ores_Abstract; -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; @@ -68,7 +24,9 @@ import java.util.Map.Entry; 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; @@ -120,23 +78,73 @@ import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.oredict.OreDictionary; +import cofh.api.transport.IItemDuct; + +import com.google.auto.value.AutoValue; +import com.google.common.base.Suppliers; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Maps; +import com.gtnewhorizon.structurelib.alignment.IAlignment; +import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; +import com.mojang.authlib.GameProfile; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.damagesources.GT_DamageSources; +import gregtech.api.damagesources.GT_DamageSources.DamageSourceHotItem; +import gregtech.api.enchants.Enchantment_Hazmat; +import gregtech.api.enchants.Enchantment_Radioactivity; +import gregtech.api.enums.*; +import gregtech.api.events.BlockScanningEvent; +import gregtech.api.interfaces.IBlockContainer; +import gregtech.api.interfaces.IDebugableBlock; +import gregtech.api.interfaces.IHasIndexedTexture; +import gregtech.api.interfaces.IProjectileItem; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IBasicEnergyContainer; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.interfaces.tileentity.IUpgradableMachine; +import gregtech.api.items.GT_EnergyArmor_Item; +import gregtech.api.items.GT_Generic_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.net.GT_Packet_Sound; +import gregtech.api.objects.CollectorUtils; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_ItemStack2; +import gregtech.api.objects.ItemData; +import gregtech.api.threads.GT_Runnable_Sound; +import gregtech.api.util.extensions.ArrayExt; +import gregtech.common.GT_Pollution; +import gregtech.common.blocks.GT_Block_Ores_Abstract; +import ic2.api.recipe.IRecipeInput; +import ic2.api.recipe.RecipeInputItemStack; +import ic2.api.recipe.RecipeInputOreDict; +import ic2.api.recipe.RecipeOutput; + /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> * Just a few Utility Functions I use. */ 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<>(); /** - * Forge screwed the Fluid Registry up again, so I make my own, which is also much more efficient than the stupid Stuff over there. + * 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. */ @@ -145,10 +153,10 @@ public class GT_Utility { 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); @@ -156,8 +164,8 @@ 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; + 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)); @@ -171,8 +179,7 @@ public class GT_Utility { } public static int safeInt(long number) { - return number > V[V.length - 1] - ? safeInt(V[V.length - 1], 1) + return number > V[V.length - 1] ? safeInt(V[V.length - 1], 1) : number < Integer.MIN_VALUE ? Integer.MIN_VALUE : (int) number; } @@ -181,7 +188,7 @@ public class GT_Utility { try { rField = aObject.getClass().getDeclaredField(aField); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return rField; } @@ -192,7 +199,7 @@ public class GT_Utility { rField = aObject.getClass().getDeclaredField(aField); rField.setAccessible(true); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return rField; } @@ -203,7 +210,7 @@ public class GT_Utility { rField = aObject.getDeclaredField(aField); rField.setAccessible(true); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return rField; } @@ -214,7 +221,7 @@ public class GT_Utility { rMethod = aObject.getMethod(aMethod, aParameterTypes); rMethod.setAccessible(true); } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } return rMethod; } @@ -225,17 +232,15 @@ public class GT_Utility { rMethod = aObject.getClass().getMethod(aMethod, aParameterTypes); rMethod.setAccessible(true); } catch (Throwable e) { - /*Do nothing*/ + /* 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) + 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; @@ -247,10 +252,8 @@ 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) + 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); @@ -268,13 +271,8 @@ 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++) { @@ -295,8 +293,7 @@ public class GT_Utility { } } - Method tMethod = (aObject instanceof Class) - ? ((Class) aObject).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); @@ -306,34 +303,29 @@ 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); + 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); @@ -377,9 +369,7 @@ 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) { @@ -424,10 +414,11 @@ public class GT_Utility { return false; } - public static ItemStack suckOneItemStackAt( - World aWorld, double aX, double aY, double aZ, double aL, double aH, double 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))) { + EntityItem.class, + AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + aL, aY + aH, aZ + aW))) { if (!tItem.isDead) { aWorld.removeEntity(tItem); tItem.setDead(); @@ -497,23 +488,15 @@ public class GT_Utility { .isPipeConnected(ForgeDirection.getOrientation(aSide)); return GregTech_API.mTranslocator && aTileEntity instanceof codechicken.translocator.TileItemTranslocator; } + /** * Moves Stack from Inv-Slot to Inv-Slot, without checking if its even allowed. * * @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) { + 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, @@ -534,32 +517,25 @@ 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 + 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; + || 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))) { + aTileEntity1, + aGrabSlot, + (byte) aGrabFrom, + aTileEntity1.getStackInSlot(aGrabSlot))) { if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { ItemStack tStack = copyAmount( @@ -569,10 +545,11 @@ public class GT_Utility { 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); + 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; @@ -587,7 +564,10 @@ public class GT_Utility { for (int aGrabSlot : aGrabSlots) { if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlot), true, aInvertFilter)) { if (isAllowedToTakeFromSlot( - aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { + aTileEntity1, + aGrabSlot, + (byte) aGrabFrom, + aTileEntity1.getStackInSlot(aGrabSlot))) { if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { ItemStack tStack = copyAmount( @@ -616,8 +596,7 @@ public class GT_Utility { } ForgeDirection tDirection = ForgeDirection.getOrientation(aGrabFrom); - if (aTileEntity1 instanceof TileEntity - && tDirection != ForgeDirection.UNKNOWN + 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, @@ -626,7 +605,10 @@ public class GT_Utility { for (int aGrabSlot : aGrabSlots) { if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlot), true, aInvertFilter)) { if (isAllowedToTakeFromSlot( - aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { + aTileEntity1, + aGrabSlot, + (byte) aGrabFrom, + aTileEntity1.getStackInSlot(aGrabSlot))) { if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { ItemStack tStack = copyAmount( @@ -655,29 +637,22 @@ public class GT_Utility { } /** - * Moves Stack from Inv-Slot to Inv-Slot, without checking if its even allowed. (useful for internal Inventory Operations) + * Moves Stack from Inv-Slot to Inv-Slot, without checking if its even allowed. (useful for internal Inventory + * Operations) * * @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 + 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; + || aMinMoveAtOnce > aMaxMoveAtOnce) + return 0; - ItemStack tStack1 = aTileEntity1.getStackInSlot(aGrabFrom), - tStack2 = aTileEntity2.getStackInSlot(aPutTo), + ItemStack tStack1 = aTileEntity1.getStackInSlot(aGrabFrom), tStack2 = aTileEntity2.getStackInSlot(aPutTo), tStack3 = null; if (tStack1 != null) { if (tStack2 != null && !areStacksEqual(tStack1, tStack2)) return 0; @@ -689,11 +664,11 @@ public class GT_Utility { Math.min( tStack2 == null ? Integer.MAX_VALUE : tStack2.getMaxStackSize(), aTileEntity2.getInventoryStackLimit()))); - tStack3.stackSize = - Math.min(tStack3.stackSize, aMaxTargetStackSize - (tStack2 == null ? 0 : tStack2.stackSize)); + 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) + >= Math.min(tStack3.getMaxStackSize(), aMinTargetStackSize) && tStack3.stackSize >= aMinMoveAtOnce) { tStack3 = aTileEntity1.decrStackSize(aGrabFrom, tStack3.stackSize); aTileEntity1.markDirty(); @@ -725,8 +700,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; @@ -739,7 +714,8 @@ public class GT_Utility { || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte) 5, aStack, aMaxStackSize); } if (aTileEntity instanceof ISidedInventory - && !((ISidedInventory) aTileEntity).canInsertItem(aSlot, aStack, aSide)) return false; + && !((ISidedInventory) aTileEntity).canInsertItem(aSlot, aStack, aSide)) + return false; return aSlot < aTileEntity.getSizeInventory() && aTileEntity.isItemValidForSlot(aSlot, aStack); } @@ -748,55 +724,35 @@ 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 + 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; + || aMaxStackTransfer == 0) + return 0; // find where to take from final int[] tGrabSlots = new int[aTileEntity1.getSizeInventory()]; @@ -804,10 +760,10 @@ public class GT_Utility { if (aTileEntity1 instanceof ISidedInventory) { for (int i : ((ISidedInventory) aTileEntity1).getAccessibleSlotsFromSide(aGrabFrom)) { final ItemStack s = aTileEntity1.getStackInSlot(i); - if (s == null - || !isAllowedToTakeFromSlot(aTileEntity1, i, aGrabFrom, s) + if (s == null || !isAllowedToTakeFromSlot(aTileEntity1, i, aGrabFrom, s) || s.stackSize < aMinMoveAtOnce - || !listContainsItem(aFilter, s, true, aInvertFilter)) continue; + || !listContainsItem(aFilter, s, true, aInvertFilter)) + continue; tGrabSlots[tGrabSlotsSize++] = i; } } else { @@ -822,19 +778,18 @@ public class GT_Utility { // no source, bail out 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); + if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) return moveFromAdjacentChests( + (TileEntityChest) aTileEntity1, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer); return 0; } @@ -865,31 +820,31 @@ public class GT_Utility { tPutFreeSlots.add(slot); } 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); - tPutItemStacks.computeIfAbsent(sID, k -> new ArrayList<>()).add(s); - } + ItemId sID = ItemId.createNoCopy(s); + 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()) { // 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); + if (aDoCheckChests && aTileEntity2 instanceof TileEntityChest) return moveToAdjacentChests( + aTileEntity1, + (TileEntityChest) aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer); return 0; } @@ -971,17 +926,15 @@ public class GT_Utility { 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 - final int spare = - Math.min(s.getMaxStackSize(), tPutInventory.getInventoryStackLimit()) - - s.stackSize; + final int spare = Math + .min(s.getMaxStackSize(), tPutInventory.getInventoryStackLimit()) + - s.stackSize; if (spare > 0) { final 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); @@ -1002,8 +955,8 @@ public class GT_Utility { // check if we have moved enough stacks 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 @@ -1066,18 +1019,9 @@ public class GT_Utility { 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( @@ -1140,18 +1084,9 @@ public class GT_Utility { 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, @@ -1217,54 +1152,36 @@ public class GT_Utility { * * @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) { - if (aTileEntity1 instanceof IInventory) - return moveOneItemStack( - (IInventory) aTileEntity1, - aTileEntity2, - aGrabFrom, - aPutTo, - aFilter, - aInvertFilter, - aMaxTargetStackSize, - aMinTargetStackSize, - aMaxMoveAtOnce, - aMinMoveAtOnce, - true); + 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 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 + 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; + || aMinMoveAtOnce > aMaxMoveAtOnce) + return 0; int[] tGrabSlots = null; if (aTileEntity1 instanceof ISidedInventory) @@ -1292,7 +1209,11 @@ public class GT_Utility { && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlot, aGrabFrom, tGrabStack)) { for (int tPutSlot : tPutSlots) { if (isAllowedToPutIntoSlot( - (IInventory) aTileEntity2, tPutSlot, aPutTo, tGrabStack, aMaxTargetStackSize)) { + (IInventory) aTileEntity2, + tPutSlot, + aPutTo, + tGrabStack, + aMaxTargetStackSize)) { tMovedItemCount += moveStackFromSlotAToSlotB( aTileEntity1, (IInventory) aTileEntity2, @@ -1303,7 +1224,8 @@ public class GT_Utility { (byte) (aMaxMoveAtOnce - tMovedItemCount), aMinMoveAtOnce); if (tMovedItemCount >= aMaxMoveAtOnce - || (tMovedItemCount > 0 && aMaxTargetStackSize < 64)) return tMovedItemCount; + || (tMovedItemCount > 0 && aMaxTargetStackSize < 64)) + return tMovedItemCount; } } } @@ -1453,25 +1375,17 @@ 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) + 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; + || aMinMoveAtOnce > aMaxMoveAtOnce) + return 0; int[] tGrabSlots = null; if (aTileEntity1 instanceof ISidedInventory) @@ -1484,7 +1398,10 @@ public class GT_Utility { if (aTileEntity2 instanceof IInventory) { for (int tGrabSlot : tGrabSlots) { if (listContainsItem( - aFilter, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot), true, aInvertFilter)) { + aFilter, + ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot), + true, + aInvertFilter)) { if (isAllowedToTakeFromSlot( (IInventory) aTileEntity1, tGrabSlot, @@ -1532,30 +1449,26 @@ 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 + 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; + || 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)) { + aTileEntity2, + aPutTo, + (byte) 6, + aTileEntity1.getStackInSlot(aGrabFrom), + aMaxTargetStackSize)) { byte tMovedItemCount = moveStackFromSlotAToSlotB( aTileEntity1, aTileEntity2, @@ -1577,24 +1490,15 @@ 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 + 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; + || aMinMoveAtOnce > aMaxMoveAtOnce) + return 0; if (!listContainsItem(aFilter, fromTile.getStackInSlot(aGrabFrom), true, aInvertFilter) || !isAllowedToTakeFromSlot(fromTile, aGrabFrom, (byte) 6, fromTile.getStackInSlot(aGrabFrom))) @@ -1697,7 +1601,7 @@ public class GT_Utility { return moveStackIntoPipe( fromTile, toTile, - new int[] {aGrabFrom}, + new int[] { aGrabFrom }, (byte) 6, aPutTo, aFilter, @@ -1709,17 +1613,9 @@ public class GT_Utility { 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) { + 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, @@ -1734,8 +1630,8 @@ public class GT_Utility { true); } - public static boolean listContainsItem( - Collection<ItemStack> aList, ItemStack aStack, boolean aTIfListEmpty, boolean aInvertFilter) { + 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; @@ -1754,8 +1650,7 @@ public class GT_Utility { 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())) + && (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); @@ -1768,12 +1663,10 @@ public class GT_Utility { } public static boolean areFluidsEqual(FluidStack aFluid1, FluidStack aFluid2, boolean aIgnoreNBT) { - return aFluid1 != null - && aFluid2 != null + return aFluid1 != null && aFluid2 != null && aFluid1.getFluid() == aFluid2.getFluid() - && (aIgnoreNBT - || ((aFluid1.tag == null) == (aFluid2.tag == null)) - && (aFluid1.tag == null || aFluid1.tag.equals(aFluid2.tag))); + && (aIgnoreNBT || ((aFluid1.tag == null) == (aFluid2.tag == null)) + && (aFluid1.tag == null || aFluid1.tag.equals(aFluid2.tag))); } public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2) { @@ -1781,13 +1674,11 @@ public class GT_Utility { } public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) { - return aStack1 != null - && aStack2 != null + return aStack1 != null && aStack2 != null && aStack1.getItem() == aStack2.getItem() - && (aIgnoreNBT - || (((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) - && (aStack1.getTagCompound() == null - || aStack1.getTagCompound().equals(aStack2.getTagCompound())))) + && (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); @@ -1798,19 +1689,19 @@ 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(); ) { + for (Iterator<ItemStack> it1 = lhs.iterator(), it2 = rhs.iterator(); it1.hasNext() && it2.hasNext();) { 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() @@ -1824,7 +1715,9 @@ 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); + GT_OreDictUnificator.get_nocopy(aStack1), + GT_OreDictUnificator.get_nocopy(aStack2), + aIgnoreNBT); } public static String getFluidName(Fluid aFluid, boolean aLocalized) { @@ -1847,12 +1740,13 @@ 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<>()); + new GT_ItemStack(tData.emptyContainer), + tFluidToContainer = new /* Concurrent */ HashMap<>()); GregTech_API.sFluidMappings.add(tFluidToContainer); } tFluidToContainer.put(tData.fluid.getFluid(), tData); @@ -1874,12 +1768,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); @@ -1899,8 +1793,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) { @@ -1909,14 +1803,12 @@ public class GT_Utility { } return null; } - if (aCheckIFluidContainerItems - && aStack.getItem() instanceof IFluidContainerItem + 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); + 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); return aStack; } Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(aStack)); @@ -1928,8 +1820,7 @@ public class GT_Utility { } public static int calculateRecipeEU(Materials aMaterial, int defaultRecipeEUPerTick) { - return aMaterial.getProcessingMaterialTierEU() == 0 - ? defaultRecipeEUPerTick + return aMaterial.getProcessingMaterialTierEU() == 0 ? defaultRecipeEUPerTick : aMaterial.getProcessingMaterialTierEU(); } @@ -1957,35 +1848,32 @@ public class GT_Utility { tNBT.setBoolean("mHideStackSize", aHideStackSize); try { tNBT.setString("mFluidMaterialName", FLUID_MAP.get(aFluid.getFluid()).mName); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} rStack.setTagCompound(tNBT); return rStack; } 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 + if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) - return aFluid.isFluidEqual( - ((IFluidContainerItem) aStack.getItem()).getFluid(aStack = copyAmount(1, aStack))); + 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 + 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)); @@ -1999,8 +1887,7 @@ 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 + 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; @@ -2015,15 +1902,16 @@ public class GT_Utility { public static ItemStack getContainerItem(ItemStack aStack, boolean aCheckIFluidContainerItems) { if (isStackInvalid(aStack)) return null; if (aStack.getItem().hasContainerItem(aStack)) return aStack.getItem().getContainerItem(aStack); - /** These are all special Cases, in which it is intended to have only GT Blocks outputting those Container Items */ + /** + * 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 (aStack.getItem() == Items.potionitem - || aStack.getItem() == Items.experience_bottle + 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); + || ItemList.TF_Vial_FieryTears.isStackEqual(aStack)) + return ItemList.Bottle_Empty.get(1); - if (aCheckIFluidContainerItems - && aStack.getItem() instanceof IFluidContainerItem + 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); @@ -2047,79 +1935,71 @@ public class GT_Utility { return fluidStack; } - public static synchronized boolean removeIC2BottleRecipe( - ItemStack aContainer, - ItemStack aInput, - Map<ic2.api.recipe.ICannerBottleRecipeManager.Input, RecipeOutput> aRecipeList, - ItemStack aOutput) { + 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) { @@ -2131,13 +2011,14 @@ public class GT_Utility { ItemStack[] tStack = GT_OreDictUnificator.getStackArray(true, aOutput); 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)); + new RecipeInputItemStack(copyOrNull(aInput), aInput.stackSize), + new RecipeOutput(aNBT, tStack)); } return true; } @@ -2165,8 +2046,8 @@ 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]); @@ -2175,12 +2056,21 @@ public class GT_Utility { 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); } @@ -2194,20 +2084,25 @@ 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); + 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(), @@ -2218,13 +2113,8 @@ public class GT_Utility { 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); } @@ -2233,65 +2123,61 @@ 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); + 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) { + 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); + 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) { - if (!FMLCommonHandler.instance().getEffectiveSide().isClient() - || 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(); - 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(); + public static boolean doSoundAtClient(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; + 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(); + 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(); return true; } @@ -2300,34 +2186,42 @@ 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); + 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); + 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), + sound.resourceLocation.toString(), + aSoundStrength, + aSoundModulation, + aX, + (short) aY, + aZ), aX, aZ); return true; @@ -2400,7 +2294,7 @@ public class GT_Utility { public static <T> ArrayList<T> getArrayListWithoutTrailingNulls(T... aArray) { if (aArray == null) return new ArrayList<>(); ArrayList<T> rList = new ArrayList<>(Arrays.asList(aArray)); - for (int i = rList.size() - 1; i >= 0 && rList.get(i) == null; ) rList.remove(i--); + for (int i = rList.size() - 1; i >= 0 && rList.get(i) == null;) rList.remove(i--); return rList; } @@ -2437,21 +2331,21 @@ public class GT_Utility { } public static boolean isStackValid(Object aStack) { - return (aStack instanceof ItemStack) - && ((ItemStack) aStack).getItem() != null + return (aStack instanceof ItemStack) && ((ItemStack) aStack).getItem() != null && ((ItemStack) aStack).stackSize >= 0; } public static boolean isStackInvalid(Object aStack) { - return aStack == null - || !(aStack instanceof ItemStack) + 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) { @@ -2473,9 +2367,8 @@ public class GT_Utility { } public static void setCoordsOnFire(World aWorld, int aX, int aY, int aZ, boolean aReplaceCenter) { - if (aReplaceCenter) - if (aWorld.getBlock(aX, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) == null) - aWorld.setBlock(aX, aY, aZ, Blocks.fire); + if (aReplaceCenter) if (aWorld.getBlock(aX, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) == null) + aWorld.setBlock(aX, aY, aZ, Blocks.fire); if (aWorld.getBlock(aX + 1, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX + 1, aY, aZ) == null) aWorld.setBlock(aX + 1, aY, aZ, Blocks.fire); if (aWorld.getBlock(aX - 1, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX - 1, aY, aZ) == null) @@ -2491,34 +2384,28 @@ 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); + } } /** - * Initializes new empty texture page for casings - * page 0 is old CASING_BLOCKS + * Initializes new empty texture page for casings page 0 is old CASING_BLOCKS * - * Then casings should be registered like this: - * for (byte i = MIN_USED_META; i < MAX_USED_META; i = (byte) (i + 1)) { - * Textures.BlockIcons.casingTexturePages[PAGE][i+START_INDEX] = new GT_CopiedBlockTexture(this, 6, i); - * } + * Then casings should be registered like this: for (byte i = MIN_USED_META; i < MAX_USED_META; i = (byte) (i + 1)) + * { Textures.BlockIcons.casingTexturePages[PAGE][i+START_INDEX] = new GT_CopiedBlockTexture(this, 6, i); } * * @param page 0 to 127 * @return true if it made empty page, false if one already existed... @@ -2534,7 +2421,8 @@ public class GT_Utility { /** * Return texture id from page and index, for use when determining hatches, but can also be precomputed from: * (page<<7)+index - * @param page 0 to 127 page + * + * @param page 0 to 127 page * @param index 0 to 127 texture index * @return casing texture 0 to 16383 */ @@ -2548,21 +2436,30 @@ public class GT_Utility { /** * Return texture id from page and index, for use when determining hatches, but can also be precomputed from: * (page<<7)+index - * @param page 0 to 127 page + * + * @param page 0 to 127 page * @param startIndex 0 to 127 start texture index - * @param blockMeta meta of the block + * @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); } - throw new RuntimeException("Index out of range: [" + page + "][" + startIndex + "+" + blockMeta + "=" - + (startIndex + blockMeta) + "]"); + throw new RuntimeException( + "Index out of range: [" + page + + "][" + + startIndex + + "+" + + blockMeta + + "=" + + (startIndex + blockMeta) + + "]"); } /** * Return texture id from item stack, unoptimized but readable? + * * @return casing texture 0 to 16383 */ @Deprecated @@ -2572,6 +2469,7 @@ public class GT_Utility { /** * Return texture id from item stack, unoptimized but readable? + * * @return casing texture 0 to 16383 */ public static int getTextureId(Block blockFromBlock, byte metaFromBlock) { @@ -2590,8 +2488,10 @@ 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); } /** @@ -2745,8 +2645,7 @@ public class GT_Utility { public static float getHeatDamageFromItem(ItemStack aStack) { ItemData tData = GT_OreDictUnificator.getItemData(aStack); - return tData == null - ? 0 + return tData == null ? 0 : (tData.mPrefix == null ? 0 : tData.mPrefix.mHeatDamage) + (tData.hasValidMaterialData() ? tData.mMaterial.mMaterial.mHeatDamage : 0); } @@ -2775,8 +2674,7 @@ public class GT_Utility { } private static boolean applyHeatDamage(EntityLivingBase aEntity, float aDamage, DamageSource source) { - if (aDamage > 0 - && aEntity != null + if (aDamage > 0 && aEntity != null && aEntity.getActivePotionEffect(Potion.fireResistance) == null && !isWearingFullHeatHazmat(aEntity)) { aEntity.attackEntityFrom(source, aDamage); @@ -2803,66 +2701,59 @@ public class GT_Utility { } public static boolean applyRadioactivity(EntityLivingBase aEntity, int aLevel, int aAmountOfItems) { - if (aLevel > 0 - && aEntity != null + 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( + aEntity.addPotionEffect( + new PotionEffect( + Potion.moveSlowdown.id, + aLevel * 140 * aAmountOfItems + Math.max( 0, - ((tEffect = aEntity.getActivePotionEffect(Potion.moveSlowdown)) == null - ? 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( + 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 = 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( + 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 = 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( + 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 = 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( + 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 = 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( + 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 = aEntity.getActivePotionEffect(Potion.potionTypes[24])) == null ? 0 : tEffect.getDuration())), - Math.max(0, (5 * aLevel) / 7))); + Math.max(0, (5 * aLevel) / 7))); return true; } return false; @@ -3041,8 +2932,7 @@ 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()) + return map.entrySet().stream().sorted(Entry.comparingByValue()) .collect(CollectorUtils.entriesToMap(LinkedHashMap::new)); } @@ -3067,7 +2957,8 @@ public class GT_Utility { } /** - * Translates a Material Amount into an Amount of Fluid. Second Parameter for things like Bucket Amounts (1000) and similar + * 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( @@ -3077,8 +2968,7 @@ public class GT_Utility { } /** - * This checks if the Dimension is really a Dimension and not another Planet or something. - * Used for my Teleporter. + * This checks if the Dimension is really a Dimension and not another Planet or something. Used for my Teleporter. */ public static boolean isRealDimension(int aDimensionID) { if (aDimensionID <= 1 && aDimensionID >= -1 && !GregTech_API.sDimensionalList.contains(aDimensionID)) @@ -3087,8 +2977,8 @@ public class GT_Utility { && DimensionManager.isDimensionRegistered(aDimensionID); } - public static boolean moveEntityToDimensionAtCoords( - Entity entity, int aDimension, double aX, double aY, double aZ) { + 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; @@ -3096,8 +2986,8 @@ public class GT_Utility { 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; @@ -3111,11 +3001,12 @@ public class GT_Utility { EntityPlayerMP player = (EntityPlayerMP) entity; 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); @@ -3169,8 +3060,8 @@ 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()) { @@ -3179,9 +3070,10 @@ public class GT_Utility { player.playerNetServerHandler.sendPacket( new S1FPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel)); - FMLCommonHandler.instance() - .firePlayerChangedDimensionEvent( - player, startWorld.provider.dimensionId, destinationWorld.provider.dimensionId); + FMLCommonHandler.instance().firePlayerChangedDimensionEvent( + player, + startWorld.provider.dimensionId, + destinationWorld.provider.dimensionId); } entity.setLocationAndAngles(aX, aY, aZ, entity.rotationYaw, entity.rotationPitch); @@ -3194,18 +3086,8 @@ public class GT_Utility { 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) { + 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<>(); @@ -3215,43 +3097,60 @@ 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 + " -----"); - try { - if (tTileEntity instanceof IInventory) - tList.add(GT_Utility.trans("162", "Name: ") - + EnumChatFormatting.BLUE - + ((IInventory) tTileEntity).getInventoryName() + tList.add( + "----- X: " + EnumChatFormatting.AQUA + + formatNumbers(aX) + + EnumChatFormatting.RESET + + " Y: " + + EnumChatFormatting.AQUA + + formatNumbers(aY) + EnumChatFormatting.RESET - + GT_Utility.trans("163", " MetaData: ") + + " Z: " + EnumChatFormatting.AQUA - + aWorld.getBlockMetadata(aX, aY, aZ) - + EnumChatFormatting.RESET); - else - tList.add(GT_Utility.trans("162", "Name: ") - + EnumChatFormatting.BLUE - + tBlock.getUnlocalizedName() + + formatNumbers(aZ) + EnumChatFormatting.RESET - + GT_Utility.trans("163", " MetaData: ") + + " D: " + 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); + + 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); + 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); } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } @@ -3259,17 +3158,24 @@ 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); @@ -3285,17 +3191,22 @@ 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("169", "HEM: ") + 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("170"," Base EU Output: ")/* + + * ((ic2.api.reactor.IReactor)tTileEntity).getOutput() + */ ); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -3305,10 +3216,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) { @@ -3317,11 +3228,15 @@ 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( + 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 @@ -3337,10 +3252,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); @@ -3348,11 +3263,15 @@ 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); @@ -3360,10 +3279,9 @@ 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); @@ -3378,11 +3296,14 @@ 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); + 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); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -3390,8 +3311,7 @@ public class GT_Utility { try { if (tTileEntity instanceof ICoverable) { rEUAmount += 300; - final String tString = ((ICoverable) tTileEntity) - .getCoverInfoAtSide((byte) aSide) + final String tString = ((ICoverable) tTileEntity).getCoverInfoAtSide((byte) aSide) .getBehaviorDescription(); if (tString != null && !tString.equals(E)) tList.add(tString); } @@ -3401,33 +3321,49 @@ public class GT_Utility { 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"); + 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); @@ -3446,29 +3382,29 @@ public class GT_Utility { final ic2.api.crops.ICropTile crop = (ic2.api.crops.ICropTile) tTileEntity; 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()) { @@ -3476,8 +3412,7 @@ public class GT_Utility { } 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("199", "Discovered by: ") + crop.getCrop().discoveredBy()); } } } catch (Throwable e) { @@ -3486,8 +3421,7 @@ 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) { rEUAmount += 1000; @@ -3503,24 +3437,34 @@ public class GT_Utility { 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"); - else - tList.add(EnumChatFormatting.GOLD + GT_Utility.trans("201", "Nothing") + EnumChatFormatting.RESET + ": " - + EnumChatFormatting.YELLOW + '0' + EnumChatFormatting.RESET + " L"); - } - // if(aPlayer.capabilities.isCreativeMode){ + 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"); + } + // 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 { @@ -3562,30 +3506,31 @@ public class GT_Utility { } /** - * @return an Array containing the X and the Y Coordinate of the clicked Point, with the top left Corner as Origin, like on the Texture Sheet. return values should always be between [0.0F and 0.99F]. + * @return an Array containing the X and the Y Coordinate of the clicked Point, with the top left Corner as Origin, + * like on the Texture Sheet. return values should always be between [0.0F and 0.99F]. */ 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 }; } } /** - * This Function determines the direction a Block gets when being Wrenched. - * returns -1 if invalid. Even though that could never happen. + * This Function determines the direction a Block gets when being Wrenched. returns -1 if invalid. Even though that + * could never happen. */ public static byte determineWrenchingSide(byte aSide, float aX, float aY, float aZ) { byte tBack = getOppositeSide(aSide); @@ -3676,13 +3621,12 @@ public class GT_Utility { } /* - * 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. + * 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) { - if (stack != null - && GT_OreDictUnificator.getItemData(stack).mMaterial.mMaterial == mat + 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; return true; @@ -3726,7 +3670,13 @@ public class GT_Utility { 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); + 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); @@ -3735,12 +3685,14 @@ 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); + 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; @@ -3758,6 +3710,7 @@ public class GT_Utility { } public static class ItemNBT { + public static void setNBT(ItemStack aStack, NBTTagCompound aNBT) { if (aNBT == null) { aStack.setTagCompound(null); @@ -3766,8 +3719,7 @@ 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) + 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); @@ -3837,15 +3789,19 @@ 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(","); } @@ -3853,16 +3809,8 @@ public class GT_Utility { setNBT(aStack, tNBT); } - public static void setAdvancedProspectionData( - byte aTier, - ItemStack aStack, - int aX, - short aY, - int aZ, - int aDim, - ArrayList<String> aOils, - ArrayList<String> aOres, - int aRadius) { + public static void setAdvancedProspectionData(byte aTier, ItemStack aStack, int aX, short aY, int aZ, int aDim, + ArrayList<String> aOils, ArrayList<String> aOres, int aRadius) { setBookTitle(aStack, "Raw Prospection Data"); @@ -3884,8 +3832,10 @@ public class GT_Utility { 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"; + 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; @@ -3910,8 +3860,10 @@ public class GT_Utility { 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); @@ -3930,16 +3882,33 @@ public class GT_Utility { if (tDataArray.length > 6) { tNBT.setString( "author", - " Dim: " + tDataArray[3] + "X: " + tDataArray[0] + " Y: " + tDataArray[1] + " Z: " + " 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 @@ -3955,10 +3924,14 @@ 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" + 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"; tNBTList.appendTag(new NBTTagString(tPageText)); @@ -3967,12 +3940,15 @@ public class GT_Utility { if (tOils != null) fillBookWithList(tNBTList, "Oils%s\n\n", "\n", 9, tOils); - tPageText = "Oil notes\n\n" - + "Prospects from NW to SE 576 chunks" - + "(9 8x8 oilfields)\n around and gives min-max amount" + "\n\n" - + "[1][2][3]" + "\n" - + "[4][5][6]" + "\n" - + "[7][8][9]" + "\n" + tPageText = "Oil notes\n\n" + "Prospects from NW to SE 576 chunks" + + "(9 8x8 oilfields)\n around and gives min-max amount" + + "\n\n" + + "[1][2][3]" + + "\n" + + "[4][5][6]" + + "\n" + + "[7][8][9]" + + "\n" + "\n" + "[5] - Prospector in this 8x8 area"; tNBTList.appendTag(new NBTTagString(tPageText)); @@ -3986,8 +3962,8 @@ public class GT_Utility { 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; @@ -3995,9 +3971,7 @@ public class GT_Utility { 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]); + tPageText.append((tPageText.length() == 0) ? "" : aListDelimiter).append(list[i]); if (tPageText.length() > 0) { String tPageCounter = tTotalPages > 1 ? String.format(aPageFormatter, tPage + 1, tTotalPages) : ""; @@ -4040,6 +4014,7 @@ public class GT_Utility { * THIS IS BULLSHIT!!! WHY DO I HAVE TO DO THIS SHIT JUST TO HAVE ENCHANTS PROPERLY!?! */ public static class GT_EnchantmentHelper { + private static final BullshitIteratorA mBullshitIteratorA = new BullshitIteratorA(); private static final BullshitIteratorB mBullshitIteratorB = new BullshitIteratorB(); @@ -4085,10 +4060,12 @@ public class GT_Utility { } interface IBullshit { + void calculateModifier(Enchantment aEnchantment, int aLevel); } static final class BullshitIteratorA implements IBullshit { + public EntityLivingBase mPlayer; public Entity mEntity; @@ -4101,6 +4078,7 @@ public class GT_Utility { } static final class BullshitIteratorB implements IBullshit { + public EntityLivingBase mPlayer; public Entity mEntity; @@ -4123,10 +4101,7 @@ public class GT_Utility { public static boolean isPartOfMaterials(ItemStack aStack, Materials aMaterials) { return GT_OreDictUnificator.getAssociation(aStack) != null - && GT_OreDictUnificator.getAssociation(aStack) - .mMaterial - .mMaterial - .equals(aMaterials); + && GT_OreDictUnificator.getAssociation(aStack).mMaterial.mMaterial.equals(aMaterials); } public static boolean isPartOfOrePrefix(ItemStack aStack, OrePrefixes aPrefix) { @@ -4140,8 +4115,7 @@ public class GT_Utility { "gtPlusPlus.core.block.base.BlockBaseOre"); public static boolean isOre(Block aBlock, int aMeta) { - return (aBlock instanceof GT_Block_Ores_Abstract) - || isOre(new ItemStack(aBlock, 1, aMeta)) + return (aBlock instanceof GT_Block_Ores_Abstract) || isOre(new ItemStack(aBlock, 1, aMeta)) || ORE_BLOCK_CLASSES.contains(aBlock.getClass().getName()); } @@ -4161,16 +4135,16 @@ public class GT_Utility { } /** - * Do <b>NOT</b> mutate the returned {@code ItemStack}! - * We return {@code ItemStack} instead of {@code Block} so that we can include metadata. + * Do <b>NOT</b> mutate the returned {@code ItemStack}! We return {@code ItemStack} instead of {@code Block} so that + * we can include metadata. */ 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. // 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) { @@ -4194,8 +4168,7 @@ 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); @@ -4211,8 +4184,18 @@ public class GT_Utility { 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) { @@ -4252,8 +4235,7 @@ 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; @@ -4272,13 +4254,23 @@ public class GT_Utility { // 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)); } /** - * Add an itemstack to player inventory, or drop on ground if full. - * Can be called on client but it probably won't work very well. + * Add an itemstack to player inventory, or drop on ground if full. Can be called on client but it probably won't + * work very well. */ public static void addItemToPlayerInventory(EntityPlayer aPlayer, ItemStack aStack) { if (isStackInvalid(aStack)) return; @@ -4389,6 +4381,7 @@ public class GT_Utility { @AutoValue public abstract static class ItemId { + /** This method copies NBT, as it is mutable. */ public static ItemId create(ItemStack itemStack) { NBTTagCompound nbt = itemStack.getTagCompound(); @@ -4402,7 +4395,9 @@ public class GT_Utility { /** 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(); diff --git a/src/main/java/gregtech/api/util/GT_UtilityClient.java b/src/main/java/gregtech/api/util/GT_UtilityClient.java index 8cbf6bf4ad..22bf2b746e 100644 --- a/src/main/java/gregtech/api/util/GT_UtilityClient.java +++ b/src/main/java/gregtech/api/util/GT_UtilityClient.java @@ -1,18 +1,21 @@ 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 com.google.common.collect.Lists; +import cpw.mods.fml.relauncher.ReflectionHelper; + public class GT_UtilityClient { - private static final Field isDrawingField = - ReflectionHelper.findField(Tessellator.class, "isDrawing", "field_78415_z"); + + private static final Field isDrawingField = ReflectionHelper + .findField(Tessellator.class, "isDrawing", "field_78415_z"); public static boolean isDrawing(Tessellator tess) { try { @@ -27,7 +30,8 @@ public class GT_UtilityClient { public static List<String> getTooltip(ItemStack aStack, boolean aGuiStyle) { try { List<String> tooltip = aStack.getTooltip( - Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips); + Minecraft.getMinecraft().thePlayer, + Minecraft.getMinecraft().gameSettings.advancedItemTooltips); if (aGuiStyle) { tooltip.set( 0, @@ -40,10 +44,9 @@ public class GT_UtilityClient { 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()); + 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 ecf2921d36..dee0ac36ad 100644 --- a/src/main/java/gregtech/api/util/IGT_HatchAdder.java +++ b/src/main/java/gregtech/api/util/IGT_HatchAdder.java @@ -3,6 +3,7 @@ package gregtech.api.util; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; public interface IGT_HatchAdder<T> { + /** * Callback to add hatch, needs to check if hatch is valid (and add it) * diff --git a/src/main/java/gregtech/api/util/ISerializableObject.java b/src/main/java/gregtech/api/util/ISerializableObject.java index b8014860f8..3895e277ad 100644 --- a/src/main/java/gregtech/api/util/ISerializableObject.java +++ b/src/main/java/gregtech/api/util/ISerializableObject.java @@ -1,10 +1,10 @@ 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; @@ -14,6 +14,9 @@ import net.minecraft.nbt.NBTSizeTracker; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagInt; +import com.google.common.io.ByteArrayDataInput; +import io.netty.buffer.ByteBuf; + /** * We could well have used {@link java.io.Serializable}, but that's too slow and should generally be avoided * @@ -25,17 +28,16 @@ public interface ISerializableObject { ISerializableObject copy(); /** - * If you are overriding this, you must <b>NOT</b> return {@link NBTTagInt} here! That return - * type is how we tell that we are loading legacy data, and only {@link LegacyCoverData} is - * allowed to return it. You probably want to return {@link NBTTagCompound} anyway. + * If you are overriding this, you must <b>NOT</b> return {@link NBTTagInt} here! That return type is how we tell + * that we are loading legacy data, and only {@link LegacyCoverData} is allowed to return it. You probably want to + * return {@link NBTTagCompound} anyway. */ @Nonnull NBTBase saveDataToNBT(); /** - * Write data to given ByteBuf - * The data saved this way is intended to be stored for short amount of time over network. - * DO NOT store it to disks. + * Write data to given ByteBuf The data saved this way is intended to be stored for short amount of time over + * network. DO NOT store it to disks. */ // the NBT is an unfortunate piece of tech. everything uses it but its API is not as efficient as could be void writeToByteBuf(ByteBuf aBuf); @@ -43,8 +45,9 @@ public interface ISerializableObject { void loadDataFromNBT(NBTBase aNBT); /** - * Read data from given parameter and return this. - * The data read this way is intended to be stored for short amount of time over network. + * Read data from given parameter and return this. The data read this way is intended to be stored for short amount + * of time over network. + * * @param aPlayer the player who is sending this packet to server. null if it's client reading data. */ // the NBT is an unfortunate piece of tech. everything uses it but its API is not as efficient as could be @@ -52,8 +55,8 @@ public interface ISerializableObject { ISerializableObject readFromPacket(ByteArrayDataInput aBuf, @Nullable EntityPlayerMP aPlayer); /** - * Reverse engineered and adapted {@link cpw.mods.fml.common.network.ByteBufUtils#readTag(ByteBuf)} - * Given buffer must contain a serialized NBTTagCompound in minecraft encoding + * Reverse engineered and adapted {@link cpw.mods.fml.common.network.ByteBufUtils#readTag(ByteBuf)} Given buffer + * must contain a serialized NBTTagCompound in minecraft encoding */ static NBTTagCompound readCompoundTagFromGreggyByteBuf(ByteArrayDataInput aBuf) { short size = aBuf.readShort(); @@ -70,8 +73,8 @@ public interface ISerializableObject { } /** - * Reverse engineered and adapted {@link cpw.mods.fml.common.network.ByteBufUtils#readItemStack(ByteBuf)} - * Given buffer must contain a serialized ItemStack in minecraft encoding + * Reverse engineered and adapted {@link cpw.mods.fml.common.network.ByteBufUtils#readItemStack(ByteBuf)} Given + * buffer must contain a serialized ItemStack in minecraft encoding */ static ItemStack readItemStackFromGreggyByteBuf(ByteArrayDataInput aBuf) { ItemStack stack = null; @@ -86,6 +89,7 @@ public interface ISerializableObject { } final class LegacyCoverData implements ISerializableObject { + private int mData; public LegacyCoverData() {} diff --git a/src/main/java/gregtech/api/util/LightingHelper.java b/src/main/java/gregtech/api/util/LightingHelper.java index 5aa9000bf2..36d8f4cda3 100644 --- a/src/main/java/gregtech/api/util/LightingHelper.java +++ b/src/main/java/gregtech/api/util/LightingHelper.java @@ -1,38 +1,31 @@ /* - * LightingHelper - Derived and adapted from @Mineshopper / carpentersblocks - * Copyright (c) 2013-2021. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * LightingHelper - Derived and adapted from @Mineshopper / carpentersblocks Copyright (c) 2013-2021. This library is + * free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation version 2.1 of the License. This library is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of + * the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package gregtech.api.util; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.EntityRenderer; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SuppressWarnings("unused") @SideOnly(Side.CLIENT) public class LightingHelper { + public static final int NORMAL_BRIGHTNESS = 0xff00ff; public static final int MAX_BRIGHTNESS = 0xf000f0; public static final float NO_Z_FIGHT_OFFSET = 1.0F / 1024.0F; - protected static final float[] LIGHTNESS = {0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F}; + protected static final float[] LIGHTNESS = { 0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F }; private final RenderBlocks renderBlocks; /** * Brightness for side. @@ -94,7 +87,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 }; } /** @@ -197,8 +190,7 @@ public class LightingHelper { } /** - * Sets up the color using lightness, brightness, and the primary color - * value (usually the dye color) for the side. + * Sets up the color using lightness, brightness, and the primary color value (usually the dye color) for the side. * * @param side the side * @param rgba the primary short[] RGBA color array @@ -208,8 +200,7 @@ public class LightingHelper { } /** - * Sets up the color using lightness, brightness, and the primary color - * value (usually the dye color) for the side. + * Sets up the color using lightness, brightness, and the primary color value (usually the dye color) for the side. * * @param side the side * @param hexColor the primary color @@ -230,21 +221,18 @@ 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; @@ -278,14 +266,13 @@ 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 }; } /** * Will apply anaglyph color multipliers to RGB float array. * <p> - * If {@link EntityRenderer#anaglyphEnable} is false, - * will do nothing. + * If {@link EntityRenderer#anaglyphEnable} is false, will do nothing. * * @param rgb array containing red, green and blue float values */ @@ -298,8 +285,7 @@ public class LightingHelper { } /** - * Gets mixed ambient occlusion value from two inputs, with a - * ratio applied to the final result. + * Gets mixed ambient occlusion value from two inputs, with a ratio applied to the final result. * * @param ao1 the first ambient occlusion value * @param ao2 the second ambient occlusion value @@ -342,12 +328,11 @@ public class LightingHelper { /** * Sets up lighting for the West face and returns the {@link LightingHelper}. * <p> - * This is a consolidated <code>method</code> that sets side shading - * with respect to the following attributes: + * This is a consolidated <code>method</code> that sets side shading with respect to the following attributes: * <p> * <ul> - * <li>{@link RenderBlocks#enableAO}</li> - * <li>{@link RenderBlocks#partialRenderBounds}</li> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> * </ul> * * @param block the block {@link Block} @@ -368,22 +353,22 @@ 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.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(), @@ -438,26 +423,18 @@ public class LightingHelper { 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; + 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) @@ -520,12 +497,11 @@ public class LightingHelper { /** * Sets up lighting for the East face and returns the {@link LightingHelper}. * <p> - * This is a consolidated <code>method</code> that sets side shading - * with respect to the following attributes: + * This is a consolidated <code>method</code> that sets side shading with respect to the following attributes: * <p> * <ul> - * <li>{@link RenderBlocks#enableAO}</li> - * <li>{@link RenderBlocks#partialRenderBounds}</li> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> * </ul> * * @param block the block {@link Block} @@ -545,22 +521,22 @@ 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.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(), @@ -615,26 +591,18 @@ public class LightingHelper { 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; + 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) @@ -697,12 +665,11 @@ public class LightingHelper { /** * Sets up lighting for the bottom face and returns the {@link LightingHelper}. * <p> - * This is a consolidated <code>method</code> that sets side shading - * with respect to the following attributes: + * This is a consolidated <code>method</code> that sets side shading with respect to the following attributes: * <p> * <ul> - * <li>{@link RenderBlocks#enableAO}</li> - * <li>{@link RenderBlocks#partialRenderBounds}</li> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> * </ul> * * @param block the block {@link Block} @@ -723,22 +690,22 @@ 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.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(), @@ -793,26 +760,18 @@ public class LightingHelper { 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; + 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 @@ -875,12 +834,11 @@ public class LightingHelper { /** * Sets up lighting for the top face and returns the {@link LightingHelper}. * <p> - * This is a consolidated <code>method</code> that sets side shading - * with respect to the following attributes: + * This is a consolidated <code>method</code> that sets side shading with respect to the following attributes: * <p> * <ul> - * <li>{@link RenderBlocks#enableAO}</li> - * <li>{@link RenderBlocks#partialRenderBounds}</li> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> * </ul> * * @param block the block {@link Block} @@ -900,22 +858,22 @@ 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.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(), @@ -970,40 +928,32 @@ public class LightingHelper { 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) + 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) + 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) + 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) + 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)); @@ -1052,12 +1002,11 @@ public class LightingHelper { /** * Sets up lighting for the North face and returns the {@link LightingHelper}. * <p> - * This is a consolidated <code>method</code> that sets side shading - * with respect to the following attributes: + * This is a consolidated <code>method</code> that sets side shading with respect to the following attributes: * <p> * <ul> - * <li>{@link RenderBlocks#enableAO}</li> - * <li>{@link RenderBlocks#partialRenderBounds}</li> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> * </ul> * * @param block the block {@link Block} @@ -1078,22 +1027,22 @@ 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.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(), @@ -1148,26 +1097,18 @@ public class LightingHelper { 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; + 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 @@ -1230,12 +1171,11 @@ public class LightingHelper { /** * Sets up lighting for the South face and returns the {@link LightingHelper}. * <p> - * This is a consolidated <code>method</code> that sets side shading - * with respect to the following attributes: + * This is a consolidated <code>method</code> that sets side shading with respect to the following attributes: * <p> * <ul> - * <li>{@link RenderBlocks#enableAO}</li> - * <li>{@link RenderBlocks#partialRenderBounds}</li> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> * </ul> * * @param block the block {@link Block} @@ -1255,22 +1195,22 @@ 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.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(), @@ -1325,26 +1265,18 @@ public class LightingHelper { 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; + 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 diff --git a/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java b/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java index 50566f79a3..112fcd93cb 100644 --- a/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java +++ b/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java @@ -3,6 +3,7 @@ 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; @@ -10,6 +11,7 @@ import net.minecraft.world.World; @SuppressWarnings("unused") public abstract class WorldSpawnedEventBuilder implements Runnable { + private static final String ILLEGAL_STATE_STR1 = "Position, identifier and world must be set"; /* Variables */ @@ -47,6 +49,7 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { /* Interfaces */ private interface IPositionedWorldSpawnedEvent { + Vec3 getPosition(); IPositionedWorldSpawnedEvent setPosition(Vec3 position); @@ -55,18 +58,21 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { } 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); @@ -75,6 +81,7 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { } private interface ISoundWorldSpawnedEvent { + float getPitch(); float getVolume(); @@ -128,6 +135,7 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { private abstract static class PositionedWorldSpawnedEventBuilder extends WorldSpawnedEventBuilder implements IPositionedWorldSpawnedEvent { + private Vec3 position; @Override @@ -150,6 +158,7 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { private abstract static class StringIdentifierPositionedWorldSpawnedEventBuilder extends PositionedWorldSpawnedEventBuilder implements IStringIdentifierWorldSpawnedEvent { + private String identifier; @Override @@ -249,15 +258,14 @@ 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); } } @@ -303,14 +311,13 @@ 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()); } } @@ -362,15 +369,14 @@ 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()); } } @@ -404,12 +410,16 @@ 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); } } public static final class ExplosionEffectEventBuilder extends PositionedEntityWorldSpawnedEventBuilder { + private boolean isFlaming, isSmoking; private float strength; @@ -460,15 +470,14 @@ 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); } } @@ -521,13 +530,12 @@ 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); } } diff --git a/src/main/java/gregtech/api/util/extensions/ArrayExt.java b/src/main/java/gregtech/api/util/extensions/ArrayExt.java index 51486bc036..b6ebb07d38 100644 --- a/src/main/java/gregtech/api/util/extensions/ArrayExt.java +++ b/src/main/java/gregtech/api/util/extensions/ArrayExt.java @@ -3,6 +3,7 @@ package gregtech.api.util.extensions; import java.util.function.IntFunction; public class ArrayExt { + public static int[] of(int... objects) { return objects; } diff --git a/src/main/java/gregtech/api/util/extensions/IteratorExt.java b/src/main/java/gregtech/api/util/extensions/IteratorExt.java index 8662870921..3cbae1c598 100644 --- a/src/main/java/gregtech/api/util/extensions/IteratorExt.java +++ b/src/main/java/gregtech/api/util/extensions/IteratorExt.java @@ -1,9 +1,11 @@ package gregtech.api.util.extensions; -import gregtech.api.objects.iterators.MergedIterator; import java.util.Iterator; +import gregtech.api.objects.iterators.MergedIterator; + public class IteratorExt { + @SafeVarargs public static <T> Iterator<T> merge(Iterator<T>... iterators) { return new MergedIterator<>(iterators); diff --git a/src/main/java/gregtech/api/world/GT_Worldgen.java b/src/main/java/gregtech/api/world/GT_Worldgen.java index 698ed0d1c9..3d2fe466c2 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen.java @@ -1,13 +1,15 @@ package gregtech.api.world; -import gregtech.api.GregTech_API; 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; +import gregtech.api.GregTech_API; + public abstract class GT_Worldgen { public final String mWorldGenName; @@ -29,29 +31,13 @@ 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) { + 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 } @@ -64,24 +50,18 @@ 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) + * @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) { @@ -89,13 +69,14 @@ public abstract class GT_Worldgen { || (aWorld.provider.getDimensionName().equalsIgnoreCase("Nether")) || (aWorld.provider.getDimensionName().equalsIgnoreCase("The End")) || (aWorld.provider.getDimensionName().equalsIgnoreCase("Twilight Forest")) - || (aWorld.provider.getDimensionName().equalsIgnoreCase("Underdark")))) return false; + || (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 c9d1325529..d3aa6b0e10 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Ore.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Ore.java @@ -1,29 +1,22 @@ package gregtech.api.world; -import gregtech.api.GregTech_API; import java.util.ArrayList; import java.util.Collection; + import net.minecraft.block.Block; +import gregtech.api.GregTech_API; + public abstract class GT_Worldgen_Ore extends GT_Worldgen { + public final int mBlockMeta, mAmount, mSize, mMinY, mMaxY, mProbability, mDimensionType; public final Block mBlock; public final Collection<String> mBiomeList; 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, + 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; 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 92c00bc455..5916d04a49 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 @@ -2,24 +2,16 @@ 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; 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, + + 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, @@ -37,28 +29,19 @@ public class GT_Worldgen_Ore_SingleBlock extends GT_Worldgen_Ore { } @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) { 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), + 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))))) { + || (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 940f923815..a1bd913ace 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 @@ -2,25 +2,17 @@ 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; 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) { + + 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, @@ -37,28 +29,19 @@ public class GT_Worldgen_Ore_SingleBlock_UnderLava extends GT_Worldgen_Ore { } @Override - 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) { 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), + 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))))) { + || (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 6c3c174044..49611cfa72 100644 --- a/src/main/java/gregtech/client/GT_GUI_ClientConfig.java +++ b/src/main/java/gregtech/client/GT_GUI_ClientConfig.java @@ -1,18 +1,21 @@ 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 cpw.mods.fml.client.config.GuiConfig; +import cpw.mods.fml.client.config.IConfigElement; +import gregtech.api.GregTech_API; + public class GT_GUI_ClientConfig extends GuiConfig { + public GT_GUI_ClientConfig(GuiScreen parentScreen) { super( parentScreen, @@ -28,10 +31,8 @@ public class GT_GUI_ClientConfig extends GuiConfig { 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()); + 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) { diff --git a/src/main/java/gregtech/client/GT_GuiFactory.java b/src/main/java/gregtech/client/GT_GuiFactory.java index 42dd2babb9..3c8e5cd52c 100644 --- a/src/main/java/gregtech/client/GT_GuiFactory.java +++ b/src/main/java/gregtech/client/GT_GuiFactory.java @@ -1,11 +1,14 @@ 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 cpw.mods.fml.client.IModGuiFactory; + public class GT_GuiFactory implements IModGuiFactory { + @Override public void initialize(Minecraft minecraftInstance) {} diff --git a/src/main/java/gregtech/client/GT_TooltipHandler.java b/src/main/java/gregtech/client/GT_TooltipHandler.java index f91706ad74..c6a60bc5b5 100644 --- a/src/main/java/gregtech/client/GT_TooltipHandler.java +++ b/src/main/java/gregtech/client/GT_TooltipHandler.java @@ -5,25 +5,15 @@ import static com.gtnewhorizon.gtnhlib.util.AnimatedTooltipHandler.*; public class GT_TooltipHandler { /* - * 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 + * 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() { @@ -42,7 +32,8 @@ public class GT_TooltipHandler { 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)); + "UXV", + animatedText("UXV-Tier", 1, 100, DARK_PURPLE + BOLD + UNDERLINE, DARK_RED + UNDERLINE + BOLD)); addOredictTooltip( "MAX", chain( diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 20d0eca81f..3978a6383b 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -1,7 +1,7 @@ // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) -// Source File Name: GT_Client.java +// Source File Name: GT_Client.java package gregtech.common; @@ -9,12 +9,44 @@ import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; import static gregtech.api.enums.GT_Values.calculateMaxPlasmaTurbineEfficiency; import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; +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; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.resources.IReloadableResourceManager; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.client.resources.IResourceManagerReloadListener; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.World; +import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.oredict.OreDictionary; + +import org.lwjgl.opengl.GL11; + import codechicken.lib.vec.Rotation; import codechicken.lib.vec.Scale; import codechicken.lib.vec.Transformation; import codechicken.lib.vec.Translation; + import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; + import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.Loader; @@ -51,76 +83,33 @@ import gregtech.common.tileentities.debug.GT_MetaTileEntity_AdvDebugStructureWri 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; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.resources.IReloadableResourceManager; -import net.minecraft.client.resources.IResourceManager; -import net.minecraft.client.resources.IResourceManagerReloadListener; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.World; -import net.minecraftforge.client.event.DrawBlockHighlightEvent; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.oredict.OreDictionary; -import org.lwjgl.opengl.GL11; // Referenced classes of package gregtech.common: -// GT_Proxy +// GT_Proxy 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(), - }; - 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 - }; + 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 }; 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; @@ -284,8 +273,8 @@ public class GT_Client extends GT_Proxy implements Runnable { 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"); @@ -322,8 +311,8 @@ public class GT_Client extends GT_Proxy implements Runnable { 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; @@ -406,8 +395,8 @@ public class GT_Client extends GT_Proxy implements Runnable { } } else { drawExtendedRotationMarker( - ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ - ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + direction.ordinal()]], + ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + + direction.ordinal()]], aIsSneaking, true); } @@ -526,39 +515,29 @@ public class GT_Client extends GT_Proxy implements Runnable { super.onPreLoad(); MinecraftForge.EVENT_BUS.register(new ExtraIcons()); - Minecraft.getMinecraft() - .getResourcePackRepository() - .rprMetadataSerializer + Minecraft.getMinecraft().getResourcePackRepository().rprMetadataSerializer .registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class); new GT_MetaTileEntity_AdvDebugStructureWriter.ForgeEventHandler(); - 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" - }; + 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" }; for (String tName : arr) { mCapeList.add(tName.toLowerCase()); } @@ -611,9 +590,10 @@ public class GT_Client extends GT_Proxy implements Runnable { } // reobf doesn't work with lambda, so this must be a class - //noinspection Convert2Lambda + // noinspection Convert2Lambda ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()) .registerReloadListener(new IResourceManagerReloadListener() { + @Override public void onResourceManagerReload(IResourceManager l) { GT_GUIColorOverride.onResourceManagerReload(); @@ -717,9 +697,8 @@ public class GT_Client extends GT_Proxy implements Runnable { recipe.mHidden = false; } } - 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(); @@ -730,22 +709,23 @@ public class GT_Client extends GT_Proxy implements Runnable { 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)); } } } @@ -766,15 +746,15 @@ public class GT_Client extends GT_Proxy implements Runnable { @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; } @@ -791,11 +771,10 @@ public class GT_Client extends GT_Proxy implements Runnable { || 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 tSide : ALL_VALID_SIDES) - if (((ICoverable) aTileEntity).getCoverIDAtSide(tSide) > 0) { - drawGrid(aEvent, true, false, true); - return; - } + for (byte tSide : ALL_VALID_SIDES) if (((ICoverable) aTileEntity).getCoverIDAtSide(tSide) > 0) { + drawGrid(aEvent, true, false, true); + return; + } return; } @@ -938,84 +917,79 @@ public class GT_Client extends GT_Proxy implements Runnable { 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 (tString.startsWith("streaming.")) - switch (aStack.stackSize) { - case 1: // '\001' - tString = tString + "13"; - break; + if (tString.startsWith("streaming.")) switch (aStack.stackSize) { + case 1: // '\001' + tString = tString + "13"; + break; - case 2: // '\002' - tString = tString + "cat"; - break; + case 2: // '\002' + tString = tString + "cat"; + break; - case 3: // '\003' - tString = tString + "blocks"; - break; + case 3: // '\003' + tString = tString + "blocks"; + break; - case 4: // '\004' - tString = tString + "chirp"; - break; + case 4: // '\004' + tString = tString + "chirp"; + break; - case 5: // '\005' - tString = tString + "far"; - break; + case 5: // '\005' + tString = tString + "far"; + break; - case 6: // '\006' - tString = tString + "mall"; - break; + case 6: // '\006' + tString = tString + "mall"; + break; - case 7: // '\007' - tString = tString + "mellohi"; - break; + case 7: // '\007' + tString = tString + "mellohi"; + break; - case 8: // '\b' - tString = tString + "stal"; - break; + case 8: // '\b' + tString = tString + "stal"; + break; - case 9: // '\t' - tString = tString + "strad"; - break; + case 9: // '\t' + tString = tString + "strad"; + break; - case 10: // '\n' - tString = tString + "ward"; - break; + case 10: // '\n' + tString = tString + "ward"; + break; - case 11: // '\013' - tString = tString + "11"; - break; + case 11: // '\013' + tString = tString + "11"; + break; - case 12: // '\f' - tString = tString + "wait"; - break; + case 12: // '\f' + tString = tString + "wait"; + break; - default: - tString = tString + "wherearewenow"; - break; - } + default: + tString = tString + "wherearewenow"; + break; + } if (tString.startsWith("streaming.")) { - new WorldSpawnedEventBuilder.RecordEffectEventBuilder() - .setIdentifier(tString.substring(10)) - .setPosition(aX, aY, aZ) - .run(); + new WorldSpawnedEventBuilder.RecordEffectEventBuilder().setIdentifier(tString.substring(10)) + .setPosition(aX, aY, aZ).run(); } else { - new WorldSpawnedEventBuilder.SoundEventBuilder() - .setVolume(3f) - .setPitch( - tString.startsWith("note.") - ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) - : 1.0F) - .setIdentifier(tString) - .setPosition(aX, aY, aZ) - .run(); + new WorldSpawnedEventBuilder.SoundEventBuilder().setVolume(3f).setPitch( + tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F) + .setIdentifier(tString).setPosition(aX, aY, aZ).run(); } } public static int hideValue = 0; /** - * <p>Client tick counter that is set to 5 on hiding pipes and covers.</p> - * <p>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.</p> + * <p> + * Client tick counter that is set to 5 on hiding pipes and covers. + * </p> + * <p> + * 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. + * </p> */ public static int changeDetected = 0; diff --git a/src/main/java/gregtech/common/GT_DummyWorld.java b/src/main/java/gregtech/common/GT_DummyWorld.java index cfc89c9df6..321e0688ce 100644 --- a/src/main/java/gregtech/common/GT_DummyWorld.java +++ b/src/main/java/gregtech/common/GT_DummyWorld.java @@ -1,6 +1,7 @@ package gregtech.common; import java.io.File; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; @@ -18,68 +19,61 @@ import net.minecraft.world.storage.ISaveHandler; import net.minecraft.world.storage.WorldInfo; 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_IteratorRandom.java b/src/main/java/gregtech/common/GT_IteratorRandom.java index 1141da4deb..addce0a456 100644 --- a/src/main/java/gregtech/common/GT_IteratorRandom.java +++ b/src/main/java/gregtech/common/GT_IteratorRandom.java @@ -3,6 +3,7 @@ package gregtech.common; import java.util.Random; public class GT_IteratorRandom extends Random { + private static final long serialVersionUID = 1L; public int mIterationStep = 2147483647; diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java index 4e1a58b4db..77a7e3477e 100644 --- a/src/main/java/gregtech/common/GT_Network.java +++ b/src/main/java/gregtech/common/GT_Network.java @@ -2,8 +2,17 @@ package gregtech.common; import static gregtech.GT_Mod.GT_FML_LOGGER; +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 com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; + import cpw.mods.fml.common.network.FMLEmbeddedChannel; import cpw.mods.fml.common.network.FMLOutboundHandler; import cpw.mods.fml.common.network.NetworkRegistry; @@ -20,16 +29,11 @@ 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; @ChannelHandler.Sharable @SuppressWarnings("deprecation") public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> implements IGT_NetworkHandler { + private final EnumMap<Side, FMLEmbeddedChannel> mChannel; private final GT_Packet[] mSubChannels; @@ -55,7 +59,7 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> new GT_Packet_SendCoverData(), // 16 new GT_Packet_RequestCoverData(), // 17 new GT_Packet_MultiTileEntity() // 18 - ); + ); } public GT_Network(String channelName, GT_Packet... packetTypes) { @@ -72,15 +76,13 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput) throws Exception { final 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 { - final ByteArrayDataInput aData = - ByteStreams.newDataInput(aPacket.payload().array()); + final ByteArrayDataInput aData = ByteStreams.newDataInput(aPacket.payload().array()); final GT_Packet tPacket = this.mSubChannels[aData.readByte()].decode(aData); tPacket.setINetHandler(aPacket.handler()); aOutput.add(tPacket); @@ -96,35 +98,23 @@ 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) + 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_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) + 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_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) + this.mChannel.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET) .set(FMLOutboundHandler.OutboundTarget.TOSERVER); this.mChannel.get(Side.CLIENT).writeAndFlush(aPacket); } @@ -138,8 +128,7 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> } EntityPlayerMP tPlayer = (EntityPlayerMP) tObject; Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ); - if (tPlayer.getServerForPlayer() - .getPlayerManager() + if (tPlayer.getServerForPlayer().getPlayerManager() .isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { sendToPlayer(aPacket, tPlayer); } @@ -149,6 +138,7 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> @ChannelHandler.Sharable static final class HandlerShared extends SimpleChannelInboundHandler<GT_Packet> { + @Override protected void channelRead0(ChannelHandlerContext ctx, GT_Packet aPacket) { final EntityPlayer aPlayer = GT_Values.GT.getThePlayer(); diff --git a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java index 49ddb9dc23..384a3a8eb4 100644 --- a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java +++ b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java @@ -1,14 +1,16 @@ package gregtech.common; +import java.util.ArrayList; + import gregtech.GT_Mod; import gregtech.api.util.GT_Log; -import java.util.ArrayList; public class GT_PlayerActivityLogger implements Runnable { + @Override public void run() { try { - for (; ; ) { + for (;;) { if (GT_Log.pal == null) { return; } @@ -24,7 +26,6 @@ public class GT_PlayerActivityLogger implements Runnable { } Thread.sleep(10000L); } - } catch (Throwable e) { - } + } catch (Throwable e) {} } } diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 4d726a2a46..12ea4650e9 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -3,19 +3,6 @@ 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; -import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.metatileentity.IMachineCallback; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.net.GT_Packet_Pollution; -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; @@ -24,8 +11,10 @@ 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; @@ -44,45 +33,46 @@ import net.minecraftforge.event.world.ChunkDataEvent; import net.minecraftforge.event.world.ChunkWatchEvent; import net.minecraftforge.event.world.WorldEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; +import cpw.mods.fml.common.network.NetworkRegistry; +import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.metatileentity.IMachineCallback; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.net.GT_Packet_Pollution; +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; + public class GT_Pollution { + private static final Storage STORAGE = new Storage(); /** - * Pollution dispersion until effects start: - * Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) + * 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 + * 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) + * 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) + * 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%) + * 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 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; @@ -167,25 +157,28 @@ public class GT_Pollution { 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)); + 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)); + 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)); + tEnt.addPotionEffect( + new PotionEffect( + Potion.moveSlowdown.id, + Math.min(tPollution / 1000, 1000), + tPollution / 400000)); } } } - // Poison effects + // 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); @@ -198,21 +191,28 @@ public class GT_Pollution { 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)); + 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)); + 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)); + tEnt.addPotionEffect( + new PotionEffect( + Potion.blindness.id, + Math.min(tPollution / 2000, 1000), + 1)); } } } - // killing plants + // killing plants if (tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit) { int f = 20; for (; f < (tPollution / 25000); f++) { @@ -231,7 +231,11 @@ public class GT_Pollution { // 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); + world.provider.dimensionId, + (actualPos.chunkXPos << 4), + 64, + (actualPos.chunkZPos << 4), + 256); GT_Values.NW.sendToAllAround(new GT_Packet_Pollution(actualPos, tPollution), point); } } @@ -259,8 +263,7 @@ public class GT_Pollution { tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); world.setBlockToAir(x, y, z); } - if (tBlock == Blocks.waterlily - || tBlock == Blocks.wheat + if (tBlock == Blocks.waterlily || tBlock == Blocks.wheat || tBlock == Blocks.cactus || tBlock.getMaterial() == Material.cactus || tBlock == Blocks.melon_block @@ -268,8 +271,7 @@ public class GT_Pollution { tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); world.setBlockToAir(x, y, z); } - if (tBlock == Blocks.red_flower - || tBlock == Blocks.yellow_flower + if (tBlock == Blocks.red_flower || tBlock == Blocks.yellow_flower || tBlock == Blocks.carrots || tBlock == Blocks.potatoes || tBlock == Blocks.pumpkin @@ -289,8 +291,7 @@ public class GT_Pollution { world.setBlock(x, y, z, Blocks.sand); } - if (sourRain - && world.isRaining() + 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)) { @@ -333,12 +334,12 @@ public class GT_Pollution { } /** - * 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. + * 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 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) { @@ -346,8 +347,8 @@ public class GT_Pollution { 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) { + 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); @@ -359,23 +360,24 @@ public class GT_Pollution { } } - /** @see #getPollution(World, int, int) */ + /** @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) */ + /** @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 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 + * @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; @@ -392,12 +394,11 @@ public class GT_Pollution { 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; + 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*/ + @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 @@ -409,6 +410,7 @@ public class GT_Pollution { } public static class GT_PollutionEventHandler { + @SubscribeEvent public void chunkWatch(ChunkWatchEvent.Watch event) { if (!GT_Mod.gregtechproxy.mPollution) return; @@ -429,6 +431,7 @@ public class GT_Pollution { @ParametersAreNonnullByDefault private static final class Storage extends GT_ChunkAssociatedData<ChunkData> { + private Storage() { super("Pollution", ChunkData.class, 64, (byte) 0, false); } @@ -465,6 +468,7 @@ public class GT_Pollution { } private static final class ChunkData implements GT_ChunkAssociatedData.IData { + public int amount; private ChunkData() { diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 62bc9f7654..ccc04f171e 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -14,65 +14,6 @@ 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; -import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.ProgressManager; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.TickEvent; -import cpw.mods.fml.common.network.FMLNetworkEvent; -import cpw.mods.fml.common.network.IGuiHandler; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.FluidState; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OreDictNames; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.SubTag; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.enums.ToolDictNames; -import gregtech.api.fluid.GT_FluidFactory; -import gregtech.api.interfaces.IBlockOnWalkOver; -import gregtech.api.interfaces.IGlobalWirelessEnergy; -import gregtech.api.interfaces.IProjectileItem; -import gregtech.api.interfaces.internal.IGT_Mod; -import gregtech.api.interfaces.internal.IThaumcraftCompat; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Item; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.GT_ChunkManager; -import gregtech.api.objects.GT_FluidStack; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_UO_DimensionList; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_BlockMap; -import gregtech.api.util.GT_CLS_Compat; -import gregtech.api.util.GT_ChunkAssociatedData; -import gregtech.api.util.GT_ClientPreference; -import gregtech.api.util.GT_CoverBehaviorBase; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeRegistrator; -import gregtech.api.util.GT_Shaped_Recipe; -import gregtech.api.util.GT_Shapeless_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.WorldSpawnedEventBuilder; -import gregtech.common.entities.GT_Entity_Arrow; -import gregtech.common.items.GT_MetaGenerated_Item_98; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.misc.GlobalEnergyWorldSavedData; import java.io.File; import java.lang.reflect.InvocationTargetException; import java.text.DateFormat; @@ -92,6 +33,7 @@ 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; @@ -140,7 +82,68 @@ import net.minecraftforge.oredict.RecipeSorter; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.IFuelHandler; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.ModContainer; +import cpw.mods.fml.common.ProgressManager; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; +import cpw.mods.fml.common.network.FMLNetworkEvent; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.FluidState; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OreDictNames; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.enums.ToolDictNames; +import gregtech.api.fluid.GT_FluidFactory; +import gregtech.api.interfaces.IBlockOnWalkOver; +import gregtech.api.interfaces.IGlobalWirelessEnergy; +import gregtech.api.interfaces.IProjectileItem; +import gregtech.api.interfaces.internal.IGT_Mod; +import gregtech.api.interfaces.internal.IThaumcraftCompat; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.objects.GT_ChunkManager; +import gregtech.api.objects.GT_FluidStack; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_UO_DimensionList; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_BlockMap; +import gregtech.api.util.GT_CLS_Compat; +import gregtech.api.util.GT_ChunkAssociatedData; +import gregtech.api.util.GT_ClientPreference; +import gregtech.api.util.GT_CoverBehaviorBase; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_RecipeRegistrator; +import gregtech.api.util.GT_Shaped_Recipe; +import gregtech.api.util.GT_Shapeless_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; +import gregtech.common.entities.GT_Entity_Arrow; +import gregtech.common.items.GT_MetaGenerated_Item_98; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gregtech.common.misc.GlobalEnergyWorldSavedData; + 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, @@ -154,344 +157,347 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public final ArrayList<ItemStack> mSoundItems = new ArrayList<>(); 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")); + 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")); private final DateFormat mDateFormat = DateFormat.getInstance(); public ArrayList<String> mBufferedPlayerActivity = new ArrayList<>(); public final GT_BlockMap<Boolean> mCTMBlockCache = new GT_BlockMap<>(); @@ -562,9 +568,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, 0.7, 0.6}; + public double[] mPollutionGasTurbineReleasedByTier = new double[] { 0.1, 1.0, 0.9, 0.8, 0.7, 0.6 }; public final GT_UO_DimensionList mUndergroundOil = new GT_UO_DimensionList(); public int mTicksUntilNextCraftSound = 0; public double mMagneticraftBonusOutputPercent = 0d; @@ -594,7 +600,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public boolean costlyCableConnection = false; /** - * This enables ambient-occlusion smooth lighting on tiles + * This enables ambient-occlusion smooth lighting on tiles */ public boolean mRenderTileAmbientOcclusion = true; @@ -745,18 +751,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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(); } } @@ -773,8 +778,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; @@ -822,8 +827,12 @@ 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)); @@ -837,12 +846,18 @@ 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)); @@ -859,8 +874,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)); @@ -870,8 +885,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)); @@ -963,10 +978,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)); @@ -975,10 +990,10 @@ 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)); + 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", @@ -999,17 +1014,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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)); + "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); + OrePrefixes.bucketClay.mContainerItem = GT_ModHandler + .getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0); GT_OreDictUnificator.set( OrePrefixes.bucketClay, Materials.Empty, @@ -1027,10 +1043,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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))); + 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))); } MinecraftForge.EVENT_BUS.register(new GlobalEnergyWorldSavedData("")); @@ -1132,8 +1149,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG addFullHazmatToGeneralItem("EnderIO", "item.stellar_boots", 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; @@ -1142,8 +1159,7 @@ 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 + 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; @@ -1160,10 +1176,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; @@ -1187,59 +1203,59 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, - new Object[] {"h", "X", 'X', OrePrefixes.crushedCentrifuged.get(aMaterial)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + new Object[] { "XXX", "XXX", "XXX", 'X', OrePrefixes.dustTiny.get(aMaterial) }); } } } @@ -1255,8 +1271,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; @@ -1331,11 +1347,10 @@ 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); } } @@ -1343,8 +1358,7 @@ 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)) + if ((!aEvent.isCanceled()) && (GT_Utility.isStackValid(aEvent.bow)) && (aArrow != null) && ((aEvent.bow.getItem() instanceof ItemBow))) { float tSpeed = aEvent.charge / 20.0F; @@ -1355,13 +1369,12 @@ 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); } @@ -1380,13 +1393,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG aEvent.bow.damageItem(1, aEvent.entityPlayer); aEvent.bow.getItem(); - new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder() - .setPitch(0.64893958288F + tSpeed * 0.5F) - .setVolume(1f) - .setIdentifier(SoundResource.RANDOM_BOW) - .setEntity(aEvent.entityPlayer) - .setWorld(aEvent.entityPlayer.worldObj) - .run(); + new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder().setPitch(0.64893958288F + tSpeed * 0.5F) + .setVolume(1f).setIdentifier(SoundResource.RANDOM_BOW).setEntity(aEvent.entityPlayer) + .setWorld(aEvent.entityPlayer.worldObj).run(); tArrowEntity.canBePickedUp = 1; if (!aEvent.entityPlayer.capabilities.isCreativeMode) { @@ -1414,18 +1423,18 @@ 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(true, ((EntityItem) aEvent.entity).getEntityItem(), true)); + ((EntityItem) aEvent.entity).setEntityItemStack( + GT_OreDictUnificator.get(true, ((EntityItem) aEvent.entity).getEntityItem(), true)); } - 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(); } } @@ -1433,8 +1442,7 @@ 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)) + if ((this.mDisableVanillaOres) && ((aGenerator.generator instanceof WorldGenMinable)) && (PREVENTED_ORES.contains(aGenerator.type))) { aGenerator.setResult(Result.DENY); } @@ -1446,27 +1454,37 @@ 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) + 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 + ";" + 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) + if ((aStack != null) && (aEvent.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) && (aStack.getItem() == Items.flint_and_steel)) { - if ((!aEvent.world.isRemote) - && (!aEvent.entityPlayer.capabilities.isCreativeMode) + if ((!aEvent.world.isRemote) && (!aEvent.entityPlayer.capabilities.isCreativeMode) && (aEvent.world.rand.nextInt(100) >= this.mFlintChance)) { aEvent.setCanceled(true); aStack.damageItem(1, aEvent.entityPlayer); @@ -1486,27 +1504,38 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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); + 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 { @@ -1536,8 +1565,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } else if (aMod.equals("gregtech")) { aMod = "UNKNOWN"; } - if ((aEvent == null) - || (aEvent.Ore == null) + if ((aEvent == null) || (aEvent.Ore == null) || (aEvent.Ore.getItem() == null) || (aEvent.Name == null) || (aEvent.Name.isEmpty()) @@ -1566,8 +1594,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } } String tModToName = aMod + " -> " + aEvent.Name; - if ((this.mOreDictActivated) - || (GregTech_API.sPostloadStarted) + if ((this.mOreDictActivated) || (GregTech_API.sPostloadStarted) || ((this.mSortToTheEnd) && (GregTech_API.sLoadFinished))) { tModToName = aOriginalMod + " --Late--> " + aEvent.Name; } @@ -1596,70 +1623,71 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } else if (aEvent.Name.equals("cobblestone")) { GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore); return; - } else if ((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")) { - GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore); - } else if (aEvent.Name.equals("oreHeeEndrium")) { - GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.HeeEndium, aEvent.Ore); - } else if (aEvent.Name.equals("sheetPlastic")) { - GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore); - } else if (aEvent.Name.startsWith("shard")) { - if (aEvent.Name.equals("shardAir")) { - GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedAir, aEvent.Ore); + GT_Log.ore.println( + tModToName + " is using a private Prefix and is therefor getting ignored properly."); + return; + } else + if (aEvent.Name.equals("copperWire")) { + GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore); + } else if (aEvent.Name.equals("oreHeeEndrium")) { + GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.HeeEndium, aEvent.Ore); + } else if (aEvent.Name.equals("sheetPlastic")) { + GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore); + } 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")) { + GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore); + return; + } else if (aEvent.Name.equals("shardFire")) { + GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore); + return; + } else if (aEvent.Name.equals("shardEarth")) { + GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore); + return; + } else if (aEvent.Name.equals("shardOrder")) { + GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore); + return; + } 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("shardWater")) { - GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore); + } else if (aEvent.Name.equals("ironwood")) { + GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.IronWood, aEvent.Ore); return; - } else if (aEvent.Name.equals("shardFire")) { - GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore); + } else if (aEvent.Name.equals("steeleaf")) { + GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Steeleaf, aEvent.Ore); return; - } else if (aEvent.Name.equals("shardEarth")) { - GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore); + } else if (aEvent.Name.equals("knightmetal")) { + GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Knightmetal, aEvent.Ore); return; - } else if (aEvent.Name.equals("shardOrder")) { - GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore); + } else if (aEvent.Name.equals("compressedAluminum")) { + GT_OreDictUnificator.registerOre(OrePrefixes.compressed, Materials.Aluminium, aEvent.Ore); return; - } else if (aEvent.Name.equals("shardEntropy")) { - GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEntropy, 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 (aEvent.Name.equals("fieryIngot")) { - GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.FierySteel, aEvent.Ore); - return; - } else if (aEvent.Name.equals("ironwood")) { - GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.IronWood, aEvent.Ore); - return; - } else if (aEvent.Name.equals("steeleaf")) { - GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Steeleaf, aEvent.Ore); - return; - } else if (aEvent.Name.equals("knightmetal")) { - GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Knightmetal, aEvent.Ore); - return; - } 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)); - aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag"); - return; - } else if (this.mInvalidNames.contains(aEvent.Name)) { - GT_Log.ore.println(tModToName + " is wrongly registered and therefor getting ignored."); + } else if (this.mInvalidNames.contains(aEvent.Name)) { + GT_Log.ore.println(tModToName + " is wrongly registered and therefor getting ignored."); - return; - } + return; + } OrePrefixes aPrefix = OrePrefixes.getOrePrefix(aEvent.Name); Materials aMaterial = Materials._NULL; - if ((aPrefix == OrePrefixes.nugget) - && (aMod.equals("Thaumcraft")) + if ((aPrefix == OrePrefixes.nugget) && (aMod.equals("Thaumcraft")) && (aEvent.Ore.getItem().getUnlocalizedName().contains("ItemResource"))) { return; } @@ -1689,8 +1717,7 @@ 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) + if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) || firstChar == '_' || Character.isDigit(firstChar)) { if (aPrefix.mIsMaterialBased) { @@ -1709,15 +1736,14 @@ 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) + 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); @@ -1725,7 +1751,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG for (TC_AspectStack tAspect : aMaterial.mAspects) tAspect.addToAspectList(tAspects); GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem( - GT_Utility.copyAmount(1, aEvent.Ore), tAspects, aEvent.Name); + GT_Utility.copyAmount(1, aEvent.Ore), + tAspects, + aEvent.Name); } switch (aPrefix) { @@ -1741,37 +1769,48 @@ 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.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); - 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); - GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, 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); + 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); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingQuartz, + aEvent.Ore); + } break; case cableGt01: 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) { @@ -1783,10 +1822,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG && (aMaterial.mColor != Dyes._NULL)) { GT_OreDictUnificator.registerOre( "craftingLens" - + aMaterial - .mColor - .toString() - .replaceFirst("dye", ""), + + aMaterial.mColor.toString().replaceFirst("dye", ""), aEvent.Ore); } break; @@ -1813,12 +1849,12 @@ 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) + } else if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) { - GT_OreDictUnificator.registerOre( - ToolDictNames.craftingToolSolderingMetal, aEvent.Ore); - } + GT_OreDictUnificator.registerOre( + ToolDictNames.craftingToolSolderingMetal, + aEvent.Ore); + } break; case dust: if (aMaterial == Materials.Salt) { @@ -1855,45 +1891,41 @@ 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() + } 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.addCutterRecipe( - new ItemStack(aEvent.Ore.getItem(), 1, 3), - new ItemStack(aEvent.Ore.getItem(), 16, 4), - null, - 400, - 8); - } + 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.addCutterRecipe( + new ItemStack(aEvent.Ore.getItem(), 1, 3), + new ItemStack(aEvent.Ore.getItem(), 16, 4), + null, + 400, + 8); + } break; default: break; @@ -1911,11 +1943,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG return; } } - // GT_FML_LOGGER.info("Material Name: "+aEvent.Name+ " + // 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 + // GT_Log.ore.println(tModToName + " uses an unknown // Material. Report this to GregTech."); return; } @@ -1999,14 +2031,13 @@ 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) { @@ -2094,43 +2125,49 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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) + if (((tEntity instanceof EntityItem)) && (this.mItemDespawnTime != 6000) && (((EntityItem) tEntity).lifespan == 6000)) { ((EntityItem) tEntity).lifespan = this.mItemDespawnTime; - } else if (((tEntity instanceof EntityLivingBase)) - && (this.mMaxEqualEntitiesAtOneSpot > 0) + } 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; - if (tList != null) { - for (Object o : tList) { - if ((o != null) && (o.getClass() == tClass)) { - tEntityCount++; + List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity( + tEntity, + tEntity.boundingBox + .expand(0.20000000298023224D, 0.0D, 0.20000000298023224D)); + Class tClass = tEntity.getClass(); + int tEntityCount = 1; + if (tList != null) { + for (Object o : tList) { + if ((o != null) && (o.getClass() == tClass)) { + tEntityCount++; + } + } } - } - } - if (tEntityCount > this.mMaxEqualEntitiesAtOneSpot) { - 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); - oldX = tEntity.posX; - oldY = tEntity.posY; - oldZ = tEntity.posZ; + if (tEntityCount > this.mMaxEqualEntitiesAtOneSpot) { + 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); + 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)) { @@ -2159,7 +2196,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_Utility.copyAmount(1L, aOre.mEvent.Ore)); } } else { - // GT_FML_LOGGER.info("Thingy Name: "+ aOre.mEvent.Name+ " !!!Unknown 'Thingy' detected!!! This + // 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."); @@ -2169,8 +2206,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @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) + if ((aEvent.player.ticksExisted % 200 == 0) && (aEvent.player.capabilities.allowEdit) && (!aEvent.player.capabilities.isCreativeMode) && (this.mSurvivalIntoAdventure)) { aEvent.player.setGameType(GameType.ADVENTURE); @@ -2182,13 +2218,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG "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))); + 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))); } } final boolean tHungerEffect = (this.mHungerEffect) && (aEvent.player.ticksExisted % 2400 == 1200); @@ -2199,7 +2240,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if ((tStack = aEvent.player.inventory.getStackInSlot(i)) != null) { if (!aEvent.player.capabilities.isCreativeMode) { GT_Utility.applyRadioactivity( - aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize); + aEvent.player, + GT_Utility.getRadioactivityLevel(tStack), + tStack.stackSize); final float tHeat = GT_Utility.getHeatDamageFromItem(tStack); if (tHeat != 0.0F) { if (tHeat > 0.0F) { @@ -2222,7 +2265,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if ((tStack = aEvent.player.inventory.armorInventory[i]) != null) { if (!aEvent.player.capabilities.isCreativeMode) { GT_Utility.applyRadioactivity( - aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize); + aEvent.player, + GT_Utility.getRadioactivityLevel(tStack), + tStack.stackSize); final float tHeat = GT_Utility.getHeatDamageFromItem(tStack); if (tHeat != 0.0F) { if (tHeat > 0.0F) { @@ -2303,8 +2348,7 @@ 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) + return Arrays.stream(OreDictionary.getOreIDs(stack)).mapToObj(OreDictionary::getOreName) .collect(Collectors.toList()); } @@ -2315,8 +2359,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } int rFuelValue = 0; if ((aFuel.getItem() instanceof GT_MetaGenerated_Item)) { - final Short tFuelValue = - ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues.get((short) aFuel.getItemDamage()); + final Short tFuelValue = ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues + .get((short) aFuel.getItemDamage()); if (tFuelValue != null) { rFuelValue = Math.max(rFuelValue, tFuelValue); } @@ -2330,10 +2374,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // If not check the ore dict rFuelValue = Math.max( rFuelValue, - getOreDictNames(aFuel).stream() - .mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0)) - .max() - .orElse(0)); + 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 @@ -2356,18 +2397,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // 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. - final String fluidTexture = - aMaterial.mIconSet.is_custom ? "fluid." + aMaterial.mName.toLowerCase() : "autogenerated"; + final String fluidTexture = aMaterial.mIconSet.is_custom ? "fluid." + aMaterial.mName.toLowerCase() + : "autogenerated"; return GT_FluidFactory.builder(aMaterial.mName.toLowerCase(Locale.ENGLISH)) - .withLocalizedName(aMaterial.mDefaultLocalName) - .withTextureName(fluidTexture) - .withColorRGBA(aMaterial.mRGBa) - .withStateAndTemperature(LIQUID, aMaterial.getLiquidTemperature()) - .buildAndRegister() - .configureMaterials(aMaterial) + .withLocalizedName(aMaterial.mDefaultLocalName).withTextureName(fluidTexture) + .withColorRGBA(aMaterial.mRGBa).withStateAndTemperature(LIQUID, aMaterial.getLiquidTemperature()) + .buildAndRegister().configureMaterials(aMaterial) .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L)) + GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), + ItemList.Cell_Empty.get(1L)) .asFluid(); } @@ -2375,18 +2414,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // 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. - final String fluidTexture = - aMaterial.mIconSet.is_custom ? ("gas." + aMaterial.mName.toLowerCase()) : "autogenerated"; + final String fluidTexture = aMaterial.mIconSet.is_custom ? ("gas." + aMaterial.mName.toLowerCase()) + : "autogenerated"; return GT_FluidFactory.builder(aMaterial.mName.toLowerCase(Locale.ENGLISH)) - .withLocalizedName(aMaterial.mDefaultLocalName) - .withTextureName(fluidTexture) - .withColorRGBA(aMaterial.mRGBa) - .withStateAndTemperature(GAS, aMaterial.getGasTemperature()) - .buildAndRegister() - .configureMaterials(aMaterial) + .withLocalizedName(aMaterial.mDefaultLocalName).withTextureName(fluidTexture) + .withColorRGBA(aMaterial.mRGBa).withStateAndTemperature(GAS, aMaterial.getGasTemperature()) + .buildAndRegister().configureMaterials(aMaterial) .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L)) + GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), + ItemList.Cell_Empty.get(1L)) .asFluid(); } @@ -2394,15 +2431,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // 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. - final String fluidTexture = - aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) : "plasma.autogenerated"; + final String fluidTexture = aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) + : "plasma.autogenerated"; return GT_FluidFactory.builder("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH)) - .withLocalizedName(aMaterial.mDefaultLocalName + " Plasma") - .withTextureName(fluidTexture) - .withColorRGBA(aMaterial.mMoltenRGBa) - .withStateAndTemperature(PLASMA, 10000) - .buildAndRegister() + .withLocalizedName(aMaterial.mDefaultLocalName + " Plasma").withTextureName(fluidTexture) + .withColorRGBA(aMaterial.mMoltenRGBa).withStateAndTemperature(PLASMA, 10000).buildAndRegister() .configureMaterials(aMaterial) .registerContainers( GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), @@ -2415,16 +2449,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // 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. - final String fluidTexture = - aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) : "molten.autogenerated"; + final String fluidTexture = aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) + : "molten.autogenerated"; return GT_FluidFactory.builder("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH)) - .withLocalizedName("Molten " + aMaterial.mDefaultLocalName) - .withTextureName(fluidTexture) + .withLocalizedName("Molten " + aMaterial.mDefaultLocalName).withTextureName(fluidTexture) .withColorRGBA(aMaterial.mMoltenRGBa) .withStateAndTemperature(MOLTEN, aMaterial.mMeltingPoint < 0 ? 1000 : aMaterial.mMeltingPoint) - .buildAndRegister() - .configureMaterials(aMaterial) + .buildAndRegister().configureMaterials(aMaterial) .registerContainers( GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L), ItemList.Cell_Empty.get(1L), @@ -2436,10 +2468,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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 }; final Fluid uncrackedFluid; if (aMaterial.mFluid != null) { uncrackedFluid = aMaterial.mFluid; @@ -2450,11 +2481,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG crackedFluids[i] = GT_FluidFactory.builder(namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH)) .withIconsFrom(uncrackedFluid) .withLocalizedName(orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName) - .withColorRGBA(aMaterial.mRGBa) - .withStateAndTemperature(GAS, 775) - .buildAndRegister() + .withColorRGBA(aMaterial.mRGBa).withStateAndTemperature(GAS, 775).buildAndRegister() .registerBContainers( - GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L), ItemList.Cell_Empty.get(1L)) + GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L), + ItemList.Cell_Empty.get(1L)) .asFluid(); int hydrogenAmount = 2 * i + 2; @@ -2487,10 +2517,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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 }; final Fluid uncrackedFluid; if (aMaterial.mFluid != null) { uncrackedFluid = aMaterial.mFluid; @@ -2501,11 +2530,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG crackedFluids[i] = GT_FluidFactory.builder(namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH)) .withIconsFrom(uncrackedFluid) .withLocalizedName(orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName) - .withColorRGBA(aMaterial.mRGBa) - .withStateAndTemperature(GAS, 775) - .buildAndRegister() + .withColorRGBA(aMaterial.mRGBa).withStateAndTemperature(GAS, 775).buildAndRegister() .registerBContainers( - GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L), ItemList.Cell_Empty.get(1L)) + GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L), + ItemList.Cell_Empty.get(1L)) .asFluid(); GT_Values.RA.addCrackingRecipe( @@ -2548,23 +2576,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG /** * @deprecated use {@link GT_FluidFactory#builder} */ - @SuppressWarnings({"MethodWithTooManyParameters"}) // Deprecated method + @SuppressWarnings({ "MethodWithTooManyParameters" }) // Deprecated method @Deprecated - public Fluid addFluid( - String aName, - String aLocalized, - Materials aMaterial, - int aState, - int aTemperatureK, - ItemStack aFullContainer, - ItemStack aEmptyContainer, - int aFluidAmount) { - return GT_FluidFactory.builder(aName) - .withLocalizedName(aLocalized) - .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK) - .buildAndRegister() - .configureMaterials(aMaterial) - .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount) + public Fluid addFluid(String aName, String aLocalized, Materials aMaterial, int aState, int aTemperatureK, + ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { + return GT_FluidFactory.builder(aName).withLocalizedName(aLocalized) + .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK).buildAndRegister() + .configureMaterials(aMaterial).registerContainers(aFullContainer, aEmptyContainer, aFluidAmount) .asFluid(); } @@ -2572,27 +2590,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG * @deprecated use {@link GT_FluidFactory#builder} */ @Deprecated - @SuppressWarnings({"MethodWithTooManyParameters"}) // Deprecated method - public Fluid addFluid( - String aName, - String aTexture, - String aLocalized, - Materials aMaterial, - short[] aRGBa, - int aState, - int aTemperatureK, - ItemStack aFullContainer, - ItemStack aEmptyContainer, - int aFluidAmount) { - return GT_FluidFactory.builder(aName) - .withLocalizedName(aLocalized) + @SuppressWarnings({ "MethodWithTooManyParameters" }) // Deprecated method + public Fluid addFluid(String aName, String aTexture, String aLocalized, Materials aMaterial, short[] aRGBa, + int aState, int aTemperatureK, ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { + return GT_FluidFactory.builder(aName).withLocalizedName(aLocalized) .withStillIconResourceLocation(new ResourceLocation(MOD_ID, "fluids/fluid." + aTexture)) - .withColorRGBA(aRGBa) - .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK) - .buildAndRegister() - .configureMaterials(aMaterial) - .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount) - .asFluid(); + .withColorRGBA(aRGBa).withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK) + .buildAndRegister().configureMaterials(aMaterial) + .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount).asFluid(); } public File getSaveDirectory() { @@ -2612,14 +2617,12 @@ 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) + 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 + 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( @@ -2627,196 +2630,212 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get( - new StringBuilder() - .append(ConfigCategories.specialunificationtargets) - .append(".") - .append(tOre.mModID) - .toString(), + 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 + } 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.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.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.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.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.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.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.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.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.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 + .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 + .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 + .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.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.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.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.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.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.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.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; + } } if (GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true); @@ -2826,22 +2845,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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)), + (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) + 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)) { @@ -2852,14 +2866,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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)), + (tOre.mModID != null) && (GregTech_API.sUnification.get( + new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".") + .append(tOre.mModID), + tOre.mEvent.Name, + false)), true); } } @@ -2885,27 +2896,27 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } @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 + 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}; + return new int[] { NOT_LOADED, 0, -1, -1 }; } @Deprecated public static int[] getDefaultChunkDataOnLoad() { - return new int[] {LOADED, 0, -1, -1}; + return new int[] { LOADED, 0, -1, -1 }; } @SubscribeEvent @@ -2920,30 +2931,30 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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); + 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 { + public final OreDictionary.OreRegisterEvent mEvent; public final OrePrefixes mPrefix; 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; diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 1d0b4795fe..06734de49e 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -3,6 +3,22 @@ package gregtech.common; import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.GT_Values.MOD_ID_GTPP; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; +import java.util.Objects; + +import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; +import mods.railcraft.common.items.RailcraftToolItems; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.GT_Mod; @@ -19,52 +35,38 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; import gregtech.common.items.GT_IntegratedCircuit_Item; import ic2.core.init.MainConfig; import ic2.core.util.ConfigUtil; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.Objects; -import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; -import mods.railcraft.common.items.RailcraftToolItems; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; 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) { + 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 ((aDuration = GregTech_API.sRecipeFile.get( - "fusion", aOutput1.getFluid().getName(), aDuration)) - <= 0) { + if ((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); + 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) { + 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; @@ -93,16 +95,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addCentrifugeRecipe( - ItemStack aInput1, - int aInput2, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - ItemStack aOutput5, - ItemStack aOutput6, - int aDuration) { + 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 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, @@ -120,17 +114,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addCentrifugeRecipe( - ItemStack aInput1, - int aInput2, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - ItemStack aOutput5, - ItemStack aOutput6, - int aDuration, - int aEUt) { + 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 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, @@ -148,20 +133,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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) { + 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, @@ -180,31 +154,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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) { + 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) { @@ -212,21 +172,19 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe( true, - new ItemStack[] {aInput1, aInput2}, - new ItemStack[] { - aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, - }, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, }, null, aChances, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, aCleanroom ? -100 : 0); - ItemStack[] itemInputs = {aInput1, aInput2}; - ItemStack[] itemOutputs = {aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6}; - FluidStack[] fluidInputs = {aFluidInput, null, null}; - FluidStack[] fluidOutputs = {aFluidOutput, null, null, null, null, null, null}; + ItemStack[] itemInputs = { aInput1, aInput2 }; + ItemStack[] itemOutputs = { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }; + FluidStack[] fluidInputs = { aFluidInput, null, null }; + FluidStack[] fluidOutputs = { aFluidOutput, null, null, null, null, null, null }; byte iNumber = 0; byte oNumber = 0; @@ -274,22 +232,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe( - true, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1}, null, null, null, aDuration, aEUt, 0); + 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) { + 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 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, @@ -307,20 +264,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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) { + 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; } @@ -328,35 +274,32 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { && ((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}, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }, null, aChances, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); - ItemStack[] itemInputs = {aInput1, aInput2}; - ItemStack[] itemOutputs = {aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6}; - FluidStack[] fluidInputs = {aFluidInput, null, null}; - FluidStack[] fluidOutputs = {aFluidOutput, null, null, null, null, null, null}; + ItemStack[] itemInputs = { aInput1, aInput2 }; + ItemStack[] itemOutputs = { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }; + FluidStack[] fluidInputs = { aFluidInput, null, null }; + FluidStack[] fluidOutputs = { aFluidOutput, null, null, null, null, null, null }; byte iNumber = 0; byte oNumber = 0; for (ItemStack item : itemInputs) { if (item != null) { - if (GT_Utility.getFluidForFilledItem(aInput1, true) != null - || GT_Utility.isCellEmpty(item) + if (GT_Utility.getFluidForFilledItem(aInput1, true) != null || GT_Utility.isCellEmpty(item) || GT_Utility.checkIfSameIntegratedCircuit(item)) { fluidInputs[iNumber + 1] = GT_Utility.convertCellToFluid(item); itemInputs[iNumber] = null; @@ -376,7 +319,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe( - false, itemInputs, itemOutputs, null, aChances, fluidInputs, fluidOutputs, aDuration, aEUt, 0); + false, + itemInputs, + itemOutputs, + null, + aChances, + fluidInputs, + fluidOutputs, + aDuration, + aEUt, + 0); return true; } @@ -391,65 +343,49 @@ 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) { + 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); + 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) { + 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); + 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, + 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))) { @@ -459,10 +395,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { && ((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) { @@ -473,29 +407,27 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe( true, - new ItemStack[] {aInput1, aInput2}, - new ItemStack[] {aOutput, aOutput2}, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput, aOutput2 }, null, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + 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 + 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}, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput, aOutput2 }, null, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUtick, 0); @@ -504,34 +436,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addMultiblockChemicalRecipe( - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, - int aDuration, - int aEUtick) { + 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) { + 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; @@ -540,10 +460,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { && ((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) { @@ -551,12 +469,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe( true, - new ItemStack[] {aInput1, aInput2}, - new ItemStack[] {aOutput, aOutput2}, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput, aOutput2 }, null, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUtick, 0); @@ -595,52 +513,32 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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)}, + 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)}, + 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) { + 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; } @@ -649,32 +547,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe( true, - new ItemStack[] {aInput1, aInput2}, - new ItemStack[] {aOutput1, aOutput2}, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput1, aOutput2 }, null, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + 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) { + 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; } @@ -683,12 +570,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe( true, - new ItemStack[] {aInput1, aInput2, aInput3, aInput4}, - new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, + new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, null, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, aLevel); @@ -696,14 +583,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addPlasmaForgeRecipe( - ItemStack[] ItemInputArray, - FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, - FluidStack[] FluidOutputArray, - int aDuration, - int aEUt, - int coil_heat_level) { + 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, @@ -719,13 +600,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addPrimitiveBlastRecipe( - ItemStack aInput1, - ItemStack aInput2, - int aCoalAmount, - ItemStack aOutput1, - ItemStack aOutput2, - int aDuration) { + 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; } @@ -735,12 +611,12 @@ 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)}, + new ItemStack[] { aInput1, aInput2, coal.getGems(aCoalAmount) }, + new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount) }, null, null, null, @@ -750,8 +626,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 0); GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( true, - new ItemStack[] {aInput1, aInput2, coal.getDust(aCoalAmount)}, - new ItemStack[] {aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, + new ItemStack[] { aInput1, aInput2, coal.getDust(aCoalAmount) }, + new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount) }, null, null, null, @@ -763,8 +639,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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)}, + new ItemStack[] { aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2) }, + new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2) }, null, null, null, @@ -776,10 +652,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (Loader.isModLoaded(MOD_ID_GTPP)) { GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( true, - new ItemStack[] { - aInput1, aInput2, GT_ModHandler.getModItem(MOD_ID_GTPP, "itemCactusCoke", (aCoalAmount * 2L)) - }, - new ItemStack[] {aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2)}, + new ItemStack[] { aInput1, aInput2, + GT_ModHandler.getModItem(MOD_ID_GTPP, "itemCactusCoke", (aCoalAmount * 2L)) }, + new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2) }, null, null, null, @@ -789,10 +664,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 0); GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( true, - new ItemStack[] { - aInput1, aInput2, GT_ModHandler.getModItem(MOD_ID_GTPP, "itemSugarCoke", (aCoalAmount * 2L)) - }, - new ItemStack[] {aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2)}, + new ItemStack[] { aInput1, aInput2, + GT_ModHandler.getModItem(MOD_ID_GTPP, "itemSugarCoke", (aCoalAmount * 2L)) }, + new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2) }, null, null, null, @@ -801,8 +675,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 0, 0); } - if ((aInput1 == null || aInput1.stackSize <= 6) - && (aInput2 == null || aInput2.stackSize <= 6) + 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 * 10L, aInput1); @@ -812,8 +685,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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)}, + new ItemStack[] { aInput1, aInput2, coal.getBlocks(aCoalAmount) }, + new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount) }, null, null, null, @@ -823,8 +696,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 0); GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( true, - new ItemStack[] {aInput1, aInput2, coal.getBlocks(aCoalAmount)}, - new ItemStack[] {aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, + new ItemStack[] { aInput1, aInput2, coal.getBlocks(aCoalAmount) }, + new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount) }, null, null, null, @@ -836,8 +709,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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)}, + new ItemStack[] { aInput1, aInput2, EnumCube.COKE_BLOCK.getItem(aCoalAmount / 2) }, + new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDust(aCoalAmount / 2) }, null, null, null, @@ -851,8 +724,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -864,21 +737,19 @@ 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)) @@ -914,8 +785,8 @@ 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; } @@ -924,10 +795,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput1, aOutput2}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2 }, null, - new FluidStack[] {aLubricant}, + new FluidStack[] { aLubricant }, null, aDuration, aEUt, @@ -936,26 +807,26 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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) { + 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); + aInput, + GT_Utility.getIntegratedCircuit(aCircuit), + aOutput1, + aOutput2, + aDuration, + aEUt, + aCleanroom); } @Override @@ -964,30 +835,24 @@ 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) { + 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}, + 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); } @@ -1010,7 +875,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aInputs, aOutputs, null, - new FluidStack[] {Materials.Water.getFluid(Math.max(4, Math.min(1000, aDuration * aEUt / 320)))}, + new FluidStack[] { Materials.Water.getFluid(Math.max(4, Math.min(1000, aDuration * aEUt / 320))) }, null, aDuration * 2, aEUt, @@ -1020,7 +885,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aInputs, aOutputs, null, - new FluidStack[] {GT_ModHandler.getDistilledWater(Math.max(3, Math.min(750, aDuration * aEUt / 426)))}, + new FluidStack[] { + GT_ModHandler.getDistilledWater(Math.max(3, Math.min(750, aDuration * aEUt / 426))) }, null, aDuration * 2, aEUt, @@ -1030,7 +896,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aInputs, aOutputs, null, - new FluidStack[] {Materials.Lubricant.getFluid(Math.max(1, Math.min(250, aDuration * aEUt / 1280)))}, + new FluidStack[] { Materials.Lubricant.getFluid(Math.max(1, Math.min(250, aDuration * aEUt / 1280))) }, null, aDuration, aEUt, @@ -1039,31 +905,23 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addAssemblerRecipe( - ItemStack aInput1, - Object aOreDict, - int aAmount, - FluidStack aFluidInput, - ItemStack aOutput1, - int aDuration, - int aEUt) { + 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); + if (GT_Utility.isStackValid(tStack)) 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]; @@ -1076,49 +934,48 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addAssemblerRecipe( - ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) { + 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); + 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 }, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom); return addAssemblerRecipe( - new ItemStack[] {aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom); + 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; } @@ -1149,9 +1006,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe( true, aInputs, - new ItemStack[] {aOutput1}, + new ItemStack[] { aOutput1 }, null, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, null, aDuration, aEUt, @@ -1160,14 +1017,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } - 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; } @@ -1186,9 +1038,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe( true, aInputs, - new ItemStack[] {aOutput1}, + new ItemStack[] { aOutput1 }, null, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, null, aDuration, aEUt, @@ -1205,7 +1057,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sWiremillRecipes.addRecipe( - true, new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, null, null, aDuration, aEUt, 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -1219,8 +1079,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sWiremillRecipes.addRecipe( true, - new ItemStack[] {aInput, aCircuit}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput, aCircuit }, + new ItemStack[] { aOutput }, null, null, null, @@ -1239,7 +1099,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sPolarizerRecipes.addRecipe( - true, new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, null, null, aDuration, aEUt, 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -1264,8 +1132,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe tRecipe = new GT_Recipe( - new ItemStack[] {aInput1, aCircuit}, - new ItemStack[] {aOutput1}, + new ItemStack[] { aInput1, aCircuit }, + new ItemStack[] { aOutput1 }, null, null, null, @@ -1287,8 +1155,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe( true, - new ItemStack[] {aInput, aShape}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput, aShape }, + new ItemStack[] { aOutput }, null, null, null, @@ -1308,8 +1176,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sSlicerRecipes.addRecipe( true, - new ItemStack[] {aInput, aShape}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput, aShape }, + new ItemStack[] { aOutput }, null, null, null, @@ -1320,16 +1188,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addOreWasherRecipe( - ItemStack aInput, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - FluidStack aFluidInput, - int aDuration, - int aEUt) { - if ((aInput == null) - || (aFluidInput == 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; } @@ -1338,10 +1199,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput1, aOutput2, aOutput3}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, null, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, null, aDuration, aEUt, @@ -1350,17 +1211,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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) + 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; } @@ -1369,11 +1222,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput1, aOutput2, aOutput3}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, null, aChances, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, null, aDuration, aEUt, @@ -1398,8 +1251,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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}, + new ItemStack[] { aInput1, ItemList.Block_Powderbarrel.get(tGunpowder, new Object[0]) }, + new ItemStack[] { aOutput1, aOutput2 }, null, null, null, @@ -1411,8 +1264,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (tDynamite < 17) { GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( true, - new ItemStack[] {aInput1, GT_ModHandler.getIC2Item("dynamite", tDynamite, null)}, - new ItemStack[] {aOutput1, aOutput2}, + new ItemStack[] { aInput1, GT_ModHandler.getIC2Item("dynamite", tDynamite, null) }, + new ItemStack[] { aOutput1, aOutput2 }, null, null, null, @@ -1423,8 +1276,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( true, - new ItemStack[] {aInput1, new ItemStack(Blocks.tnt, tTNT)}, - new ItemStack[] {aOutput1, aOutput2}, + new ItemStack[] { aInput1, new ItemStack(Blocks.tnt, tTNT) }, + new ItemStack[] { aOutput1, aOutput2 }, null, null, null, @@ -1434,8 +1287,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 0); GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( true, - new ItemStack[] {aInput1, GT_ModHandler.getIC2Item("industrialTnt", tITNT, null)}, - new ItemStack[] {aOutput1, aOutput2}, + new ItemStack[] { aInput1, GT_ModHandler.getIC2Item("industrialTnt", tITNT, null) }, + new ItemStack[] { aOutput1, aOutput2 }, null, null, null, @@ -1449,21 +1302,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @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); } @@ -1472,8 +1318,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -1483,9 +1329,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe( false, null, - new ItemStack[] {aOutput2}, + new ItemStack[] { aOutput2 }, null, - new FluidStack[] {aInput}, + new FluidStack[] { aInput }, aOutputs, aDuration, Math.max(1, aEUt), @@ -1494,13 +1340,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -1510,9 +1351,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe( false, aCircuit, - new ItemStack[] {aOutput2}, + new ItemStack[] { aOutput2 }, null, - new FluidStack[] {aInput}, + new FluidStack[] { aInput }, aOutputs, aDuration, Math.max(1, aEUt), @@ -1521,13 +1362,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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); } @@ -1579,13 +1415,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addVacuumFreezerRecipe( - ItemStack[] aItemInput, - FluidStack[] aFluidInput, - ItemStack[] aItemOutput, - FluidStack[] aFluidOutput, - int aDuration, - int aEUt) { + public boolean addVacuumFreezerRecipe(ItemStack[] aItemInput, FluidStack[] aFluidInput, ItemStack[] aItemOutput, + FluidStack[] aFluidOutput, int aDuration, int aEUt) { GT_Recipe.GT_Recipe_Map.sVacuumRecipes.addRecipe( false, aItemInput, @@ -1601,13 +1432,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @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; } @@ -1636,16 +1462,8 @@ 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; } @@ -1658,27 +1476,38 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sHammerRecipes.addRecipe( - true, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1}, null, null, null, aDuration, aEUt, 0); + true, + new ItemStack[] { aInput1 }, + new ItemStack[] { aOutput1 }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addForgeHammerRecipe( - ItemStack[] ItemInputArray, - FluidStack[] FluidInputArray, - ItemStack[] ItemOutputArray, - FluidStack[] FluidOutputArray, - int aDuration, - int aEUt) { + public boolean addForgeHammerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, + ItemStack[] ItemOutputArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt) { GT_Recipe.GT_Recipe_Map.sHammerRecipes.addRecipe( - true, ItemInputArray, ItemOutputArray, null, FluidInputArray, FluidOutputArray, aDuration, aEUt, 0); + true, + ItemInputArray, + ItemOutputArray, + null, + FluidInputArray, + FluidOutputArray, + 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; } @@ -1687,8 +1516,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.addRecipe( true, - new ItemStack[] {aContainedItem, aEmptyBox}, - new ItemStack[] {aFullBox}, + new ItemStack[] { aContainedItem, aEmptyBox }, + new ItemStack[] { aFullBox }, null, null, null, @@ -1699,8 +1528,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -1709,8 +1538,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes.addRecipe( true, - new ItemStack[] {aFullBox}, - new ItemStack[] {aContainedItem, aEmptyBox}, + new ItemStack[] { aFullBox }, + new ItemStack[] { aContainedItem, aEmptyBox }, null, null, null, @@ -1721,8 +1550,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -1731,8 +1560,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput1, aOutput2, aOutput3}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, null, null, null, @@ -1743,14 +1572,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -1759,8 +1582,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput1, aOutput2, aOutput3}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, null, aChances, null, @@ -1781,11 +1604,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sAmplifiers.addRecipe( true, - new ItemStack[] {aAmplifierItem}, + new ItemStack[] { aAmplifierItem }, null, null, null, - new FluidStack[] {Materials.UUAmplifier.getFluid(aAmplifierAmountOutputted)}, + new FluidStack[] { Materials.UUAmplifier.getFluid(aAmplifierAmountOutputted) }, aDuration, 30, 0); @@ -1793,8 +1616,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -1803,11 +1626,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe( false, - new ItemStack[] {aIngredient}, + new ItemStack[] { aIngredient }, null, null, - new FluidStack[] {new FluidStack(aInput, 750)}, - new FluidStack[] {new FluidStack(aOutput, 750)}, + new FluidStack[] { new FluidStack(aInput, 750) }, + new FluidStack[] { new FluidStack(aOutput, 750) }, aDuration, aEUt, 0); @@ -1823,8 +1646,8 @@ 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; } @@ -1833,11 +1656,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe( false, - new ItemStack[] {aIngredient}, + new ItemStack[] { aIngredient }, null, null, - new FluidStack[] {aInput}, - new FluidStack[] {aOutput}, + new FluidStack[] { aInput }, + new FluidStack[] { aOutput }, aDuration, aEUt, 0); @@ -1848,18 +1671,25 @@ 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)) + 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); + false, + null, + null, + null, + new FluidStack[] { aInput }, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1872,19 +1702,12 @@ 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)) + if ((aDuration = GregTech_API.sRecipeFile.get("distillery", aOutput.getFluid().getUnlocalizedName(), aDuration)) <= 0) { return false; } @@ -1909,11 +1732,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))) { + 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); + 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); @@ -1924,11 +1747,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistilleryRecipes.addRecipe( true, - new ItemStack[] {aCircuit}, - new ItemStack[] {aSolidOutput}, + new ItemStack[] { aCircuit }, + new ItemStack[] { aSolidOutput }, null, - new FluidStack[] {aInput}, - new FluidStack[] {aOutput}, + new FluidStack[] { aInput }, + new FluidStack[] { aOutput }, aDuration, aEUt, 0); @@ -1939,20 +1762,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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) { + public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, + int aDuration, int aEUt, boolean aHidden) { return addDistilleryRecipe( GT_Utility.getIntegratedCircuit(circuitConfig), aInput, @@ -1964,15 +1781,20 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addDistilleryRecipe( - int circuitConfig, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean 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); + 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; } @@ -1987,10 +1809,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes.addRecipe( true, - new ItemStack[] {aMold}, - new ItemStack[] {aOutput}, + new ItemStack[] { aMold }, + new ItemStack[] { aOutput }, null, - new FluidStack[] {aInput}, + new FluidStack[] { aInput }, null, aDuration, aEUt, @@ -1999,20 +1821,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -2027,12 +1843,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aRemains}, + new ItemStack[] { aInput }, + new ItemStack[] { aRemains }, null, - new int[] {aChance}, + new int[] { aChance }, null, - new FluidStack[] {aOutput}, + new FluidStack[] { aOutput }, aDuration, aEUt, 0); @@ -2043,8 +1859,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; } @@ -2059,12 +1875,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aRemains}, + new ItemStack[] { aInput }, + new ItemStack[] { aRemains }, null, - new int[] {aChance}, + new int[] { aChance }, null, - new FluidStack[] {aOutput}, + new FluidStack[] { aOutput }, aDuration, aEUt, 0); @@ -2072,8 +1888,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addFluidCannerRecipe( - ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput) { + 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) { @@ -2087,11 +1903,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, 1, 0); @@ -2099,13 +1915,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -2117,11 +1928,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); @@ -2129,15 +1940,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -2146,11 +1950,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput1, aOutput2, aOutput3}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, null, aChances, - new FluidStack[] {aBathingFluid}, + new FluidStack[] { aBathingFluid }, null, aDuration, aEUt, @@ -2159,16 +1963,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -2177,12 +1973,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput1, aOutput2, aOutput3}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, null, aChances, - new FluidStack[] {aBathingFluid}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aBathingFluid }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); @@ -2190,14 +1986,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -2206,8 +1996,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput1, aOutput2, aOutput3}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, null, aChances, null, @@ -2227,13 +2017,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sExtractorRecipes.addRecipe( - true, new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, null, null, aDuration, aEUt, 0); + 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; } @@ -2242,11 +2040,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sPrinterRecipes.addRecipe( true, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, aSpecialSlot, null, - new FluidStack[] {aFluid}, + new FluidStack[] { aFluid }, null, aDuration, aEUt, @@ -2255,58 +2053,31 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addAutoclaveRecipe( - ItemStack aInput, - FluidStack aFluid, - ItemStack aOutput, - int aChance, - int aDuration, - int aEUt, - boolean aCleanroom) { + 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) { + 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; } @@ -2318,12 +2089,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( true, - new ItemStack[] {aInput, aCircuit}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput, aCircuit }, + new ItemStack[] { aOutput }, null, - new int[] {aChance}, - new FluidStack[] {aFluidIn}, - new FluidStack[] {aFluidOut}, + new int[] { aChance }, + new FluidStack[] { aFluidIn }, + new FluidStack[] { aFluidOut }, aDuration, aEUt, aCleanroom ? -200 : 0); @@ -2331,27 +2102,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addAutoclaveSpaceRecipe( - ItemStack aInput, - FluidStack aFluid, - ItemStack aOutput, - int aChance, - int aDuration, - int aEUt, - boolean aCleanroom) { + 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; } @@ -2363,11 +2121,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( true, - new ItemStack[] {aInput, aCircuit}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput, aCircuit }, + new ItemStack[] { aOutput }, null, - new int[] {aChance}, - new FluidStack[] {aFluid}, + new int[] { aChance }, + new FluidStack[] { aFluid }, null, aDuration, aEUt, @@ -2376,16 +2134,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addAutoclave4Recipe( - ItemStack aInput, - ItemStack aCircuit, - FluidStack aFluidIn, - FluidStack aFluidOut, - ItemStack[] aOutputs, - int[] aChances, - int aDuration, - int aEUt, - boolean aCleanroom) { + 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; } @@ -2397,12 +2147,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( true, - new ItemStack[] {aInput, aCircuit}, + new ItemStack[] { aInput, aCircuit }, aOutputs, null, aChances, - new FluidStack[] {aFluidIn}, - new FluidStack[] {aFluidOut}, + new FluidStack[] { aFluidIn }, + new FluidStack[] { aFluidOut }, aDuration, aEUt, aCleanroom ? -200 : 0); @@ -2411,16 +2161,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Deprecated @Override - public boolean addMixerRecipe( - ItemStack aInput1, - ItemStack aInput2, - ItemStack aInput3, - ItemStack aInput4, - FluidStack aFluidInput, - FluidStack aFluidOutput, - ItemStack aOutput, - int aDuration, - int 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, @@ -2440,18 +2182,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @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) { + 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, @@ -2471,21 +2204,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @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; } @@ -2493,26 +2214,25 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } if ((aFluidOutput != null) - && ((aDuration = GregTech_API.sRecipeFile.get( - "mixer", aFluidOutput.getFluid().getName(), aDuration)) + && ((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}, + new ItemStack[] { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }, + new ItemStack[] { aOutput }, null, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); - ItemStack[] itemInputs = {aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}; - ItemStack[] itemOutputs = {aOutput}; - FluidStack[] fluidInputs = {aFluidInput, null, null, null, null, null, null, null, null, null}; - FluidStack[] fluidOutputs = {aFluidOutput, null}; + ItemStack[] itemInputs = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }; + ItemStack[] itemOutputs = { aOutput }; + FluidStack[] fluidInputs = { aFluidInput, null, null, null, null, null, null, null, null, null }; + FluidStack[] fluidOutputs = { aFluidOutput, null }; byte iNumber = 0; byte oNumber = 0; @@ -2537,19 +2257,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { oNumber++; } - GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.addRecipe( - false, itemInputs, itemOutputs, null, null, fluidInputs, fluidOutputs, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes + .addRecipe(false, itemInputs, itemOutputs, null, null, fluidInputs, fluidOutputs, aDuration, aEUt, 0); return true; } @Override - public boolean addMixerRecipe( - ItemStack[] ItemInputArray, - FluidStack[] FluidInputArray, - ItemStack[] ItemOutputArray, - FluidStack[] FluidOutputArray, - int aDuration, - int aEUt) { + public boolean addMixerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] ItemOutputArray, + FluidStack[] FluidOutputArray, int aDuration, int aEUt) { GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe( false, ItemInputArray, @@ -2590,8 +2305,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } List<FluidStack> tFluidOutputList; if (FluidOutputArray != null) { - tFluidOutputList = new ArrayList<>(Arrays.asList(FluidOutputArray)); - ; + tFluidOutputList = new ArrayList<>(Arrays.asList(FluidOutputArray));; } else { tFluidOutputList = new ArrayList<>(1); } @@ -2633,24 +2347,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @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; } @@ -2658,26 +2358,25 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } if ((aFluidOutput != null) - && ((aDuration = GregTech_API.sRecipeFile.get( - "mixer", aFluidOutput.getFluid().getName(), aDuration)) + && ((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}, + 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}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); - ItemStack[] itemInputs = {aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}; - ItemStack[] itemOutputs = {aOutput1, aOutput2, aOutput3, aOutput4}; - FluidStack[] fluidInputs = {aFluidInput, null, null, null, null, null, null, null, null, null}; - FluidStack[] fluidOutputs = {aFluidOutput, null, null, null, null}; + ItemStack[] itemInputs = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }; + ItemStack[] itemOutputs = { aOutput1, aOutput2, aOutput3, aOutput4 }; + FluidStack[] fluidInputs = { aFluidInput, null, null, null, null, null, null, null, null, null }; + FluidStack[] fluidOutputs = { aFluidOutput, null, null, null, null }; byte iNumber = 0; byte oNumber = 0; @@ -2702,27 +2401,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { oNumber++; } - GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.addRecipe( - false, itemInputs, itemOutputs, null, null, fluidInputs, fluidOutputs, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes + .addRecipe(false, itemInputs, itemOutputs, null, null, fluidInputs, fluidOutputs, aDuration, aEUt, 0); return true; } @Deprecated @Override - public boolean addLaserEngraverRecipe( - ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt) { + 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; } @@ -2734,8 +2428,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe( true, - new ItemStack[] {aItemToEngrave, aLens}, - new ItemStack[] {aEngravedItem}, + new ItemStack[] { aItemToEngrave, aLens }, + new ItemStack[] { aEngravedItem }, null, null, null, @@ -2746,14 +2440,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addLaserEngraverRecipe( - ItemStack[] ItemInputArray, - FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, - FluidStack[] FluidOutputArray, - int aDuration, - int aEUt, - boolean aCleanroom) { + 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, @@ -2769,8 +2457,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addFormingPressRecipe( - ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt) { + public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, + int aDuration, int aEUt) { if ((aItemToImprint == null) || (aForm == null) || (aImprintedItem == null)) { return false; } @@ -2779,8 +2467,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sPressRecipes.addRecipe( true, - new ItemStack[] {aItemToImprint, aForm}, - new ItemStack[] {aImprintedItem}, + new ItemStack[] { aItemToImprint, aForm }, + new ItemStack[] { aImprintedItem }, null, null, null, @@ -2791,13 +2479,13 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addFormingPressRecipe( - ItemStack[] ItemInputArray, ItemStack[] OutputItemArray, int aDuration, int aEUt) { + public boolean addFormingPressRecipe(ItemStack[] ItemInputArray, ItemStack[] OutputItemArray, int aDuration, + int aEUt) { if ((ItemInputArray == null) || (OutputItemArray == null)) { return false; } - GT_Recipe.GT_Recipe_Map.sPressRecipes.addRecipe( - true, ItemInputArray, OutputItemArray, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sPressRecipes + .addRecipe(true, ItemInputArray, OutputItemArray, null, null, null, aDuration, aEUt, 0); return true; } @@ -2806,34 +2494,40 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aItem == 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[] {aItem}, null, null, null, new FluidStack[] {aOutput}, aDuration, aEUt, 0); + true, + new ItemStack[] { aItem }, + null, + null, + null, + new FluidStack[] { aOutput }, + 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}, + new ItemStack[] { aCircuit }, null, null, - new FluidStack[] {aInput}, - new FluidStack[] {aOutput}, + new FluidStack[] { aInput }, + new FluidStack[] { aOutput }, aDuration, aEUt, 0); @@ -2841,8 +2535,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @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; } @@ -2853,7 +2547,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sSifterRecipes.addRecipe( true, - new ItemStack[] {aItemToSift}, + new ItemStack[] { aItemToSift }, aSiftedItems, null, aChances, @@ -2869,14 +2563,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addSifterRecipe( - ItemStack[] ItemInputArray, - FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, - FluidStack[] FluidOutputArray, - int[] aChances, - int aDuration, - int aEUt, + public boolean addSifterRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, + ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { GT_Recipe.GT_Recipe_Map.sSifterRecipes.addRecipe( false, @@ -2893,14 +2581,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addArcFurnaceRecipe( - ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { + 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; } @@ -2911,11 +2599,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe sRecipe = GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe( true, - new ItemStack[] {aInput}, + new ItemStack[] { aInput }, aOutputs, null, aChances, - new FluidStack[] {Materials.Oxygen.getGas(aDuration)}, + new FluidStack[] { Materials.Oxygen.getGas(aDuration) }, null, aDuration, Math.max(1, aEUt), @@ -2923,17 +2611,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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}, + new ItemStack[] { aInput }, aOutputs, null, aChances, - new FluidStack[] {tMaterial.getPlasma(tPlasmaAmount)}, - new FluidStack[] {tMaterial.getGas(tPlasmaAmount)}, + new FluidStack[] { tMaterial.getPlasma(tPlasmaAmount) }, + new FluidStack[] { tMaterial.getGas(tPlasmaAmount) }, Math.max(1, aDuration / 16), Math.max(1, aEUt / 3), 0); @@ -2949,8 +2637,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; } @@ -2961,11 +2649,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe( true, - new ItemStack[] {aInput}, + new ItemStack[] { aInput }, aOutputs, null, aChances, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, null, aDuration, Math.max(1, aEUt), @@ -2977,8 +2665,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; } @@ -2989,11 +2677,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe( true, - new ItemStack[] {aInput}, + new ItemStack[] { aInput }, aOutputs, null, aChances, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, null, aDuration, Math.max(1, aEUt), @@ -3005,14 +2693,8 @@ 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; } @@ -3023,12 +2705,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe( true, - new ItemStack[] {aInput}, + new ItemStack[] { aInput }, aOutputs, null, aChances, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, Math.max(1, aEUt), 0); @@ -3039,14 +2721,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; } @@ -3056,7 +2738,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.addRecipe( - true, new ItemStack[] {aInput}, aOutputs, null, aChances, null, null, aDuration, aEUt, 0); + true, + new ItemStack[] { aInput }, + aOutputs, + null, + aChances, + null, + null, + aDuration, + aEUt, + 0); if ((hidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -3067,14 +2758,8 @@ 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; } @@ -3083,12 +2768,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.addRecipe( false, - new ItemStack[] {aInput, ItemList.Circuit_Integrated.getWithDamage(0L, intCircuit, new Object[0])}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput, ItemList.Circuit_Integrated.getWithDamage(0L, intCircuit, new Object[0]) }, + new ItemStack[] { aOutput }, null, null, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); @@ -3102,8 +2787,8 @@ 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; } @@ -3112,12 +2797,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe( false, - new ItemStack[] {GT_Utility.getIntegratedCircuit(circuitConfig)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(circuitConfig) }, null, null, null, - new FluidStack[] {aInput, aInput2}, - new FluidStack[] {aOutput}, + new FluidStack[] { aInput, aInput2 }, + new FluidStack[] { aOutput }, aDuration, aEUt, 0); @@ -3125,16 +2810,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addAssemblylineRecipe( - ItemStack aResearchItem, - int aResearchTime, - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - ItemStack aOutput, - int aDuration, - int aEUt) { - if ((aResearchItem == null) - || (aResearchTime <= 0) + 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 @@ -3146,15 +2824,18 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } 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_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])}, + new ItemStack[] { aResearchItem }, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0]) }, null, null, aResearchTime, @@ -3163,8 +2844,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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])}, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0]) }, aFluidInputs, null, aDuration, @@ -3172,23 +2853,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 0, false); GT_Recipe_AssemblyLine tRecipe = new GT_Recipe_AssemblyLine( - aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); + 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) + 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 @@ -3225,11 +2905,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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) - .thenComparing(s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).modId) - .thenComparingInt(Items.feather::getDamage) - .thenComparingInt(s -> s.stackSize)); + 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) { @@ -3243,12 +2924,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { tPersistentHash = tPersistentHash * 31 + (objs[0] == null ? "" : objs[0].toString()).hashCode(); tPersistentHash = tPersistentHash * 31 + tAmount; continue; - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } } - GT_FML_LOGGER.info("addAssemblingLineRecipe " + aResearchItem.getDisplayName() + " --> " - + aOutput.getUnlocalizedName() + " there is some null item in that recipe"); + 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); @@ -3261,9 +2944,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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])}, + new ItemStack[] { aResearchItem }, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0]) }, null, null, aResearchTime, @@ -3272,8 +2955,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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])}, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0]) }, aFluidInputs, null, aDuration, @@ -3282,7 +2965,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { tAlts, false); GT_Recipe_AssemblyLine tRecipe = new GT_Recipe_AssemblyLine( - aResearchItem, aResearchTime, tInputs, aFluidInputs, aOutput, aDuration, aEUt, tAlts); + aResearchItem, + aResearchTime, + tInputs, + aFluidInputs, + aOutput, + aDuration, + aEUt, + tAlts); tRecipe.setPersistentHash(tPersistentHash); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(tRecipe); GT_AssemblyLineUtils.addRecipeToCache(tRecipe); @@ -3290,21 +2980,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addCircuitAssemblerRecipe( - ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt) { + 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; } @@ -3323,16 +3008,21 @@ 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); + aInputs, + aFluidInput, + aOutput, + aDuration, + aEUt, + aCleanroom); } } GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe( true, aInputs, - new ItemStack[] {aOutput}, + new ItemStack[] { aOutput }, null, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, null, aDuration, aEUt, @@ -3340,13 +3030,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } - public boolean addCircuitAssemblerRecipeNonOredicted( - ItemStack[] aInputs, - FluidStack aFluidInput, - ItemStack aOutput, - int aDuration, - int aEUt, - boolean aCleanroom) { + 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; } @@ -3359,10 +3044,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe( true, aInputs, - new ItemStack[] {aOutput}, + new ItemStack[] { aOutput }, null, null, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, null, aDuration, aEUt, @@ -3371,30 +3056,28 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addNanoForgeRecipe( - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - ItemStack[] aOutputs, - FluidStack[] aFluidOutputs, - int[] aChances, - int aDuration, - int aEUt, - int aSpecialValue) { + public boolean addNanoForgeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, + FluidStack[] aFluidOutputs, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { if (aInputs == null || aOutputs == null || aSpecialValue == 0) return false; - GT_Recipe.GT_Recipe_Map.sNanoForge.addRecipe(new GT_Recipe( - false, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + GT_Recipe.GT_Recipe_Map.sNanoForge.addRecipe( + new GT_Recipe( + false, + aInputs, + aOutputs, + null, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue)); return true; } @Override - public boolean addPCBFactoryRecipe( - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - ItemStack[] aOutputs, - int aDuration, - int aEUt, - int aSpecialValue) { + public boolean addPCBFactoryRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, + int aDuration, int aEUt, int aSpecialValue) { if (aInputs == null || aFluidInputs == null || aOutputs == null) { return false; @@ -3404,20 +3087,25 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } - GT_Recipe.GT_Recipe_Map.sPCBFactory.addRecipe(new GT_Recipe( - false, aInputs, aOutputs, null, null, aFluidInputs, null, aDuration, aEUt, aSpecialValue)); + GT_Recipe.GT_Recipe_Map.sPCBFactory.addRecipe( + new GT_Recipe( + false, + aInputs, + aOutputs, + null, + null, + aFluidInputs, + null, + aDuration, + aEUt, + aSpecialValue)); return true; } @Override - public GT_Recipe addIC2ReactorBreederCell( - ItemStack input, - ItemStack output, - boolean reflector, - int heatStep, - int heatMultiplier, - int requiredPulses) { + public GT_Recipe addIC2ReactorBreederCell(ItemStack input, ItemStack output, boolean reflector, int heatStep, + int heatMultiplier, int requiredPulses) { return GT_Recipe.GT_Recipe_Map.sIC2NuclearFakeRecipe.addFakeRecipe( input, output, @@ -3428,8 +3116,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public GT_Recipe addIC2ReactorFuelCell( - ItemStack input, ItemStack output, boolean aMox, float aHeat, float aEnergy, int aCells) { + public GT_Recipe addIC2ReactorFuelCell(ItemStack input, ItemStack output, boolean aMox, float aHeat, float aEnergy, + int aCells) { // for the mysterious constant 5.0f, // see ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric.getOfferedEnergy // don't ask, just accept @@ -3440,12 +3128,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { output, aMox ? "MOX Model" : "Uranium Model", "Neutron Pulse: " + aCells, - aCells == 1 - ? String.format("Heat: %.1f * n1 * (n1 + 1)", aHeat / 2f) + aCells == 1 ? String.format("Heat: %.1f * n1 * (n1 + 1)", aHeat / 2f) : String.format("Heat: %.1f * (%d + n1) * (%d + n1)", aHeat * aCells / 2f, aCells, aCells + 1), String.format( "Energy: %.1f + n2 * %.1f EU/t", - aEnergy * aCells * pulses * nukePowerMult, aEnergy * nukePowerMult)); + aEnergy * aCells * pulses * nukePowerMult, + aEnergy * nukePowerMult)); } private boolean areItemsAndFluidsBothNull(ItemStack[] items, FluidStack[] fluids) { diff --git a/src/main/java/gregtech/common/GT_Server.java b/src/main/java/gregtech/common/GT_Server.java index 75d98e27a1..1a2d8e6b5a 100644 --- a/src/main/java/gregtech/common/GT_Server.java +++ b/src/main/java/gregtech/common/GT_Server.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class GT_Server extends GT_Proxy { + @Override public boolean isServerSide() { return true; diff --git a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java index 1f7e8f4de9..3e91f876a8 100644 --- a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java +++ b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java @@ -1,18 +1,14 @@ package gregtech.common; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -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; import net.minecraft.util.ResourceLocation; + import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.Aspect; @@ -25,8 +21,15 @@ import thaumcraft.api.research.ResearchCategories; import thaumcraft.api.research.ResearchCategoryList; import thaumcraft.api.research.ResearchItem; import thaumcraft.api.research.ResearchPage; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.interfaces.internal.IThaumcraftCompat; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; public class GT_ThaumcraftCompat implements IThaumcraftCompat { + public GT_ThaumcraftCompat() { TC_Aspects.AER.mAspect = Aspect.AIR; TC_Aspects.ALIENIS.mAspect = Aspect.ELDRITCH; @@ -81,31 +84,31 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { TC_Aspects.STRONTIO.mAspect = new Aspect( "strontio", 15647411, - new Aspect[] {Aspect.MIND, Aspect.ENTROPY}, + 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 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 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 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 Aspect[] { Aspect.LIGHT, Aspect.ENERGY }, new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.RADIO.name() + ".png"), 1); @@ -119,29 +122,17 @@ 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; } @@ -149,15 +140,21 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { if (tCategory == null) { return null; } - for (Iterator i$ = tCategory.research.values().iterator(); i$.hasNext(); ) { + for (Iterator i$ = tCategory.research.values().iterator(); i$.hasNext();) { ResearchItem tResearch = (ResearchItem) i$.next(); if ((tResearch.displayColumn == aX) && (tResearch.displayRow == aY)) { aX += (aX > 0 ? 5 : -5); 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); @@ -218,10 +215,9 @@ 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) + 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())) { @@ -235,15 +231,9 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { } @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) + 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) @@ -260,16 +250,16 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { } @Override - public boolean registerThaumcraftAspectsToItem( - ItemStack aExampleStack, List<TC_Aspects.TC_AspectStack> aAspects, String aOreDict) { + 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) { + 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)); diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java index e7351af7c3..482ff54c02 100644 --- a/src/main/java/gregtech/common/GT_UndergroundOil.java +++ b/src/main/java/gregtech/common/GT_UndergroundOil.java @@ -2,36 +2,42 @@ 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; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; + import org.apache.commons.lang3.tuple.Pair; +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; + /** * Created by Tec on 29.04.2017. */ public class GT_UndergroundOil { + 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); /** * Effectively just call {@code undergroundOil(te, -1)} for you + * * @see #undergroundOil(World, int, int, float) */ public static FluidStack undergroundOilReadInformation(IGregTechTileEntity te) { @@ -40,6 +46,7 @@ public class GT_UndergroundOil { /** * Effectively just call {@code undergroundOil(chunk, -1)} for you + * * @see #undergroundOil(World, int, int, float) */ public static FluidStack undergroundOilReadInformation(Chunk chunk) { @@ -49,7 +56,8 @@ public class GT_UndergroundOil { /** @see #undergroundOil(World, int, int, float) */ public static FluidStack undergroundOil(IGregTechTileEntity te, float readOrDrainCoefficient) { return undergroundOil( - te.getWorld().getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), readOrDrainCoefficient); + te.getWorld().getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), + readOrDrainCoefficient); } // Returns whole content for information purposes -> when drainSpeedCoefficient < 0 @@ -61,45 +69,47 @@ public class GT_UndergroundOil { /** * Pump fluid or read info. - * @param w a remote World. For a WorldClient it will always tell you null - * @param chunkX chunk coordinate X, i.e. blockX >> 4 - * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4 - * @param readOrDrainCoefficient how fast to pump. The higher the faster. use negative to read expected current output + * + * @param w a remote World. For a WorldClient it will always tell you null + * @param chunkX chunk coordinate X, i.e. blockX >> 4 + * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4 + * @param readOrDrainCoefficient how fast to pump. The higher the faster. use negative to read expected current + * output * @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 ChunkData chunkData = STORAGE.get(w, chunkX, chunkZ); if (chunkData.getVein() == null || chunkData.getFluid() == null) // nothing here... - return null; + return null; // do stuff on it if needed FluidStack fluidInChunk = new FluidStack(chunkData.getFluid(), 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 + 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 - if (XSTR_INSTANCE.nextFloat() < (decrease - averageDecrease)) - decrease--; // use XSTR_INSTANCE to "subtract double from int" + if (XSTR_INSTANCE.nextFloat() < (decrease - averageDecrease)) 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 if (chunkData.amount <= DIVIDER) { chunkData.setAmount(0); } else { // get the expected current output - fluidInChunk.amount = - (int) Math.floor(chunkData.getAmount() * (double) -readOrDrainCoefficient / DIVIDER); + fluidInChunk.amount = (int) Math + .floor(chunkData.getAmount() * (double) -readOrDrainCoefficient / DIVIDER); } } return fluidInChunk; @@ -107,6 +117,7 @@ public class GT_UndergroundOil { /** * Get the deposit as if it is never exploited + * * @return UO fluid kind and amount, or null if nothing here. */ public static Pair<GT_UO_Fluid, Integer> getPristineAmount(World world, int chunkX, int chunkZ) { @@ -143,29 +154,31 @@ public class GT_UndergroundOil { * Primary functionality: * * <ul> - * <li>Decouple data storage with chunk, making it possible to pump oil from unloaded chunks</li> - * <li>Regen detection. If fluid generation config is changed, chunk fluid will be regenerated.</li> + * <li>Decouple data storage with chunk, making it possible to pump oil from unloaded chunks</li> + * <li>Regen detection. If fluid generation config is changed, chunk fluid will be regenerated.</li> * </ul> * * <h2>Serialized form</h2> * <p> - * Since the exact file layout is controlled by the super class, here we only concern how each chunk's data is written. + * Since the exact file layout is controlled by the super class, here we only concern how each chunk's data is + * written. * <h3>Form A: Empty Chunk</h3> * <ol> - * <li>4 bytes of 0 </li> + * <li>4 bytes of 0</li> * </ol> * * <h3>Form B: Normal Chunk</h3> * <ol> - * <li>4 bytes unsigned integer. Vein Hash.</li> - * <li>UTF string. Vein Key.</li> - * <li>4 bytes signed integer. Fluid amount.</li> + * <li>4 bytes unsigned integer. Vein Hash.</li> + * <li>UTF string. Vein Key.</li> + * <li>4 bytes signed integer. Fluid amount.</li> * </ol> * * @author glease */ @ParametersAreNonnullByDefault private static class GT_UndergroundOilStore extends GT_ChunkAssociatedData<ChunkData> { + private static final WeakHashMap<GT_UO_Fluid, Integer> hashes = new WeakHashMap<>(); private GT_UndergroundOilStore() { @@ -187,8 +200,8 @@ 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"); GT_UndergroundOil.ChunkData pristine = createElement(world, chunkX, chunkZ); @@ -202,10 +215,7 @@ public class GT_UndergroundOil { if (hash == 0) return NIL_FLUID_STACK; return new GT_UndergroundOil.ChunkData( amount, - GT_Mod.gregtechproxy - .mUndergroundOil - .GetDimension(world.provider.dimensionId) - .getUOFluid(veinKey), + GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(world.provider.dimensionId).getUOFluid(veinKey), veinKey); } @@ -216,7 +226,10 @@ public class GT_UndergroundOil { 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); + pristine.getRight(), + pristine.getLeft(), + dimension.getUOFluidKey(pristine.getLeft()), + false); } private static int hash(@Nullable GT_UO_Fluid fluid) { @@ -234,6 +247,7 @@ public class GT_UndergroundOil { * Represent the amount of fluid in a given chunk. */ private static final class ChunkData implements GT_ChunkAssociatedData.IData { + private final Fluid fluid; @Nullable 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 2a66514fe5..737cd530f7 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 @@ -4,20 +4,23 @@ 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 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; + 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; public final short mMinY; @@ -46,24 +49,9 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { 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); @@ -79,22 +67,22 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { 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; @@ -102,24 +90,9 @@ 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) { + 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, @@ -137,21 +110,9 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { 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); @@ -164,22 +125,22 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { 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; @@ -187,17 +148,8 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { } @Override - public int executeWorldgenChunkified( - World aWorld, - Random aRandom, - String aBiome, - int aDimensionType, - int aChunkX, - int aChunkZ, - int aSeedX, - int aSeedZ, - IChunkProvider aChunkGenerator, - IChunkProvider aChunkProvider) { + 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 @@ -206,22 +158,20 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { 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( - "Wrong dimension" - ); - } - */ + ((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( "Wrong dimension" ); } + */ 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;*/ + /* + * 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; + */ if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { return WRONG_BIOME; @@ -277,45 +227,52 @@ 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 + // 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)))); + 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 // 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. + 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); + 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); + 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)) { + 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]++; + } } } if ((placeCount[1] + placeCount[3]) == 0) { @@ -326,167 +283,179 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { 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); + 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)) { + 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 (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); + 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)) + 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]++; - } - } 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 (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); + 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)) + 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(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); + 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)) + 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 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); + 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)) + 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); + 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); + 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]++; - } + } 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); + 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); + 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]++; - } + } 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 @@ -517,16 +486,26 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { } } 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 55bd77f474..ef8850638c 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 @@ -2,17 +2,20 @@ package gregtech.common; import static gregtech.api.enums.GT_Values.debugSmallOres; +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + 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.world.World; -import net.minecraft.world.chunk.IChunkProvider; public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen { + public final short mMinY; public final short mMaxY; public final short mAmount; @@ -26,16 +29,8 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_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) { + 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); @@ -44,27 +39,17 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen { 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.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) { + 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); @@ -73,35 +58,25 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen { 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.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) { + 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 } if (!isGenerationAllowed( aWorld, aDimensionType, - ((aDimensionType == -1) && (this.mNether)) - || ((aDimensionType == 0) && (this.mOverworld)) - || ((aDimensionType == 1) && (this.mEnd)) - ? aDimensionType - : aDimensionType ^ 0xFFFFFFFF)) { + ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) + || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { return false; } int count = 0; @@ -124,11 +99,16 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen { } } if (debugSmallOres) { - GT_Log.out.println("Small Ore:" + this.mWorldGenName + " @ dim=" - + aDimensionType + " mX=" - + aChunkX / 16 + " mZ=" - + aChunkZ / 16 + " ore=" - + count); + 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 5ea16eae89..c75d6d6ad4 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_Stone.java +++ b/src/main/java/gregtech/common/GT_Worldgen_Stone.java @@ -2,39 +2,53 @@ 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 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; + 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) { mExists = exists; } - } - ; + }; class ValidSeeds { + public int mX; public int mZ; @@ -42,21 +56,10 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { 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, + 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, @@ -74,15 +77,8 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { } @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(); @@ -105,21 +101,21 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { | ((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) + 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 + + ((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)); // 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); + if (debugStones) GT_Log.out.println( + "New stoneseed=" + mWorldGenName + " x=" + x + " z=" + z + " realSize=" + realSize); } else { validStoneSeeds.put(hash, new StoneSeeds(false)); } @@ -142,16 +138,14 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { 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) + 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. + 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 @@ -163,9 +157,9 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { // 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 @@ -183,17 +177,26 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { // 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"); + 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)); @@ -208,26 +211,37 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { 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); + 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? + 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; @@ -238,8 +252,8 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { 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++) { @@ -261,24 +275,41 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { .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))))) { - aWorld.setBlock(iX, iY, iZ, this.mBlock, this.mBlockMeta, 0); - } + && (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 fe02ed010c..8566fd769e 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -6,26 +6,29 @@ 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; -import gregtech.api.enums.Materials; -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 java.util.ArrayList; import java.util.HashSet; import java.util.Hashtable; import java.util.List; import java.util.Random; + 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 cpw.mods.fml.common.IWorldGenerator; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.objects.XSTR; +import gregtech.api.util.GT_Log; +import gregtech.api.world.GT_Worldgen; +import gregtech.common.blocks.GT_TileEntity_Ores; + public class GT_Worldgenerator implements IWorldGenerator { + private static int mEndAsteroidProbability = 300; private static int mSize = 100; private static int endMinSize = 50; @@ -33,7 +36,7 @@ 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 + // 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", @@ -66,45 +69,50 @@ public class GT_Worldgenerator implements IWorldGenerator { } @Override - public void generate( - Random aRandom, - int aX, - int aZ, - World aWorld, - IChunkProvider aChunkGenerator, + 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()); + 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. + 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); + 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); } @@ -115,6 +123,7 @@ public class GT_Worldgenerator implements IWorldGenerator { } public static class WorldGenContainer implements Runnable { + public final Random mRandom; public final int mX; public final int mZ; @@ -124,10 +133,11 @@ public class GT_Worldgenerator implements IWorldGenerator { public final IChunkProvider mChunkProvider; public final String mBiome; // Used for outputting orevein weights and bins - // static int test=0; + // 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; @@ -140,8 +150,7 @@ 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; } @@ -152,21 +161,13 @@ 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; @@ -180,20 +181,20 @@ public class GT_Worldgenerator implements IWorldGenerator { // How to evaluate oregen distribution // - Enable debugOreveins // - Fly around for a while, or teleport jumping ~320 blocks at a time, with - // a 15-30s pause for worldgen to catch up + // a 15-30s pause for worldgen to catch up // - Do this across a large area, at least 2000x2000 blocks for good numbers // - Open logs\gregtech.log - // - Using notepad++, do a Search | Find - enter "Added" for the search term + // - Using notepad++, do a Search | Find - enter "Added" for the search term // - Select Find All In Current Document // - In the Search window, right-click and Select All // - Copy and paste to a new file - // - Delete extraneous stuff at top, and blank line at bottom. Line count is - // # of total oreveins + // - Delete extraneous stuff at top, and blank line at bottom. Line count is + // # of total oreveins // - For simple spot checks, use Find All in Current Document for specific - // oremixes, ie ore.mix.diamond, to check how many appear in the list. + // oremixes, ie ore.mix.diamond, to check how many appear in the list. // - For more complex work, import file into Excel, and sort based on oremix - // column. Drag select the oremix names, in the bottom right will be how many - // entries to add in a seperate tab to calculate %ages. + // column. Drag select the oremix names, in the bottom right will be how many + // entries to add in a seperate tab to calculate %ages. // // When using the ore weights, discount or remove the high altitude veins since // their high weight are offset by their rareness. I usually just use zero for them. @@ -203,20 +204,20 @@ public class GT_Worldgenerator implements IWorldGenerator { 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 + // (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 + // ((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 + // ((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 + // ( (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 + | ((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 @@ -226,18 +227,22 @@ public class GT_Worldgenerator implements IWorldGenerator { 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) + if ((oreveinPercentageRoll < oreveinPercentage) && (GT_Worldgen_GT_Ore_Layer.sWeight > 0) && (GT_Worldgen_GT_Ore_Layer.sList.size() > 0)) { int placementAttempts = 0; boolean oreveinFound = false; @@ -245,24 +250,13 @@ public class GT_Worldgenerator implements IWorldGenerator { // Used for outputting orevein weights and bins /* - if( test==0 ) - { - test = 1; - GT_Log.out.println( - "sWeight = " + GT_Worldgen_GT_Ore_Layer.sWeight - ); - for (GT_Worldgen_GT_Ore_Layer tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) { - GT_Log.out.println( - ( tWorldGen).mWorldGenName + " mWeight = " + ( tWorldGen).mWeight + " mSize = " + (tWorldGen).mSize - ); - } - } - */ - for (i = 0; - (i < oreveinAttempts) - && (!oreveinFound) - && (placementAttempts < oreveinMaxPlacementAttempts); - i++) { + * if( test==0 ) { test = 1; GT_Log.out.println( "sWeight = " + GT_Worldgen_GT_Ore_Layer.sWeight ); + * for (GT_Worldgen_GT_Ore_Layer tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) { GT_Log.out.println( ( + * tWorldGen).mWorldGenName + " mWeight = " + ( tWorldGen).mWeight + " mSize = " + (tWorldGen).mSize + * ); } } + */ + 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; @@ -271,7 +265,7 @@ public class GT_Worldgenerator implements IWorldGenerator { // 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 + // 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, @@ -286,13 +280,16 @@ public class GT_Worldgenerator implements IWorldGenerator { 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; @@ -301,37 +298,48 @@ 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); } } @@ -339,37 +347,50 @@ public class GT_Worldgenerator implements IWorldGenerator { } // 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); + 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); + 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 { // 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 + 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, @@ -400,10 +421,8 @@ public class GT_Worldgenerator implements IWorldGenerator { try { for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) { /* - if (debugWorldGen) GT_Log.out.println( - "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName - ); - */ + * if (debugWorldGen) GT_Log.out.println( "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName ); + */ tWorldGen.executeWorldgen( this.mWorld, this.mRandom, @@ -459,8 +478,7 @@ public class GT_Worldgenerator implements IWorldGenerator { // if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || // (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionName.equals("Asteroids")) && gcAsteroids // && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) { - if (((tDimensionType == 1) - && endAsteroids + if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0)))) { short primaryMeta = 0; short secondaryMeta = 0; @@ -499,7 +517,7 @@ public class GT_Worldgenerator implements IWorldGenerator { if (tDimensionType == 1) { mSize = aRandom.nextInt((int) (endMaxSize - endMinSize)); // } else if (tDimensionName.equals("Asteroids")) { - // mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize)); + // mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize)); } if ((mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) { float randomRadian = aRandom.nextFloat() * 3.141593F; @@ -531,21 +549,20 @@ public class GT_Worldgenerator implements IWorldGenerator { 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))) { + && (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); } @@ -566,9 +583,13 @@ 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 8c8852c189..e3b916db88 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java @@ -1,24 +1,20 @@ package gregtech.common.bees; +import java.awt.*; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import forestry.api.apiculture.EnumBeeChromosome; 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; 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, + + public GT_AlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority, + String unlocalizedDescription, IClassification branch, String binomial, Color primaryColor, Color secondaryColor) { super( uid, diff --git a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java index 46175730e9..9143536dbd 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java @@ -1,5 +1,12 @@ package gregtech.common.bees; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; + +import org.apache.commons.lang3.reflect.FieldUtils; + import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.arboriculture.EnumTreeChromosome; import forestry.api.genetics.*; @@ -10,11 +17,6 @@ import forestry.core.genetics.alleles.*; import forestry.core.utils.vect.IVect; import forestry.plugins.PluginManager; import gregtech.GT_Mod; -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 { @@ -33,7 +35,8 @@ public class GT_AlleleHelper extends AlleleHelper { createAlleles(EnumAllele.Territory.class, EnumBeeChromosome.TERRITORY, EnumTreeChromosome.TERRITORY); AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( - "forestry.territoryDefault", get(EnumAllele.Territory.AVERAGE)); + "forestry.territoryDefault", + get(EnumAllele.Territory.AVERAGE)); } if (PluginManager.Module.APICULTURE.isEnabled() || PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) { @@ -50,8 +53,8 @@ public class GT_AlleleHelper extends AlleleHelper { EnumBeeChromosome.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()) { @@ -62,30 +65,33 @@ 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.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)); + "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.maturitySlower", get(EnumAllele.Maturation.SLOWER)); + "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.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)); + "forestry.maturityFastest", + get(EnumAllele.Maturation.FASTEST)); } if (PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) { @@ -126,7 +132,9 @@ public class GT_AlleleHelper extends AlleleHelper { try { helper.alleleMaps = (Map<Class<?>, Map<?, ? extends IAllele>>) FieldUtils.readField( - FieldUtils.getField(AlleleHelper.class, "alleleMaps", true), AlleleHelper.instance, true); + FieldUtils.getField(AlleleHelper.class, "alleleMaps", true), + AlleleHelper.instance, + true); } catch (IllegalAccessException e) { e.printStackTrace(); } @@ -149,11 +157,11 @@ public class GT_AlleleHelper extends AlleleHelper { } // 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 + // 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); - // } + // } alleles[chromosomeType.ordinal()] = allele; } @@ -182,6 +190,7 @@ public class GT_AlleleHelper extends AlleleHelper { IAllele allele = map.get(value); if (allele == null) { allele = new IAllele() { + @Override public String getUID() { return "NOT_FOUND"; @@ -216,8 +225,8 @@ 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); @@ -229,18 +238,22 @@ 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 357c7b9c36..7e78ef8fcd 100644 --- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java +++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java @@ -1,5 +1,13 @@ package gregtech.common.bees; +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 forestry.api.apiculture.*; import forestry.api.core.IClimateProvider; import forestry.api.genetics.IAllele; @@ -7,11 +15,6 @@ 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; public class GT_Bee_Mutation extends BeeMutation { @@ -29,12 +32,8 @@ 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; @@ -48,8 +47,7 @@ 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); @@ -58,16 +56,8 @@ 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); @@ -79,14 +69,12 @@ public class GT_Bee_Mutation extends BeeMutation { e.printStackTrace(); } - if (mutationConditions != null) - for (IMutationCondition mutationCondition : mutationConditions) { - mutationChance *= - mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate); - if (mutationChance == 0) { - return 0; - } + if (mutationConditions != null) for (IMutationCondition mutationCondition : mutationConditions) { + mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate); + if (mutationChance == 0) { + return 0; } + } return mutationChance; } } 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 3f717b4d79..7d04a7bde3 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -1,26 +1,22 @@ package gregtech.common.blocks; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.util.GT_LanguageManager; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; + 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] - TecTech - * 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] - + * TecTech Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech */ public GT_Block_Casings1() { super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE, 16); @@ -37,8 +33,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"); @@ -95,8 +91,7 @@ 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) + 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 7ee9472308..044806874b 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -1,10 +1,5 @@ package gregtech.common.blocks; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_LanguageManager; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; @@ -13,7 +8,14 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_LanguageManager; + 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... @@ -102,10 +104,9 @@ 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) + 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 677c457678..aef025d08f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java @@ -1,12 +1,14 @@ package gregtech.common.blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; public class GT_Block_Casings3 extends GT_Block_Casings_Abstract { + public GT_Block_Casings3() { super(GT_Item_Casings3.class, "gt.blockcasings3", GT_Material_Casings.INSTANCE, 16); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Yellow Stripes Block"); @@ -78,16 +80,13 @@ 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() + 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() + 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() + 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 62c7649dc2..087818d099 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -1,5 +1,10 @@ package gregtech.common.blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; @@ -9,58 +14,42 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_RenderingWorld; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { + /** * This mapping is used to look up which texture should be used to render the connected texture for fusion casings. * - * This mapping is computed from that giant if ladder from #getIcon in commit da3421547afadc49938b5b6a7f9a9679afa1d570 - * 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. + * This mapping is computed from that giant if ladder from #getIcon in commit + * da3421547afadc49938b5b6a7f9a9679afa1d570 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 - }, - }; + { 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"); @@ -109,8 +98,7 @@ 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() + return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 4: // Do not overwrite! @@ -140,20 +128,16 @@ 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() + return active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); case 11: - return active - ? Textures.BlockIcons.TURBINE_ACTIVE2[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() + return active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); default: - return active - ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); } } @@ -162,28 +146,20 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { 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() + 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() + 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() + 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() + return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); } } @@ -233,7 +209,10 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) != 0) { return getTurbineCasing( - tMeta, 4 + i * 3 - j * tInvertLeftRightMod, tState == 1, tState == 2); + tMeta, + 4 + i * 3 - j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } @@ -246,7 +225,10 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) != 0) { return getTurbineCasing( - tMeta, 4 + i * 3 + j * tInvertLeftRightMod, tState == 1, tState == 2); + 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 c02bc79206..364d6e0eed 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java @@ -2,6 +2,11 @@ package gregtech.common.blocks; import static gregtech.api.enums.HeatingCoilLevel.*; +import java.util.function.Consumer; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.HeatingCoilLevel; @@ -9,9 +14,6 @@ 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; public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHeatingCoil { 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 0b6b89198a..177b5bdbe7 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -1,15 +1,17 @@ package gregtech.common.blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; public class GT_Block_Casings6 extends GT_Block_Casings_Abstract { + public GT_Block_Casings6() { super(GT_Item_Casings6.class, "gt.blockcasings6", GT_Material_Casings.INSTANCE, 16); 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 03f7262219..bda180b45d 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -1,5 +1,10 @@ package gregtech.common.blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.ItemList; @@ -8,20 +13,16 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_RenderingWorld; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -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 public GT_Block_Casings8() { super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE, 15); /* - * DO NOT USE INDEX 15 ! - * USED HERE: https://github.com/GTNewHorizons/Electro-Magic-Tools/pull/17 + * DO NOT USE INDEX 15 ! USED HERE: https://github.com/GTNewHorizons/Electro-Magic-Tools/pull/17 */ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Chemically Inert Machine Casing"); @@ -30,20 +31,24 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { 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"); + getUnlocalizedName() + ".5.name", + "Europium Reinforced Radiation Proof Machine Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".7.name", "Advanced Iridium Plated Machine Casing"); + 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"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Radiant Naquadah Alloy Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".11.name", "Basic Photolithographic Framework Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".11.name", "Basic Photolithographic Framework Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".12.name", "Reinforced Photolithographic Framework Casing"); + getUnlocalizedName() + ".12.name", + "Reinforced Photolithographic Framework Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".13.name", "Radiation Proof Photolithographic Framework Casing"); + getUnlocalizedName() + ".13.name", + "Radiation Proof Photolithographic Framework Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Infinity Cooled Casing"); ItemList.Casing_Chemically_Inert.set(new ItemStack(this, 1, 0)); @@ -81,8 +86,8 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { 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 + 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: @@ -111,12 +116,10 @@ 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() + return active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); default: - return active - ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); } } @@ -124,16 +127,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { 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() + 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() + return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); } } @@ -182,7 +181,10 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) != 0) { return getTurbineCasing( - tMeta, 4 + i * 3 - j * tInvertLeftRightMod, tState == 1, tState == 2); + tMeta, + 4 + i * 3 - j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } @@ -195,7 +197,10 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) != 0) { return getTurbineCasing( - tMeta, 4 + i * 3 + j * tInvertLeftRightMod, tState == 1, tState == 2); + tMeta, + 4 + i * 3 + j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java index 423cc1da9a..55e0f508d5 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java @@ -1,20 +1,22 @@ package gregtech.common.blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; public class GT_Block_Casings9 extends GT_Block_Casings_Abstract { + public GT_Block_Casings9() { super(GT_Item_Casings9.class, "gt.blockcasings9", GT_Material_Casings.INSTANCE, 2); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "PBI Pipe Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Advanced Filter Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".1.tooltip", "Less than five 0.1μm particles per m^3"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".1.tooltip", "Less than five 0.1μm particles per m^3"); ItemList.Casing_Pipe_Polybenzimidazole.set(new ItemStack(this, 1, 0)); ItemList.Casing_Vent_T2.set(new ItemStack(this, 1, 1)); 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 452ed16d44..6cd2700250 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 @@ -1,13 +1,7 @@ package gregtech.common.blocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -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; @@ -22,8 +16,17 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.items.GT_Generic_Block; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_LanguageManager; + 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,8 +35,8 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block 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)); 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 7debd01173..0207ab975a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java @@ -1,17 +1,19 @@ package gregtech.common.blocks; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.IBlockOnWalkOver; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.IBlockOnWalkOver; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; + 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); @@ -70,8 +72,7 @@ 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() + 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); diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Granites.java b/src/main/java/gregtech/common/blocks/GT_Block_Granites.java index 5c98c18920..df50c5223f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Granites.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Granites.java @@ -1,9 +1,5 @@ package gregtech.common.blocks; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.entity.Entity; import net.minecraft.entity.boss.EntityWither; import net.minecraft.init.Blocks; @@ -12,7 +8,13 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; + public class GT_Block_Granites extends GT_Block_Stones_Abstract { + public GT_Block_Granites() { super(GT_Item_Granites.class, "gt.blockgranites"); setResistance(60.0F); 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 25db7f32dd..82e7ec61ac 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -5,32 +5,11 @@ import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; import static gregtech.api.enums.GT_Values.SIDE_UP; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; -import com.cricketcraft.chisel.api.IFacade; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IDebugableBlock; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IDebugableTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_Generic_Block; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.metatileentity.BaseTileEntity; -import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.util.GT_BaseCrop; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; -import gregtech.common.covers.CoverInfo; -import gregtech.common.render.GT_Renderer_Block; -import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest; 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; @@ -53,8 +32,33 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import com.cricketcraft.chisel.api.IFacade; + +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IDebugableBlock; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IDebugableTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_Generic_Block; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.api.metatileentity.BaseTileEntity; +import gregtech.api.metatileentity.CoverableTileEntity; +import gregtech.api.util.GT_BaseCrop; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; +import gregtech.common.covers.CoverInfo; +import gregtech.common.render.GT_Renderer_Block; +import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest; + @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<>(); private boolean renderAsNormalBlock; @@ -226,8 +230,8 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @SuppressWarnings("unchecked") // Old API uses raw List type @Override - public void addCollisionBoxesToList( - World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) { + 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) { @@ -334,35 +338,25 @@ 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) + 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; + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) + return false; } if ((tTileEntity instanceof IGregTechTileEntity)) { if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) { @@ -400,7 +394,10 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo 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); + aX, + aY, + aZ, + aWorld.provider.dimensionId); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); @@ -417,8 +414,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo if (!(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) + if ((tItem != null) && (tItem.stackSize > 0) && (tGregTechTileEntity.isValidSlot(i)) && tGregTechTileEntity.shouldDropItemAt(i)) { final EntityItem tItemEntity = new EntityItem( @@ -428,8 +424,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo 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); @@ -508,15 +503,18 @@ 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", - aX, aY, aZ, aWorld.provider.dimensionId); + aX, + aY, + aZ, + aWorld.provider.dimensionId); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } } else { @@ -595,15 +593,8 @@ 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) { + public float getExplosionResistance(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); 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 2bb703a2f9..b33a43e821 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java @@ -1,16 +1,18 @@ package gregtech.common.blocks; +import net.minecraft.block.material.Material; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + import cpw.mods.fml.common.Loader; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.IIconContainer; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.block.material.Material; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; public class GT_Block_Metal extends GT_Block_Storage { + public Materials[] mMats; public OrePrefixes mPrefix; public IIconContainer[] mBlockIcons; 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 3f0c829b50..942441b0ba 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java @@ -5,15 +5,8 @@ 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; -import gregtech.api.GregTech_API; -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; @@ -22,7 +15,17 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +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.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.render.TextureFactory; + public class GT_Block_Ores extends GT_Block_Ores_Abstract { + private static final String UNLOCALIZED_NAME = "gt.blockores"; public GT_Block_Ores() { @@ -35,18 +38,11 @@ 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 @@ -110,30 +106,15 @@ 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 - }; + 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 @@ -142,16 +123,10 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { 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 ae41933c1c..66acc22a22 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 @@ -1,23 +1,10 @@ package gregtech.common.blocks; -import cpw.mods.fml.common.Loader; -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.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.ITexture; -import gregtech.api.items.GT_Generic_Block; -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 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; @@ -37,7 +24,23 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.common.Loader; +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.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.items.GT_Generic_Block; +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 gregtech.common.render.GT_Renderer_Block; + public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements ITileEntityProvider { + private static final String DOT_NAME = ".name"; private static final String DOT_TOOLTIP = ".tooltip"; public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal<>(); @@ -45,8 +48,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); @@ -71,10 +74,9 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements GregTech_API.sGeneratedMaterials[i].getToolTip()); GT_LanguageManager.addStringLocalization( getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_NAME, - "Small " - + (GT_LanguageManager.i18nPlaceholder - ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) - : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); + "Small " + (GT_LanguageManager.i18nPlaceholder + ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) + : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); GT_LanguageManager.addStringLocalization( getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_TOOLTIP, GregTech_API.sGeneratedMaterials[i].getToolTip()); @@ -159,16 +161,8 @@ 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; } @@ -184,8 +178,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_); @@ -212,15 +206,8 @@ 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; } @@ -285,7 +272,13 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @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); + effectRenderer, + this, + worldObj, + target.blockX, + target.blockY, + target.blockZ, + target.sideHit); return true; } @@ -315,8 +308,8 @@ 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. @@ -330,8 +323,7 @@ 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<>() + return mTemporaryTileEntity.get() == null ? new ArrayList<>() : mTemporaryTileEntity.get().getDrops(getDroppedBlock(), aFortune); } @@ -342,7 +334,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements public abstract ITexture[] getTextureSet(); // Must have 16 entries. - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) { 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 73fe674fbe..4b730ef0ff 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 @@ -1,17 +1,19 @@ package gregtech.common.blocks; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.util.IIcon; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.util.IIcon; public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { + Block aUBBlock = GameRegistry.findBlock("UndergroundBiomes", "igneousStone"); public GT_Block_Ores_UB1() { @@ -26,16 +28,8 @@ 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 - }; + return new OrePrefixes[] { OrePrefixes.oreRedgranite, OrePrefixes.oreBlackgranite, OrePrefixes.ore, + OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreBasalt, OrePrefixes.ore, OrePrefixes.ore }; } @Override @@ -55,42 +49,22 @@ 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 - }; + 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) - }; + 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 0d7e2c3428..890aed5a2c 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 @@ -1,17 +1,19 @@ package gregtech.common.blocks; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.util.IIcon; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.util.IIcon; public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { + Block aUBBlock = GameRegistry.findBlock("UndergroundBiomes", "metamorphicStone"); public GT_Block_Ores_UB2() { @@ -25,18 +27,10 @@ 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 @@ -56,42 +50,22 @@ 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 - }; + 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) - }; + 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 5754f87454..873902a344 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 @@ -1,17 +1,19 @@ package gregtech.common.blocks; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.util.IIcon; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.util.IIcon; public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { + Block aUBBlock = GameRegistry.findBlock("UndergroundBiomes", "sedimentaryStone"); public GT_Block_Ores_UB3() { @@ -25,18 +27,10 @@ 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 @@ -56,42 +50,22 @@ 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 - }; + 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) - }; + 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 37887ac5f6..f446bc7518 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -2,16 +2,8 @@ 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; -import gregtech.api.enums.*; -import gregtech.api.items.GT_Generic_Block; -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; @@ -30,6 +22,16 @@ import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.*; +import gregtech.api.items.GT_Generic_Block; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.WorldSpawnedEventBuilder; + public class GT_Block_Reinforced extends GT_Generic_Block { public GT_Block_Reinforced(String aName) { @@ -53,11 +55,9 @@ 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)); @@ -65,24 +65,16 @@ 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)); + 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)}); + 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_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 @@ -176,8 +168,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; } @@ -251,8 +243,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 { @@ -265,13 +257,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block { 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(); + new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder().setPitch(1f).setVolume(1f) + .setIdentifier(SoundResource.GAME_TNT_PRIMED).setEntity(entitytntprimed).setWorld(world).run(); world.setBlockToAir(x, y, z); return false; } @@ -296,8 +283,12 @@ public class GT_Block_Reinforced extends GT_Generic_Block { @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 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); } @@ -305,16 +296,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } @Override - public boolean onBlockActivated( - World world, - int x, - int y, - int z, - EntityPlayer player, - int side, - float xOffset, - float yOffset, - float zOffset) { + 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) { 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 1ee8e6df50..2f9e9e9d71 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java @@ -1,15 +1,17 @@ package gregtech.common.blocks; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; + public class GT_Block_Stones extends GT_Block_Stones_Abstract { + public GT_Block_Stones() { super(GT_Item_Granites.class, "gt.blockstones"); setResistance(60.0F); @@ -31,9 +33,13 @@ public class GT_Block_Stones extends GT_Block_Stones_Abstract { 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)); + 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)); + 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 f40a6b8173..47e9fe250d 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 @@ -1,14 +1,7 @@ package gregtech.common.blocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.*; -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; @@ -22,7 +15,17 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.*; +import gregtech.api.interfaces.IOreRecipeRegistrator; +import gregtech.api.items.GT_Generic_Block; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + 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); OrePrefixes.crafting.add(this); @@ -59,27 +62,27 @@ public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRe GT_ModHandler.addCraftingRecipe( new ItemStack(this, 1, 6), GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] {"f", "X", 'X', new ItemStack(this, 1, 7)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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); @@ -87,34 +90,34 @@ public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRe GT_ModHandler.addCraftingRecipe( new ItemStack(this, 4, 3), GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] {"XX", "XX", 'X', new ItemStack(this, 4, 0)}); + 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)}); + 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)}); + 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)}); + 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}), + 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}), + GT_Utility.copyAmount(0L, new Object[] { aStack }), new ItemStack(this, 1, 14), 50, 16); 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 f318eab8ff..967d98c080 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java @@ -1,10 +1,7 @@ package gregtech.common.blocks; -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; @@ -18,6 +15,11 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_Generic_Block; + public class GT_Block_Storage extends GT_Generic_Block { protected GT_Block_Storage(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) { diff --git a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java index 66d9ffe6e8..b42bbfa076 100644 --- a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java +++ b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java @@ -1,12 +1,13 @@ package gregtech.common.blocks; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.util.GT_LanguageManager; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; + public class GT_Cyclotron_Coils extends GT_Block_Casings_Abstract { public GT_Cyclotron_Coils() { @@ -108,8 +109,7 @@ public class GT_Cyclotron_Coils 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) + 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_Cyclotron_Item_Casings.java b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Item_Casings.java index a522b2bd3f..f1ca45a805 100644 --- a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Item_Casings.java +++ b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Item_Casings.java @@ -3,6 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; public class GT_Cyclotron_Item_Casings extends GT_Item_Casings_Abstract { + public GT_Cyclotron_Item_Casings(Block block) { super(block); } 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 70748d5f1a..cd2f818b37 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java @@ -3,6 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; public class GT_Item_Casings1 extends GT_Item_Casings_Abstract { + public GT_Item_Casings1(Block block) { super(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 5e77ace15d..4f126426cb 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,13 @@ package gregtech.common.blocks; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; 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_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java index d80d88d2d1..fdcb5dbd86 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java @@ -3,6 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; public class GT_Item_Casings3 extends GT_Item_Casings_Abstract { + public GT_Item_Casings3(Block block) { super(block); } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java index 7848398a0b..5665150407 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java @@ -3,6 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; public class GT_Item_Casings4 extends GT_Item_Casings_Abstract { + public GT_Item_Casings4(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 7486d25ec5..b7fe3298ec 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java @@ -1,23 +1,26 @@ package gregtech.common.blocks; -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 cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.HeatingCoilLevel; +import gregtech.api.util.GT_LanguageManager; + 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_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java index f4a8d38ba6..f5250e73da 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java @@ -3,6 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; public class GT_Item_Casings6 extends GT_Item_Casings_Abstract { + public GT_Item_Casings6(Block block) { super(block); } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java index 0d87b5d906..3130006a50 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java @@ -3,6 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; public class GT_Item_Casings8 extends GT_Item_Casings_Abstract { + public GT_Item_Casings8(Block block) { super(block); } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java index c5aee22cff..f413ffdfb8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java @@ -3,6 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; public class GT_Item_Casings9 extends GT_Item_Casings_Abstract { + public GT_Item_Casings9(Block block) { super(block); } 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 bca2de6eb6..bd6b12c23a 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 @@ -1,38 +1,41 @@ 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 gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; + 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); 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 0ee92868e8..c659d153d9 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,17 @@ 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 gregtech.api.util.GT_LanguageManager; + 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_Granites.java b/src/main/java/gregtech/common/blocks/GT_Item_Granites.java index e0df50d07b..6e3eb8f12c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Granites.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Granites.java @@ -3,6 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; public class GT_Item_Granites extends GT_Item_Stones_Abstract { + public GT_Item_Granites(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 eda3c9b01b..5ce04103ab 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java @@ -1,18 +1,21 @@ 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 gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; + 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 7ca54ad115..87aa14342c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -2,23 +2,10 @@ package gregtech.common.blocks; import static gregtech.GT_Mod.GT_FML_LOGGER; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.interfaces.ISecondaryDescribable; -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.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_ItsNotMyFaultException; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -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; @@ -33,7 +20,24 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.ISecondaryDescribable; +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.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_ItsNotMyFaultException; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.storage.*; + public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { + public GT_Item_Machines(Block block) { super(block); setMaxDamage(0); @@ -61,82 +65,113 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); if (!GregTech_API.sPostloadFinished && tTileEntity.getMetaTileEntity() instanceof ISecondaryDescribable) { - final String[] tSecondaryDescription = - ((ISecondaryDescribable) tTileEntity.getMetaTileEntity()).getSecondaryDescription(); + 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" - : ""; + && ((ISecondaryDescribable) tMetaTileEntity).isDisplaySecondaryDescription()) ? "_Secondary" + : ""; addDescription( - aList, tTileEntity.getDescription(), tDamage, tSuffix, !GregTech_API.sPostloadFinished); + aList, + tTileEntity.getDescription(), + tDamage, + tSuffix, + !GregTech_API.sPostloadFinished); } if (tTileEntity.getEUCapacity() > 0L) { if (tTileEntity.getInputVoltage() > 0L) { final byte 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_Utility.getColoredTierNameFromTier(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_Utility.getColoredTierNameFromTier(inputTier) + + EnumChatFormatting.GREEN + + ")" + + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputVoltage() > 0L) { final byte 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_Utility.getColoredTierNameFromTier(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_Utility.getColoredTierNameFromTier(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 (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); } } } @@ -144,20 +179,27 @@ 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); @@ -167,12 +209,8 @@ 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]; @@ -183,12 +221,11 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final String[] tSplitStrings = tDescLine.split("%%%"); final StringBuilder tBuffer = new StringBuilder(); final String[] tRep = new String[tSplitStrings.length / 2]; - for (int j = 0; j < tSplitStrings.length; j++) - if (j % 2 == 0) tBuffer.append(tSplitStrings[j]); - else { - tBuffer.append(" %s"); - tRep[j / 2] = tSplitStrings[j]; - } + for (int j = 0; j < tSplitStrings.length; j++) if (j % 2 == 0) tBuffer.append(tSplitStrings[j]); + else { + tBuffer.append(" %s"); + tRep[j / 2] = tSplitStrings[j]; + } final String tTranslated = String.format( GT_LanguageManager.addStringLocalization(tKey, tBuffer.toString(), aWriteIntoLangFile), (Object[]) tRep); @@ -201,17 +238,8 @@ 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; } @@ -231,8 +259,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { public String getItemStackDisplayName(ItemStack aStack) { String aName = super.getItemStackDisplayName(aStack); final short aDamage = (short) getDamage(aStack); - if (aDamage >= 0 - && aDamage < GregTech_API.METATILEENTITIES.length + 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) { @@ -255,26 +282,15 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { 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) { @@ -336,9 +352,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { 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 tEffectDuration = 1200; if (tFluid != null) { 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 117e6ae1c6..e32558795c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java @@ -1,17 +1,21 @@ package gregtech.common.blocks; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; 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 net.minecraft.util.StatCollector; import net.minecraft.world.World; + import org.apache.commons.lang3.StringUtils; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; + public class GT_Item_Ores extends ItemBlock { + public GT_Item_Ores(Block block) { super(block); setMaxDamage(0); @@ -20,17 +24,8 @@ 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; } @@ -49,18 +44,8 @@ public class GT_Item_Ores extends ItemBlock { } @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( @@ -89,8 +74,8 @@ public class GT_Item_Ores extends ItemBlock { @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - String formula = StatCollector.translateToLocal( - field_150939_a.getUnlocalizedName() + '.' + getDamage(aStack) + ".tooltip"); + String formula = StatCollector + .translateToLocal(field_150939_a.getUnlocalizedName() + '.' + getDamage(aStack) + ".tooltip"); if (!StringUtils.isBlank(formula)) aList.add(formula); } } 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 b62c7c0232..db6356b173 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 @@ -1,16 +1,19 @@ 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 gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; + 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 55c19ae48c..fddf64163d 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,16 @@ 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 gregtech.api.GregTech_API; + public class GT_Item_Storage extends ItemBlock { + public GT_Item_Storage(Block block) { super(block); setMaxDamage(0); diff --git a/src/main/java/gregtech/common/blocks/GT_Material_Casings.java b/src/main/java/gregtech/common/blocks/GT_Material_Casings.java index 3b6cd37f9c..2fc839768f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Material_Casings.java +++ b/src/main/java/gregtech/common/blocks/GT_Material_Casings.java @@ -4,6 +4,7 @@ import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; public class GT_Material_Casings extends Material { + public static final Material INSTANCE = new GT_Material_Casings(); private GT_Material_Casings() { diff --git a/src/main/java/gregtech/common/blocks/GT_Material_Machines.java b/src/main/java/gregtech/common/blocks/GT_Material_Machines.java index d51e588522..df8b57226c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Material_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Material_Machines.java @@ -4,6 +4,7 @@ import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; public class GT_Material_Machines extends Material { + public GT_Material_Machines() { super(MapColor.ironColor); setRequiresTool(); diff --git a/src/main/java/gregtech/common/blocks/GT_Material_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Material_Reinforced.java index 38de5dbee7..2e3301bb60 100644 --- a/src/main/java/gregtech/common/blocks/GT_Material_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Material_Reinforced.java @@ -4,6 +4,7 @@ import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; public class GT_Material_Reinforced extends Material { + public GT_Material_Reinforced() { super(MapColor.stoneColor); setRequiresTool(); diff --git a/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java b/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java index 657ac9b934..d7ab28a19e 100644 --- a/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java @@ -1,13 +1,16 @@ package gregtech.common.blocks; -import com.google.common.io.ByteArrayDataInput; -import gregtech.api.net.GT_Packet_New; -import io.netty.buffer.ByteBuf; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import com.google.common.io.ByteArrayDataInput; + +import gregtech.api.net.GT_Packet_New; +import io.netty.buffer.ByteBuf; + public class GT_Packet_Ores extends GT_Packet_New { + private int mX; private int mZ; private short mY; 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 452e9db5d4..56a59e7ab3 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -2,6 +2,17 @@ package gregtech.common.blocks; import static gregtech.api.enums.TextureSet.SET_NONE; +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.Packet; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -13,30 +24,20 @@ 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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntity { + public short mMetaData = 0; public boolean mNatural = false; public boolean mBlocked = true; 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 + tByte = aMaterial == null ? 0 : (byte) Math.max( aBaseBlockHarvestLevel, Math.min( @@ -51,8 +52,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)); } @@ -177,35 +178,45 @@ 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)) { - this.mMetaData = ((short) (this.mMetaData + 2000)); - } 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)); - } else { - this.mMetaData = ((short) (this.mMetaData + 4000)); - } - } else { - this.mMetaData = ((short) (this.mMetaData + 3000)); - } - } 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)); - } else { - this.mMetaData = ((short) (this.mMetaData + 6000)); - } - } else { - this.mMetaData = ((short) (this.mMetaData + 5000)); - } - } + } 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)) { + if (aOverridingStoneBlock == GregTech_API.sBlockGranites) { + if (aOverridingStoneMeta < 8) { + this.mMetaData = ((short) (this.mMetaData + 3000)); + } else { + this.mMetaData = ((short) (this.mMetaData + 4000)); + } + } else { + this.mMetaData = ((short) (this.mMetaData + 3000)); + } + } 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)); + } else { + this.mMetaData = ((short) (this.mMetaData + 6000)); + } + } else { + this.mMetaData = ((short) (this.mMetaData + 5000)); + } + } this.worldObj.setBlockMetadataWithNotify( this.xCoord, this.yCoord, @@ -267,14 +278,20 @@ 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); + 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); + OrePrefixes.gemFlawless, + aMaterial, + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), + 1L); if (tStack != null) { for (int i = 0; i < 2; i++) { tSelector.add(tStack); @@ -287,7 +304,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } } tStack = GT_OreDictUnificator.get( - OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L); + OrePrefixes.gemFlawed, + aMaterial, + GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), + 1L); if (tStack != null) { for (int i = 0; i < 5; i++) { tSelector.add(tStack); @@ -318,21 +338,19 @@ 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++) { + 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]; - if (dustMat != null) - rList.add(GT_OreDictUnificator.get( - tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L)); + 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)); } } return rList; @@ -343,27 +361,16 @@ 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 + .addIcon( + aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex : OrePrefixes.oreSmall.mTextureIndex]) - .setRGBA(aMaterial.mRGBa) - .stdOrient() - .build(); + .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 - }; + ((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/CoverInfo.java b/src/main/java/gregtech/common/covers/CoverInfo.java index 58b1afe5ba..206a82ca2e 100644 --- a/src/main/java/gregtech/common/covers/CoverInfo.java +++ b/src/main/java/gregtech/common/covers/CoverInfo.java @@ -2,21 +2,25 @@ package gregtech.common.covers; import static gregtech.api.enums.GT_Values.SIDE_UNKNOWN; +import java.lang.ref.WeakReference; + +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.Fluid; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; + import gregtech.api.GregTech_API; import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.ISerializableObject; -import java.lang.ref.WeakReference; -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.Fluid; public final class CoverInfo { + private static final String NBT_SIDE = "s", NBT_ID = "id", NBT_DATA = "d"; public static final CoverInfo EMPTY_INFO = new CoverInfo(SIDE_UNKNOWN, null); @@ -44,8 +48,7 @@ public final class CoverInfo { coverSide = aNBT.getByte(NBT_SIDE); coverID = aNBT.getInteger(NBT_ID); coverBehavior = GregTech_API.getCoverBehaviorNew(coverID); - coverData = aNBT.hasKey(NBT_DATA) - ? coverBehavior.createDataObject(aNBT.getTag(NBT_DATA)) + coverData = aNBT.hasKey(NBT_DATA) ? coverBehavior.createDataObject(aNBT.getTag(NBT_DATA)) : coverBehavior.createDataObject(); coveredTile = new WeakReference<>(aTile); } @@ -158,8 +161,12 @@ public final class CoverInfo { } public ModularWindow createWindow(EntityPlayer player) { - final GT_CoverUIBuildContext buildContext = - new GT_CoverUIBuildContext(player, coverID, coverSide, coveredTile.get(), true); + final GT_CoverUIBuildContext buildContext = new GT_CoverUIBuildContext( + player, + coverID, + coverSide, + coveredTile.get(), + true); return getCoverBehavior().createWindow(buildContext); } 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 6a7711a242..845e74d1ab 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java @@ -1,10 +1,17 @@ package gregtech.common.covers; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -16,13 +23,9 @@ import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.tileentity.TileEntity; -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 @@ -49,14 +52,14 @@ 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; } @@ -102,23 +105,31 @@ public class GT_Cover_Arm extends GT_CoverBehavior { 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); + 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 (fromTile instanceof IInventory) - movedItems = GT_Utility.moveFromSlotToSide( - (IInventory) fromTile, - toTile, - fromSlot - 1, - toSide, - null, - false, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); + if (fromTile instanceof IInventory) 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) { @@ -129,22 +140,24 @@ public class GT_Cover_Arm extends GT_CoverBehavior { toSide = aSide; } movedItems = GT_Utility.moveOneItemStack( - fromTile, toTile, fromSide, toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + 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; @@ -157,15 +170,9 @@ 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); @@ -175,15 +182,8 @@ 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); @@ -192,13 +192,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)); - else - GT_Utility.sendChatToPlayer( - aPlayer, GT_Utility.trans("002", "Grabs in for own Slot #") + ((var & SLOT_ID_MASK) - 1)); + if ((var & EXPORT_MASK) != 0) 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)); } private int getNewVar(int var, int step) { @@ -305,7 +304,8 @@ public class GT_Cover_Arm extends GT_CoverBehavior { @Override protected void addUIWidgets(ModularWindow.Builder builder) { maxSlot = getMaxSlot(); - builder.widget(new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_Arm.this) + builder.widget( + new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_Arm.this) .addFollower( CoverDataFollower_ToggleButtonWidget.ofDisableable(), coverData -> getFlagExport(convert(coverData)) > 0, @@ -341,79 +341,73 @@ public class GT_Cover_Arm extends GT_CoverBehavior { coverData -> getTextFieldContent(getFlagInternalSlot(convert(coverData)) - 1), (coverData, state) -> { final int coverVariable = convert(coverData); - return new ISerializableObject.LegacyCoverData(getFlagExport(coverVariable) - | ((getIntFromText(state) + 1) & SLOT_ID_MASK) - | (getFlagAdjacentSlot(coverVariable) << 14) - | CONVERTED_BIT); + return new ISerializableObject.LegacyCoverData( + getFlagExport(coverVariable) + | ((getIntFromText(state) + 1) & SLOT_ID_MASK) + | (getFlagAdjacentSlot(coverVariable) << 14) + | CONVERTED_BIT); }, - widget -> widget.setOnScrollText() - .setValidator(val -> { - final int valSlot = getIntFromText(val); - if (valSlot > -1) { - return TextFieldWidget.format.format(Math.min(valSlot, maxSlot)); - } else { - return ANY_TEXT; - } - }) - .setPattern(BaseTextFieldWidget.NATURAL_NUMS) - .setFocusOnGuiOpen(true) - .setPos(spaceX * 0, spaceY * 1 + 2) - .setSize(spaceX * 2 + 5, 12)) + widget -> widget.setOnScrollText().setValidator(val -> { + final int valSlot = getIntFromText(val); + if (valSlot > -1) { + return TextFieldWidget.format.format(Math.min(valSlot, maxSlot)); + } else { + return ANY_TEXT; + } + }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setFocusOnGuiOpen(true) + .setPos(spaceX * 0, spaceY * 1 + 2).setSize(spaceX * 2 + 5, 12)) .addFollower( new CoverDataFollower_TextFieldWidget<>(), coverData -> getTextFieldContent(getFlagAdjacentSlot(convert(coverData)) - 1), (coverData, state) -> { final int coverVariable = convert(coverData); - return new ISerializableObject.LegacyCoverData(getFlagExport(coverVariable) - | getFlagInternalSlot(coverVariable) - | (((getIntFromText(state) + 1) & SLOT_ID_MASK) << 14) - | CONVERTED_BIT); + return new ISerializableObject.LegacyCoverData( + getFlagExport(coverVariable) | getFlagInternalSlot(coverVariable) + | (((getIntFromText(state) + 1) & SLOT_ID_MASK) << 14) + | CONVERTED_BIT); }, widget -> widget.setValidator(val -> { - final int valSlot = getIntFromText(val); - final int adjacentMaxSlot; - final ICoverable tile = - getUIBuildContext().getTile(); - if (tile instanceof TileEntity && !tile.isDead()) { - TileEntity adj = tile.getTileEntityAtSide( - getUIBuildContext().getCoverSide()); - if (adj instanceof IInventory) - adjacentMaxSlot = ((IInventory) adj).getSizeInventory() - 1; - else adjacentMaxSlot = -1; - } else { - adjacentMaxSlot = -1; - } - if (valSlot > -1) { - return TextFieldWidget.format.format( - Math.min(valSlot, adjacentMaxSlot)); - } else { - return ANY_TEXT; - } - }) - .setOnScroll((text, direction) -> { - final int val = getIntFromText(text); - int step = (GuiScreen.isShiftKeyDown() - ? 50 - : GuiScreen.isCtrlKeyDown() ? 5 : 1) - * direction; - return TextFieldWidget.format.format(val + step); - }) - .setPattern(BaseTextFieldWidget.NATURAL_NUMS) - .setPos(spaceX * 0, spaceY * 2 + 2) + final int valSlot = getIntFromText(val); + final int adjacentMaxSlot; + final ICoverable tile = getUIBuildContext().getTile(); + if (tile instanceof TileEntity && !tile.isDead()) { + TileEntity adj = tile + .getTileEntityAtSide(getUIBuildContext().getCoverSide()); + if (adj instanceof IInventory) + adjacentMaxSlot = ((IInventory) adj).getSizeInventory() - 1; + else adjacentMaxSlot = -1; + } else { + adjacentMaxSlot = -1; + } + if (valSlot > -1) { + return TextFieldWidget.format.format(Math.min(valSlot, adjacentMaxSlot)); + } else { + return ANY_TEXT; + } + }).setOnScroll((text, direction) -> { + final int val = getIntFromText(text); + int step = (GuiScreen.isShiftKeyDown() ? 50 : GuiScreen.isCtrlKeyDown() ? 5 : 1) + * direction; + return TextFieldWidget.format.format(val + step); + }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setPos(spaceX * 0, spaceY * 2 + 2) .setSize(spaceX * 2 + 5, 12)) .setPos(startX, startY)) - .widget(TextWidget.dynamicString(() -> (convert(getCoverData()) & EXPORT_MASK) > 0 - ? GT_Utility.trans("006", "Export") - : GT_Utility.trans("007", "Import")) - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 4 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("254.1", "Internal slot#")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 4 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("255", "Adjacent slot#")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 4 + startY + spaceY * 2)); + .widget( + TextWidget + .dynamicString( + () -> (convert(getCoverData()) & EXPORT_MASK) > 0 + ? GT_Utility.trans("006", "Export") + : GT_Utility.trans("007", "Import")) + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("254.1", "Internal slot#")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 4 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("255", "Adjacent slot#")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 4 + startY + spaceY * 2)); } private int getMaxSlot() { 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 f45ffbf2e8..f3176896f8 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java @@ -2,8 +2,13 @@ package gregtech.common.covers; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -15,9 +20,6 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControlsWorkCover { @@ -34,8 +36,8 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls } @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; @@ -71,18 +73,15 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls } @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 aCoverVariable.get() != 2; // always off, so no redstone needed either } /** - * Make sure there is only one GT_Cover_ControlsWork on the aTileEntity - * TODO this is a migration thing. Remove this after 2.3.0 is released. + * Make sure there is only one GT_Cover_ControlsWork on the aTileEntity TODO this is a migration thing. Remove this + * after 2.3.0 is released. + * * @return true if the cover is the first (side) one **/ private boolean makeSureOnlyOne(byte aSide, ICoverable aTileEntity) { @@ -120,8 +119,8 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls } @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); @@ -130,15 +129,8 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls } @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)) % 5; if (aCoverVariable < 0) { aCoverVariable = 2; @@ -209,50 +201,58 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_ControlsWork.this, + (id, coverData) -> !getClickable(id, convert(coverData)), + (id, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(id, convert(coverData)))).addToggleButton( + 0, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON) + .setPos(spaceX * 0, spaceY * 0)) + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF) + .setPos(spaceX * 0, spaceY * 1)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CROSS) + .setPos(spaceX * 0, spaceY * 2)) + .setPos(startX, startY)) + .widget( + new CoverDataControllerWidget<>( this::getCoverData, this::setCoverData, - GT_Cover_ControlsWork.this, - (id, coverData) -> !getClickable(id, convert(coverData)), - (id, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(id, convert(coverData)))) - .addToggleButton( - 0, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON) - .setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF) - .setPos(spaceX * 0, spaceY * 1)) - .addToggleButton( - 2, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CROSS) - .setPos(spaceX * 0, spaceY * 2)) - .setPos(startX, startY)) - .widget(new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_ControlsWork.this) - .addFollower( - CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), - coverData -> convert(coverData) > 2, - (coverData, state) -> new ISerializableObject.LegacyCoverData( - adjustCoverVariable(state, convert(coverData))), - widget -> widget.setPos(spaceX * 0, spaceY * 3)) - .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("243", "Enable with Redstone")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("244", "Disable with Redstone")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("245", "Disable machine")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2)) - .widget(new TextWidget(GT_Utility.trans("507", "Safe Mode")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3)); + GT_Cover_ControlsWork.this) + .addFollower( + CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), + coverData -> convert(coverData) > 2, + (coverData, state) -> new ISerializableObject.LegacyCoverData( + adjustCoverVariable(state, convert(coverData))), + widget -> widget.setPos(spaceX * 0, spaceY * 3)) + .setPos(startX, startY)) + .widget( + new TextWidget(GT_Utility.trans("243", "Enable with Redstone")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("244", "Disable with Redstone")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("245", "Disable machine")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2)) + .widget( + new TextWidget(GT_Utility.trans("507", "Safe Mode")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3)); } private int getNewCoverVariable(int id, int coverVariable) { 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 54e9e50d8b..a2a0fcb8cf 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java @@ -2,8 +2,13 @@ package gregtech.common.covers; import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -14,11 +19,9 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_Conveyor extends GT_CoverBehavior { + public final int mTickRate; private final int mMaxStacks; @@ -45,14 +48,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; @@ -81,15 +84,8 @@ public class GT_Cover_Conveyor 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)) % 12; if (aCoverVariable < 0) { aCoverVariable = 11; @@ -216,65 +212,80 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_Conveyor.this, - (id, coverData) -> !getClickable(id, convert(coverData)), - (id, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(id, convert(coverData)))) - .addToggleButton( - 0, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT) - .addTooltip(GT_Utility.trans("006", "Export")) - .setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT) - .addTooltip(GT_Utility.trans("007", "Import")) - .setPos(spaceX * 1, spaceY * 0)) - .addToggleButton( - 2, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) - .addTooltip(GT_Utility.trans("224", "Always On")) - .setPos(spaceX * 0, spaceY * 1)) - .addToggleButton( - 3, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON) - .addTooltip(GT_Utility.trans("225", "Active with Redstone Signal")) - .setPos(spaceX * 1, spaceY * 1)) - .addToggleButton( - 4, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF) - .addTooltip(GT_Utility.trans("226", "Inactive with Redstone Signal")) - .setPos(spaceX * 2, spaceY * 1)) - .addToggleButton( - 5, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT) - .addTooltip(GT_Utility.trans("227", "Allow Input")) - .setPos(spaceX * 0, spaceY * 2)) - .addToggleButton( - 6, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT) - .addTooltip(GT_Utility.trans("228", "Block Input")) - .setPos(spaceX * 1, spaceY * 2)) - .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("229", "Import/Export")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 3 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("230", "Conditional")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 3 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("231", "Enable Input")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 3 + startY + spaceY * 2)); + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_Conveyor.this, + (id, coverData) -> !getClickable(id, convert(coverData)), + (id, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(id, convert(coverData)))).addToggleButton( + 0, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT) + .addTooltip(GT_Utility.trans("006", "Export")) + .setPos(spaceX * 0, spaceY * 0)) + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT) + .addTooltip(GT_Utility.trans("007", "Import")) + .setPos(spaceX * 1, spaceY * 0)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) + .addTooltip(GT_Utility.trans("224", "Always On")) + .setPos(spaceX * 0, spaceY * 1)) + .addToggleButton( + 3, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON) + .addTooltip( + GT_Utility.trans( + "225", + "Active with Redstone Signal")) + .setPos(spaceX * 1, spaceY * 1)) + .addToggleButton( + 4, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF) + .addTooltip( + GT_Utility.trans( + "226", + "Inactive with Redstone Signal")) + .setPos(spaceX * 2, spaceY * 1)) + .addToggleButton( + 5, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT) + .addTooltip(GT_Utility.trans("227", "Allow Input")) + .setPos(spaceX * 0, spaceY * 2)) + .addToggleButton( + 6, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT) + .addTooltip(GT_Utility.trans("228", "Block Input")) + .setPos(spaceX * 1, spaceY * 2)) + .setPos(startX, startY)) + .widget( + new TextWidget(GT_Utility.trans("229", "Import/Export")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 3 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("230", "Conditional")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 3 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("231", "Enable Input")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 3 + startY + spaceY * 2)); } private int getNewCoverVariable(int id, int coverVariable) { 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 95d5236f60..bcbf07798b 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java @@ -1,13 +1,14 @@ package gregtech.common.covers; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.util.GT_CoverBehavior; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.ContainerWorkbench; import net.minecraft.network.play.server.S2DPacketOpenWindow; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; + public class GT_Cover_Crafting extends GT_CoverBehavior { /** @@ -23,38 +24,30 @@ 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 d755a115c4..ff6741067c 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java @@ -1,7 +1,11 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -12,8 +16,6 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_DoesWork extends GT_CoverBehavior { @@ -30,32 +32,30 @@ 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) + 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); @@ -64,15 +64,8 @@ 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) { + 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; @@ -125,8 +118,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; } @@ -166,40 +159,45 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_DoesWork.this, - (id, coverData) -> isEnabled(id, convert(coverData)), - (id, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(id, convert(coverData)))) - .addToggleButton( - 0, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_PROGRESS) - .setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) - .setPos(spaceX * 1, spaceY * 0)) - .addToggleButton( - 2, - CoverDataFollower_ToggleButtonWidget.ofRedstone(), - widget -> widget.setPos(spaceX * 0, spaceY * 1)) - .setPos(startX, startY)) - .widget(TextWidget.dynamicString(() -> ((convert(getCoverData()) & 0x2) > 0) - ? GT_Utility.trans("242", "Machine idle") - : GT_Utility.trans("241", "Recipe progress")) - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 4 + startY + spaceY * 0)) - .widget(TextWidget.dynamicString(() -> ((convert(getCoverData()) & 0x1) > 0) - ? GT_Utility.trans("INVERTED", "Inverted") - : GT_Utility.trans("NORMAL", "Normal")) - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 4 + startY + spaceY * 1)); + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_DoesWork.this, + (id, coverData) -> isEnabled(id, convert(coverData)), + (id, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(id, convert(coverData)))).addToggleButton( + 0, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_PROGRESS) + .setPos(spaceX * 0, spaceY * 0)) + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) + .setPos(spaceX * 1, spaceY * 0)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofRedstone(), + widget -> widget.setPos(spaceX * 0, spaceY * 1)) + .setPos(startX, startY)) + .widget( + TextWidget + .dynamicString( + () -> ((convert(getCoverData()) & 0x2) > 0) + ? GT_Utility.trans("242", "Machine idle") + : GT_Utility.trans("241", "Recipe progress")) + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 4 + startY + spaceY * 0)) + .widget( + TextWidget + .dynamicString( + () -> ((convert(getCoverData()) & 0x1) > 0) + ? GT_Utility.trans("INVERTED", "Inverted") + : GT_Utility.trans("NORMAL", "Normal")) + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 4 + startY + spaceY * 1)); } private int getNewCoverVariable(int id, int 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 cb93df0bd2..a103234fea 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java @@ -1,11 +1,5 @@ package gregtech.common.covers; -import gregtech.api.enums.Materials; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IMachineProgress; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -15,6 +9,13 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidHandler; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; + public class GT_Cover_Drain extends GT_CoverBehavior { /** @@ -30,14 +31,14 @@ 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; @@ -46,22 +47,16 @@ 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 + 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; @@ -71,64 +66,49 @@ public class GT_Cover_Drain extends GT_CoverBehavior { tLiquid = Materials.Water.getFluid(1000L); } 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); - } - if ((tLiquid != null) - && (tLiquid.getFluid() != null) - && ((aSide > 1) - || ((aSide == 0) && (tLiquid.getFluid().getDensity() <= 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); + } + 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) + 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); + 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) { + 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; 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 fbac598d19..53ce2bcbb3 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java @@ -1,9 +1,21 @@ package gregtech.common.covers; +import java.util.function.Function; + +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; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.Fluid; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -19,14 +31,6 @@ import gregtech.common.gui.modularui.widget.CoverDataFollower_CycleButtonWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import java.util.function.Function; -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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMeterData> { @@ -53,13 +57,8 @@ 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); @@ -93,15 +92,8 @@ 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) { + 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) { @@ -137,11 +129,13 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe break; case 10: GT_Utility.sendChatToPlayer( - aPlayer, GT_Utility.trans("041", "Normal Electricity Storage(Including Batteries)")); + 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)")); + aPlayer, + GT_Utility.trans("042", "Inverted Electricity Storage(Including Batteries)")); break; } aCoverVariable.setNum(num); @@ -150,8 +144,8 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe // 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; } @@ -166,32 +160,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; } @@ -234,8 +228,8 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe final String INVERTED = GT_Utility.trans("INVERTED", "Inverted"); final String NORMAL = GT_Utility.trans("NORMAL", "Normal"); - builder.widget(new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_EUMeter.this) + builder.widget( + new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_EUMeter.this) .addFollower( new CoverDataFollower_CycleButtonWidget<>(), coverData -> coverData.type.ordinal(), @@ -244,8 +238,7 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe return coverData; }, widget -> widget.setLength(EnergyType.values().length) - .addTooltip(state -> EnergyType.getEnergyType(state) - .getTooltip()) + .addTooltip(state -> EnergyType.getEnergyType(state).getTooltip()) .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CYCLIC) .setPos(spaceX * 0, spaceY * 0)) .addFollower( @@ -255,8 +248,7 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe coverData.inverted = state; return coverData; }, - widget -> widget.addTooltip(0, NORMAL) - .addTooltip(1, INVERTED) + widget -> widget.addTooltip(0, NORMAL).addTooltip(1, INVERTED) .setPos(spaceX * 0, spaceY * 1)) .addFollower( new CoverDataFollower_TextFieldWidget<>(), @@ -266,30 +258,29 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe return coverData; }, widget -> widget.setOnScrollNumbersLong(1000, 100, 100000) - .setNumbersLong(() -> 0L, () -> Long.MAX_VALUE) - .setFocusOnGuiOpen(true) - .setPos(spaceX * 0, spaceY * 2 + 2) - .setSize(spaceX * 8, 12)) + .setNumbersLong(() -> 0L, () -> Long.MAX_VALUE).setFocusOnGuiOpen(true) + .setPos(spaceX * 0, spaceY * 2 + 2).setSize(spaceX * 8, 12)) .setPos(startX, startY)) - .widget(TextWidget.dynamicString(() -> - getCoverData() != null ? getCoverData().type.getTitle() : "") - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX, 4 + startY)) - .widget(TextWidget.dynamicString( + .widget( + TextWidget.dynamicString(() -> getCoverData() != null ? getCoverData().type.getTitle() : "") + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()).setPos( + startX + spaceX, + 4 + startY)) + .widget( + TextWidget.dynamicString( () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "") - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX, 4 + startY + spaceY)) - .widget(new TextWidget(GT_Utility.trans("222.1", "Energy threshold")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX, startY + spaceY * 3 + 4)); + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX, 4 + startY + spaceY)) + .widget( + new TextWidget(GT_Utility.trans("222.1", "Energy threshold")) + .setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(startX, startY + spaceY * 3 + 4)); } } // endregion public static class EUMeterData implements ISerializableObject { + private EnergyType type; private boolean inverted; /** @@ -368,35 +359,20 @@ 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), - ELECTRICITY_STORAGE( - 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), - AVERAGE_ELECTRIC_INPUT( - 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, + + UNIVERSAL_STORAGE(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), + STEAM_STORAGE(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()), + AVERAGE_ELECTRIC_OUTPUT(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) -> { + 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) { @@ -405,8 +381,7 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe } } return te.getStoredEU(); - }, - (te) -> { + }, (te) -> { if (te instanceof IGregTechTileEntity) { IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer) { @@ -422,10 +397,7 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe private final Function<ICoverable, Long> getTileEntityStoredEnergyFunc; private final Function<ICoverable, Long> getTileEntityEnergyCapacityFunc; - EnergyType( - String title, - String tooltip, - Function<ICoverable, Long> getTileEntityStoredEnergyFunc, + EnergyType(String title, String tooltip, Function<ICoverable, Long> getTileEntityStoredEnergyFunc, Function<ICoverable, Long> getTileEntityEnergyCapacityFunc) { this.title = title; this.tooltip = tooltip; 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 5b9c66f637..da6c2c9cfa 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeAE.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeAE.java @@ -1,11 +1,13 @@ package gregtech.common.covers; -import appeng.facade.IFacadeItem; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import appeng.facade.IFacadeItem; + public class GT_Cover_FacadeAE extends GT_Cover_FacadeBase { + @Override protected Block getTargetBlock(ItemStack aFacadeStack) { if (aFacadeStack == null) return null; 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 7c55a9dce8..0ac4a25fa1 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java @@ -2,10 +2,22 @@ package gregtech.common.covers; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import javax.annotation.Nonnull; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import cpw.mods.fml.common.network.ByteBufUtils; import gregtech.api.enums.Textures; import gregtech.api.gui.modularui.GT_CoverUIBuildContext; @@ -19,17 +31,9 @@ import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import javax.annotation.Nonnull; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; 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,15 +57,8 @@ 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, @@ -73,14 +70,14 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ } @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; } @@ -95,42 +92,42 @@ 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)); - - if (aTileEntity.isClientSide()) - GT_RenderingWorld.getInstance() - .register( - aTileEntity.getXCoord(), - aTileEntity.getYCoord(), - aTileEntity.getZCoord(), - getTargetBlock(aCover), - getTargetMeta(aCover)); + 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)); } @Override @@ -139,24 +136,21 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ } @Override - protected ITexture getSpecialCoverFGTextureImpl( - byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { + protected ITexture getSpecialCoverFGTextureImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, + ICoverable aTileEntity) { return getSpecialCoverTextureImpl(aSide, aCoverID, aCoverVariable, aTileEntity); } @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(); + return TextureFactory.builder().setFromBlock(block, getTargetMeta(aCoverVariable.mStack)).useWorldCoord() + .setFromSide(ForgeDirection.getOrientation(aSide)).build(); } @Override @@ -176,21 +170,19 @@ 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)); + if (aTileEntity.isClientSide()) GT_RenderingWorld.getInstance().register( + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord(), + getTargetBlock(aCoverVariable.mStack), + getTargetMeta(aCoverVariable.mStack)); } @Override @@ -203,26 +195,18 @@ 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); @@ -253,6 +237,7 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ } public static class FacadeData implements ISerializableObject { + ItemStack mStack; int mFlags; @@ -331,54 +316,52 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_FacadeBase.this, - this::isEnabled, - (id, coverData) -> { - coverData.mFlags = getNewCoverVariable(id, coverData); - return coverData; - }) - .addToggleButton( + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_FacadeBase.this, + this::isEnabled, + (id, coverData) -> { + coverData.mFlags = getNewCoverVariable(id, coverData); + return coverData; + }).addToggleButton( 0, CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), widget -> widget.setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, - CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), - widget -> widget.setPos(spaceX * 0, spaceY * 1)) - .addToggleButton( - 2, - CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), - widget -> widget.setPos(spaceX * 0, spaceY * 2)) - .addToggleButton( - 3, - CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), - widget -> widget.setPos(spaceX * 0, spaceY * 3)) - .setPos(startX, startY)) - .widget(new ItemDrawable(() -> getCoverData() != null ? getCoverData().mStack : null) - .asWidget() - .setPos(5, 5) - .setSize(16, 16)) - .widget(TextWidget.dynamicString(() -> getCoverData() != null - ? getCoverData().mStack.getDisplayName() - : "") - .setSynced(false) - .setDefaultColor(COLOR_TITLE.get()) - .setPos(25, 9)) - .widget(new TextWidget(GT_Utility.trans("128", "Redstone")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("129", "Energy")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("130", "Fluids")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2)) - .widget(new TextWidget(GT_Utility.trans("131", "Items")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3)); + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), + widget -> widget.setPos(spaceX * 0, spaceY * 1)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), + widget -> widget.setPos(spaceX * 0, spaceY * 2)) + .addToggleButton( + 3, + CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(), + widget -> widget.setPos(spaceX * 0, spaceY * 3)) + .setPos(startX, startY)) + .widget( + new ItemDrawable(() -> getCoverData() != null ? getCoverData().mStack : null).asWidget() + .setPos(5, 5).setSize(16, 16)) + .widget( + TextWidget + .dynamicString( + () -> getCoverData() != null ? getCoverData().mStack.getDisplayName() : "") + .setSynced(false).setDefaultColor(COLOR_TITLE.get()).setPos(25, 9)) + .widget( + new TextWidget(GT_Utility.trans("128", "Redstone")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("129", "Energy")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("130", "Fluids")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2)) + .widget( + new TextWidget(GT_Utility.trans("131", "Items")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3)); } @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 b8200aeac6..53eb3406d4 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java @@ -1,9 +1,22 @@ package gregtech.common.covers; +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; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -13,16 +26,6 @@ import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; 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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; /*** * @author TrainerSnow#5086 @@ -42,15 +45,8 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi } @Override - protected FluidLimiterData onCoverScrewdriverClickImpl( - byte aSide, - int aCoverID, - FluidLimiterData aCoverVariable, - ICoverable aTileEntity, - EntityPlayer aPlayer, - float aX, - float aY, - float aZ) { + 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)); @@ -59,19 +55,19 @@ 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; } /* - Helpers + * Helpers */ private boolean allowsFluidIn(FluidLimiterData aCoverVariable, ICoverable c) { @@ -114,7 +110,7 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi } /* - Data + * Data */ @Override @@ -128,6 +124,7 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi } public static class FluidLimiterData implements ISerializableObject { + private float threshold; public FluidLimiterData(float threshold) { @@ -199,8 +196,8 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_FluidLimiter.this) + builder.widget( + new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_FluidLimiter.this) .addFollower( new CoverDataFollower_TextFieldWidget<>(), coverData -> String.valueOf(Math.round(coverData.threshold * 100)), @@ -208,13 +205,11 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi coverData.threshold = (float) (MathExpression.parseMathExpression(val) / 100); return coverData; }, - widget -> widget.setNumbers(0, 100) - .setFocusOnGuiOpen(true) - .setPos(startX, startY + spaceY * 2 - 24) - .setSize(spaceX * 4 - 3, 12))) - .widget(new TextWidget("Percent threshold") - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX, startY + spaceY * 2 - 35)); + widget -> widget.setNumbers(0, 100).setFocusOnGuiOpen(true) + .setPos(startX, startY + spaceY * 2 - 24).setSize(spaceX * 4 - 3, 12))) + .widget( + new TextWidget("Percent threshold").setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX, startY + spaceY * 2 - 35)); } } } 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 ad8f5bb2de..df0b16c297 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java @@ -1,11 +1,26 @@ package gregtech.common.covers; +import java.util.concurrent.atomic.AtomicBoolean; + +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; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.drawable.Text; import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -18,33 +33,25 @@ import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import java.util.concurrent.atomic.AtomicBoolean; -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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; /** * Cover variable + * * <pre> * 1111 1111 1111 1111 1111 1111 1111 1111 * |- interval-| |- flow rate 2 compl. -| * ^ export? * </pre> - * Concat export and flow rate 2 compl. together to get actual flow rate. - * A positive actual flow rate is export, and vice versa. + * + * Concat export and flow rate 2 compl. together to get actual flow rate. A positive actual flow rate is export, and + * vice versa. * <p> - * Interval is an unsigned 11 bit integer minus 1, so the range is 1~2048. - * The stored bits will be flipped bitwise if speed is negative. - * This way, `0` means 1tick interval, while `-1` means 1 tick interval as well, preserving the legacy behavior. + * Interval is an unsigned 11 bit integer minus 1, so the range is 1~2048. The stored bits will be flipped bitwise if + * speed is negative. 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; @@ -86,19 +93,14 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid } @Override - protected boolean isRedstoneSensitiveImpl( - byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity, long aTimer) { + 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) { + 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; } @@ -145,8 +147,7 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid if (tTickRate == 1) { GT_Utility.sendChatToPlayer( aPlayer, - GT_Utility.trans("048", "Pump speed: ") - + tSpeed + GT_Utility.trans("048", "Pump speed: ") + tSpeed + GT_Utility.trans("049", "L/tick ") + tSpeed * 20 + GT_Utility.trans("050", "L/sec")); @@ -162,15 +163,8 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid } @Override - public FluidRegulatorData onCoverScrewdriverClickImpl( - byte aSide, - int aCoverID, - FluidRegulatorData aCoverVariable, - ICoverable aTileEntity, - EntityPlayer aPlayer, - float aX, - float aY, - float aZ) { + 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 { @@ -180,15 +174,8 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid } @Override - protected boolean onCoverRightClickImpl( - byte aSide, - int aCoverID, - FluidRegulatorData aCoverVariable, - ICoverable aTileEntity, - EntityPlayer aPlayer, - float aX, - float aY, - float aZ) { + 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 { @@ -198,56 +185,56 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid } @Override - public boolean letsRedstoneGoInImpl( - byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { + 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) { + 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) { + 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) { + 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) { + 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) { + 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) { + 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) { + 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) { + protected boolean alwaysLookConnectedImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, + ICoverable aTileEntity) { return true; } @@ -289,69 +276,72 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid protected void addUIWidgets(ModularWindow.Builder builder) { AtomicBoolean warn = new AtomicBoolean(false); - builder.widget(new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_FluidRegulator.this) - .addFollower( - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - coverData -> coverData.speed >= 0, - (coverData, state) -> { - coverData.speed = Math.abs(coverData.speed); - return coverData; - }, - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT) - .addTooltip(GT_Utility.trans("006", "Export")) - .setPos(spaceX * 0, spaceY * 0)) - .addFollower( - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - coverData -> coverData.speed <= 0, - (coverData, state) -> { - coverData.speed = -Math.abs(coverData.speed); - return coverData; - }, - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT) - .addTooltip(GT_Utility.trans("007", "Import")) - .setPos(spaceX * 1, spaceY * 0)) - .addFollower( - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - coverData -> coverData.condition == Conditional.Always, - (coverData, state) -> { - coverData.condition = Conditional.Always; - return coverData; - }, - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) - .addTooltip(GT_Utility.trans("224", "Always On")) - .setPos(spaceX * 0, spaceY * 1)) - .addFollower( - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - coverData -> coverData.condition == Conditional.Conditional, - (coverData, state) -> { - coverData.condition = Conditional.Conditional; - return coverData; - }, - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON) - .addTooltip(GT_Utility.trans("225", "Active with Redstone Signal")) - .setPos(spaceX * 1, spaceY * 1)) - .addFollower( - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - coverData -> coverData.condition == Conditional.Inverted, - (coverData, state) -> { - coverData.condition = Conditional.Inverted; - return coverData; - }, - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF) - .addTooltip(GT_Utility.trans("226", "Inactive with Redstone Signal")) - .setPos(spaceX * 2, spaceY * 1)) - .addFollower( - new CoverDataFollower_TextFieldWidget<>(), - coverData -> String.valueOf(coverData.speed), - (coverData, state) -> { - coverData.speed = (int) MathExpression.parseMathExpression(state); - return coverData; - }, - widget -> widget.setOnScrollNumbersLong(1, 5, 50) - .setNumbersLong(val -> { - final int tickRate = - getCoverData() != null ? getCoverData().tickRate : 0; + builder.widget( + new CoverDataControllerWidget<>( + this::getCoverData, + this::setCoverData, + GT_Cover_FluidRegulator.this) + .addFollower( + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + coverData -> coverData.speed >= 0, + (coverData, state) -> { + coverData.speed = Math.abs(coverData.speed); + return coverData; + }, + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT) + .addTooltip(GT_Utility.trans("006", "Export")) + .setPos(spaceX * 0, spaceY * 0)) + .addFollower( + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + coverData -> coverData.speed <= 0, + (coverData, state) -> { + coverData.speed = -Math.abs(coverData.speed); + return coverData; + }, + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT) + .addTooltip(GT_Utility.trans("007", "Import")) + .setPos(spaceX * 1, spaceY * 0)) + .addFollower( + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + coverData -> coverData.condition == Conditional.Always, + (coverData, state) -> { + coverData.condition = Conditional.Always; + return coverData; + }, + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) + .addTooltip(GT_Utility.trans("224", "Always On")) + .setPos(spaceX * 0, spaceY * 1)) + .addFollower( + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + coverData -> coverData.condition == Conditional.Conditional, + (coverData, state) -> { + coverData.condition = Conditional.Conditional; + return coverData; + }, + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON) + .addTooltip(GT_Utility.trans("225", "Active with Redstone Signal")) + .setPos(spaceX * 1, spaceY * 1)) + .addFollower( + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + coverData -> coverData.condition == Conditional.Inverted, + (coverData, state) -> { + coverData.condition = Conditional.Inverted; + return coverData; + }, + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF) + .addTooltip( + GT_Utility.trans("226", "Inactive with Redstone Signal")) + .setPos(spaceX * 2, spaceY * 1)) + .addFollower( + new CoverDataFollower_TextFieldWidget<>(), + coverData -> String.valueOf(coverData.speed), + (coverData, state) -> { + coverData.speed = (int) MathExpression.parseMathExpression(state); + return coverData; + }, + widget -> widget.setOnScrollNumbersLong(1, 5, 50).setNumbersLong(val -> { + final int tickRate = getCoverData() != null ? getCoverData().tickRate + : 0; final long maxFlow = (long) mTransferRate * GT_Utility.clamp(tickRate, TICK_RATE_MIN, TICK_RATE_MAX); warn.set(false); @@ -363,20 +353,16 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid warn.set(true); } return val; - }) - .setPattern(BaseTextFieldWidget.WHOLE_NUMS) - .setFocusOnGuiOpen(true) - .setPos(spaceX * 0, spaceY * 2 + 2) - .setSize(spaceX * 4 - 3, 12)) - .addFollower( - new CoverDataFollower_TextFieldWidget<>(), - coverData -> String.valueOf(coverData.tickRate), - (coverData, state) -> { - coverData.tickRate = (int) MathExpression.parseMathExpression(state); - return coverData; - }, - widget -> widget.setOnScrollNumbersLong(1, 5, 50) - .setNumbersLong(val -> { + }).setPattern(BaseTextFieldWidget.WHOLE_NUMS).setFocusOnGuiOpen(true) + .setPos(spaceX * 0, spaceY * 2 + 2).setSize(spaceX * 4 - 3, 12)) + .addFollower( + new CoverDataFollower_TextFieldWidget<>(), + coverData -> String.valueOf(coverData.tickRate), + (coverData, state) -> { + coverData.tickRate = (int) MathExpression.parseMathExpression(state); + return coverData; + }, + widget -> widget.setOnScrollNumbersLong(1, 5, 50).setNumbersLong(val -> { final int speed = getCoverData() != null ? getCoverData().speed : 0; warn.set(false); if (val > TICK_RATE_MAX) { @@ -391,52 +377,54 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid val = 1L; } return val; - }) - .setPattern(BaseTextFieldWidget.WHOLE_NUMS) - .setPos(spaceX * 5, spaceY * 2 + 2) - .setSize(spaceX * 2 - 3, 12)) - .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("229", "Import/Export")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 4, 4 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("230", "Conditional")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 4, 4 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("208", " L")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 4, 4 + startY + spaceY * 2)) - .widget(new TextWidget(GT_Utility.trans("209", " ticks")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 7, 4 + startY + spaceY * 2)) + }).setPattern(BaseTextFieldWidget.WHOLE_NUMS) + .setPos(spaceX * 5, spaceY * 2 + 2).setSize(spaceX * 2 - 3, 12)) + .setPos(startX, startY)) + .widget( + new TextWidget(GT_Utility.trans("229", "Import/Export")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 4, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("230", "Conditional")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 4, 4 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("208", " L")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 4, 4 + startY + spaceY * 2)) + .widget( + new TextWidget(GT_Utility.trans("209", " ticks")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 7, 4 + startY + spaceY * 2)) .widget(TextWidget.dynamicText(() -> { - FluidRegulatorData coverVariable = getCoverData(); - if (coverVariable == null) return new Text(""); - return new Text(String.format( - GT_Utility.trans("210", "Average: %.2f L/sec"), - coverVariable.tickRate == 0 - ? 0 - : coverVariable.speed * 20d / coverVariable.tickRate)) - .color(warn.get() ? COLOR_TEXT_WARN.get() : COLOR_TEXT_GRAY.get()); - }) - .setSynced(false) - .setPos(startX + spaceX * 0, 4 + startY + spaceY * 3)); + FluidRegulatorData coverVariable = getCoverData(); + if (coverVariable == null) return new Text(""); + return new Text( + String.format( + GT_Utility.trans("210", "Average: %.2f L/sec"), + coverVariable.tickRate == 0 ? 0 + : coverVariable.speed * 20d / coverVariable.tickRate)).color( + warn.get() ? COLOR_TEXT_WARN.get() : COLOR_TEXT_GRAY.get()); + }).setSynced(false).setPos(startX + spaceX * 0, 4 + startY + spaceY * 3)); } } 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) @@ -459,6 +447,7 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid } public static class FluidRegulatorData implements ISerializableObject { + private int tickRate; private int speed; private Conditional condition; 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 8f03f7fff9..184eb8705e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java @@ -16,19 +16,11 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONIT 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; -import gregtech.api.interfaces.ITextureBuilder; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.render.TextureFactory; -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; @@ -45,28 +37,30 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; +import com.google.common.io.ByteArrayDataInput; + +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.ITextureBuilder; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_CoverBehaviorBase; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.ISerializableObject; +import io.netty.buffer.ByteBuf; + /** * TODO: Implement overlay rendering only with * {@link GT_CoverBehaviorBase#getSpecialCoverFGTextureImpl(byte, int, ISerializableObject, ICoverable)} */ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_FluidStorageMonitor.FluidStorageData> { - private static final IIconContainer[] icons = new IIconContainer[] { - OVERLAY_FLUID_STORAGE_MONITOR0, - OVERLAY_FLUID_STORAGE_MONITOR1, - OVERLAY_FLUID_STORAGE_MONITOR2, - OVERLAY_FLUID_STORAGE_MONITOR3, - OVERLAY_FLUID_STORAGE_MONITOR4, - OVERLAY_FLUID_STORAGE_MONITOR5, - OVERLAY_FLUID_STORAGE_MONITOR6, - OVERLAY_FLUID_STORAGE_MONITOR7, - OVERLAY_FLUID_STORAGE_MONITOR8, - OVERLAY_FLUID_STORAGE_MONITOR9, - OVERLAY_FLUID_STORAGE_MONITOR10, - OVERLAY_FLUID_STORAGE_MONITOR11, - OVERLAY_FLUID_STORAGE_MONITOR12, - OVERLAY_FLUID_STORAGE_MONITOR13, - OVERLAY_FLUID_STORAGE_MONITOR14, - }; + + private static final IIconContainer[] icons = new IIconContainer[] { OVERLAY_FLUID_STORAGE_MONITOR0, + OVERLAY_FLUID_STORAGE_MONITOR1, OVERLAY_FLUID_STORAGE_MONITOR2, OVERLAY_FLUID_STORAGE_MONITOR3, + OVERLAY_FLUID_STORAGE_MONITOR4, OVERLAY_FLUID_STORAGE_MONITOR5, OVERLAY_FLUID_STORAGE_MONITOR6, + OVERLAY_FLUID_STORAGE_MONITOR7, OVERLAY_FLUID_STORAGE_MONITOR8, OVERLAY_FLUID_STORAGE_MONITOR9, + OVERLAY_FLUID_STORAGE_MONITOR10, OVERLAY_FLUID_STORAGE_MONITOR11, OVERLAY_FLUID_STORAGE_MONITOR12, + OVERLAY_FLUID_STORAGE_MONITOR13, OVERLAY_FLUID_STORAGE_MONITOR14, }; public GT_Cover_FluidStorageMonitor() { super(FluidStorageData.class); @@ -83,13 +77,8 @@ 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); @@ -105,25 +94,24 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ return aCoverVariable.setNullTank().issueCoverUpdateIfNeeded(aTileEntity, aSide); } - return aCoverVariable - .setFluid(tank.fluid) - .setScale(getTankScale(tank)) + return aCoverVariable.setFluid(tank.fluid).setScale(getTankScale(tank)) .issueCoverUpdateIfNeeded(aTileEntity, aSide); } @Override - protected ITexture getSpecialCoverFGTextureImpl( - byte aSide, int aCoverID, FluidStorageData aCoverVariable, ICoverable aTileEntity) { + protected ITexture getSpecialCoverFGTextureImpl(byte aSide, int aCoverID, FluidStorageData aCoverVariable, + ICoverable aTileEntity) { return getSpecialCoverTextureImpl(aSide, aCoverID, aCoverVariable, aTileEntity); } @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); } final IIconContainer fluidIcon = new IIconContainer() { + @Override public IIcon getIcon() { return aCoverVariable.fluid.getStillIcon(); @@ -141,22 +129,14 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ }; final short[] fluidRGBA = colorToRGBA(aCoverVariable.fluid.getColor()); - final ITextureBuilder fluidTextureBuilder = - TextureFactory.builder().addIcon(fluidIcon).setRGBA(fluidRGBA); + final ITextureBuilder fluidTextureBuilder = TextureFactory.builder().addIcon(fluidIcon).setRGBA(fluidRGBA); if (aCoverVariable.fluid.getLuminosity() > 0) fluidTextureBuilder.glow(); return TextureFactory.of(fluidTextureBuilder.build(), 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; } @@ -196,8 +176,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; @@ -224,11 +204,8 @@ 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; } @@ -239,13 +216,12 @@ 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( + 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), + .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)), @@ -266,9 +242,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ return null; } if (Optional.ofNullable(tank.drain(side, filledFluid, false)) - .filter(fs -> GT_Utility.areFluidsEqual(fs, filledFluid)) - .map(fs -> fs.amount) - .orElse(0) + .filter(fs -> GT_Utility.areFluidsEqual(fs, filledFluid)).map(fs -> fs.amount).orElse(0) != filledFluid.amount) { return null; } @@ -277,28 +251,19 @@ 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]) + aCoverVariable.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; @@ -311,28 +276,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; } @@ -341,8 +306,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) { @@ -360,12 +325,12 @@ 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) }; } public static class FluidStorageData implements ISerializableObject { + private ForgeDirection side; private int slot; private Fluid fluid; @@ -390,8 +355,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ } /** - * @param slot - * 0-based index of the tank, -1 for no correct FluidTankInfo[] for the current side. + * @param slot 0-based index of the tank, -1 for no correct FluidTankInfo[] for the current side. */ public FluidStorageData setSlot(int slot) { if (this.slot != slot) { @@ -497,6 +461,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ } protected static class Util { + public static int getFluidID(@Nullable Fluid fluid) { return fluid == null ? -1 : fluid.getID(); } 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 54872f849a..09239c0a07 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java @@ -2,11 +2,24 @@ package gregtech.common.covers; import static gregtech.api.enums.GT_Values.E; +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.Constants.NBT; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -18,28 +31,18 @@ import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_SlotWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.Constants.NBT; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; 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 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 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 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 /** * @deprecated use {@link #GT_Cover_Fluidfilter(ITexture coverTexture)} instead @@ -64,30 +67,27 @@ 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))); + "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; } @@ -115,15 +115,8 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil } @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; @@ -135,17 +128,9 @@ 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))) + 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)) { @@ -159,7 +144,8 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); FluidStack sFluid = new FluidStack(FluidRegistry.getFluid(aFluid), 1000); GT_Utility.sendChatToPlayer( - aPlayer, GT_Utility.trans("047", "Filter Fluid: ") + sFluid.getLocalizedName()); + aPlayer, + GT_Utility.trans("047", "Filter Fluid: ") + sFluid.getLocalizedName()); } return true; } @@ -167,52 +153,44 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil } @Override - protected boolean letsRedstoneGoInImpl( - byte aSide, int aCoverID, GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoInImpl(byte aSide, int aCoverID, + GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsRedstoneGoOutImpl( - byte aSide, int aCoverID, GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, + GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsEnergyInImpl( - byte aSide, int aCoverID, GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyInImpl(byte aSide, int aCoverID, GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, + ICoverable aTileEntity) { return true; } @Override - protected boolean letsEnergyOutImpl( - byte aSide, int aCoverID, GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyOutImpl(byte aSide, int aCoverID, GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, + ICoverable aTileEntity) { return true; } @Override - public boolean letsItemsInImpl( - byte aSide, - int aCoverID, - GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, - int aSlot, - ICoverable aTileEntity) { + public boolean letsItemsInImpl(byte aSide, int aCoverID, GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, + int aSlot, ICoverable aTileEntity) { return true; } @Override - public boolean letsItemsOutImpl( - byte aSide, - int aCoverID, - GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, - int aSlot, - ICoverable aTileEntity) { + public boolean letsItemsOutImpl(byte aSide, int aCoverID, GT_Cover_Fluidfilter.FluidFilterData aCoverVariable, + int aSlot, ICoverable aTileEntity) { return true; } @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; @@ -226,8 +204,8 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil } @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; @@ -241,8 +219,8 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil } @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; } @@ -282,101 +260,106 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_Fluidfilter.this, - (id, coverData) -> !getClickable(id, coverData), - (id, coverData) -> { - coverData.mFilterMode = getNewFilterMode(id, coverData); - return coverData; - }) - .addToggleButton( + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_Fluidfilter.this, + (id, coverData) -> !getClickable(id, coverData), + (id, coverData) -> { + coverData.mFilterMode = getNewFilterMode(id, coverData); + return coverData; + }).addToggleButton( 0, CoverDataFollower_ToggleButtonWidget.ofDisableable(), widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT) .addTooltip(GT_Utility.trans("232", "Filter Input")) .setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT) - .addTooltip(GT_Utility.trans("233", "Filter Output")) - .setPos(spaceX * 1, spaceY * 0)) - .addToggleButton( - 2, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT) - .addTooltip(GT_Utility.trans("234", "Block Output")) - .setPos(spaceX * 0, spaceY * 2)) - .addToggleButton( - 3, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT) - .addTooltip(GT_Utility.trans("235", "Allow Output")) - .setPos(spaceX * 1, spaceY * 2)) - .addToggleButton( - 4, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_WHITELIST) - .addTooltip(GT_Utility.trans("236", "Whitelist Fluid")) - .setPos(spaceX * 0, spaceY * 1)) - .addToggleButton( - 5, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLACKLIST) - .addTooltip(GT_Utility.trans("237", "Blacklist Fluid")) - .setPos(spaceX * 1, spaceY * 1)) - .addFollower( - new CoverDataFollower_SlotWidget<FluidFilterData>(new ItemStackHandler(), 0, true) { - @Override - protected void putClickedStack(ItemStack stack, int mouseButton) { - if (stack != null - && GT_Utility.getFluidFromContainerOrFluidDisplay(stack) == null) - return; - super.putClickedStack( - GT_Utility.getFluidDisplayStack( - GT_Utility.getFluidFromContainerOrFluidDisplay(stack), - false), - mouseButton); - } - }, - this::getFluidDisplayItem, - (coverData, stack) -> { - if (stack == null) { - coverData.mFluidID = -1; - } else { - FluidStack fluid = GT_Utility.getFluidFromDisplayStack(stack); - if (fluid != null && fluid.getFluid() != null) { - coverData.mFluidID = - fluid.getFluid().getID(); - } - } - return coverData; - }, - widget -> widget.setBackground(ModularUITextures.FLUID_SLOT) - .setPos(0, spaceY * 3 + 2)) - .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("238", "Filter Direction")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 2, 3 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("239", "Filter Type")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 2, 3 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("240", "Block Flow")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 2, 3 + startY + spaceY * 2)) + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT) + .addTooltip(GT_Utility.trans("233", "Filter Output")) + .setPos(spaceX * 1, spaceY * 0)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT) + .addTooltip(GT_Utility.trans("234", "Block Output")) + .setPos(spaceX * 0, spaceY * 2)) + .addToggleButton( + 3, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT) + .addTooltip(GT_Utility.trans("235", "Allow Output")) + .setPos(spaceX * 1, spaceY * 2)) + .addToggleButton( + 4, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_WHITELIST) + .addTooltip(GT_Utility.trans("236", "Whitelist Fluid")) + .setPos(spaceX * 0, spaceY * 1)) + .addToggleButton( + 5, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLACKLIST) + .addTooltip(GT_Utility.trans("237", "Blacklist Fluid")) + .setPos(spaceX * 1, spaceY * 1)) + .addFollower( + new CoverDataFollower_SlotWidget<FluidFilterData>( + new ItemStackHandler(), + 0, + true) { + + @Override + protected void putClickedStack(ItemStack stack, int mouseButton) { + if (stack != null + && GT_Utility.getFluidFromContainerOrFluidDisplay(stack) + == null) + return; + super.putClickedStack( + GT_Utility.getFluidDisplayStack( + GT_Utility + .getFluidFromContainerOrFluidDisplay(stack), + false), + mouseButton); + } + }, + this::getFluidDisplayItem, + (coverData, stack) -> { + if (stack == null) { + coverData.mFluidID = -1; + } else { + FluidStack fluid = GT_Utility.getFluidFromDisplayStack(stack); + if (fluid != null && fluid.getFluid() != null) { + coverData.mFluidID = fluid.getFluid().getID(); + } + } + return coverData; + }, + widget -> widget.setBackground(ModularUITextures.FLUID_SLOT) + .setPos(0, spaceY * 3 + 2)) + .setPos(startX, startY)) + .widget( + new TextWidget(GT_Utility.trans("238", "Filter Direction")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 2, 3 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("239", "Filter Type")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 2, 3 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("240", "Block Flow")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 2, 3 + startY + spaceY * 2)) .widget(TextWidget.dynamicString(() -> { - if (getCoverData() != null) { - ItemStack fluidDisplay = getFluidDisplayItem(getCoverData()); - if (fluidDisplay != null) { - return fluidDisplay.getDisplayName(); - } - } - return GT_Utility.trans("315", "Filter Empty"); - }) - .setSynced(false) - .setDefaultColor(COLOR_TITLE.get()) + if (getCoverData() != null) { + ItemStack fluidDisplay = getFluidDisplayItem(getCoverData()); + if (fluidDisplay != null) { + return fluidDisplay.getDisplayName(); + } + } + return GT_Utility.trans("315", "Filter Empty"); + }).setSynced(false).setDefaultColor(COLOR_TITLE.get()) .setPos(startX + spaceX + 3, 4 + startY + spaceY * 3)); } @@ -420,6 +403,7 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil } public static class FluidFilterData implements ISerializableObject { + private int mFluidID; private int mFilterMode; @@ -439,8 +423,7 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil public NBTBase saveDataToNBT() { NBTTagCompound tNBT = new NBTTagCompound(); tNBT.setInteger("mFilterMode", mFilterMode); - if (mFluidID >= 0) - tNBT.setString("mFluid", FluidRegistry.getFluid(mFluidID).getName()); + if (mFluidID >= 0) tNBT.setString("mFluid", FluidRegistry.getFluid(mFluidID).getName()); return tNBT; } 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 1580ac6ce5..a1378c9812 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java @@ -3,10 +3,25 @@ package gregtech.common.covers; import static gregtech.api.util.GT_Utility.intToStack; import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; +import java.util.Collections; +import java.util.List; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.Constants; +import net.minecraftforge.fluids.Fluid; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import cpw.mods.fml.common.network.ByteBufUtils; import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; @@ -19,17 +34,6 @@ import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_SlotWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import java.util.Collections; -import java.util.List; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilter.ItemFilterData> { @@ -59,19 +63,14 @@ 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; byte fromSide = !mExport ? GT_Utility.getOppositeSide(aSide) : aSide, @@ -96,15 +95,8 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte } @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; @@ -117,75 +109,67 @@ 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.1", "Whitelist Mode") + aCoverVariable.mWhitelist ? GT_Utility.trans("125.1", "Whitelist Mode") : GT_Utility.trans("124.1", "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; } @@ -229,8 +213,8 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte if (getCoverData() != null) { filterInvHandler.setStackInSlot(0, setStackSize1(getCoverData().mFilter)); } - builder.widget(new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_ItemFilter.this) + builder.widget( + new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_ItemFilter.this) .addFollower( new CoverDataFollower_ToggleButtonWidget<>(), coverData -> coverData.mWhitelist, @@ -238,7 +222,8 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte coverData.mWhitelist = state; return coverData; }, - widget -> widget.setToggleTexture( + widget -> widget + .setToggleTexture( GT_UITextures.OVERLAY_BUTTON_WHITELIST, GT_UITextures.OVERLAY_BUTTON_BLACKLIST) .addTooltip(0, GT_Utility.trans("124.1", "Blacklist Mode")) @@ -254,12 +239,12 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte widget -> widget.setBackground(GT_UITextures.SLOT_DARK_GRAY) .setPos(spaceX * 0, spaceY * 2)) .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("317", "Filter: ")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 0, 3 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("318", "Check Mode")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 2, 3 + startY + spaceY * 0)); + .widget( + new TextWidget(GT_Utility.trans("317", "Filter: ")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 0, 3 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("318", "Check Mode")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 2, 3 + startY + spaceY * 0)); } private ItemStack setStackSize1(ItemStack stack) { @@ -271,6 +256,7 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte } public static class ItemFilterData implements ISerializableObject { + private boolean mWhitelist; private ItemStack mFilter; 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 6724e36975..14607cdf09 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java @@ -1,11 +1,22 @@ package gregtech.common.covers; +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.Fluid; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; + import gregtech.api.GregTech_API; import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; @@ -22,14 +33,6 @@ import gregtech.common.gui.modularui.widget.ItemWatcherSlotWidget; 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.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter.ItemMeterData> { @@ -53,10 +56,9 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. @Override public ItemMeterData createDataObject(int aLegacyData) { // 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 ((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); boolean invert = (aLegacyData & INVERT_BIT) == INVERT_BIT; int slot = (aLegacyData & SLOT_MASK) - 1; @@ -70,13 +72,13 @@ 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; } - public static byte computeSignalBasedOnItems( - ICoverable tileEntity, boolean inverted, int threshold, int slot, int side) { + public static byte computeSignalBasedOnItems(ICoverable tileEntity, boolean inverted, int threshold, int slot, + int side) { long max = 0; long used = 0; IMetaTileEntity mte = ((IGregTechTileEntity) tileEntity).getMetaTileEntity(); @@ -90,7 +92,7 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. used = 64; } } else { - int[] slots = slot >= 0 ? new int[] {slot} : tileEntity.getAccessibleSlotsFromSide(side); + int[] slots = slot >= 0 ? new int[] { slot } : tileEntity.getAccessibleSlotsFromSide(side); for (int i : slots) { if (i >= 0 && i < tileEntity.getSizeInventory()) { @@ -105,30 +107,22 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. } @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) { byte signal = computeSignalBasedOnItems( - aTileEntity, aCoverVariable.inverted, aCoverVariable.threshold, aCoverVariable.slot, aSide); + aTileEntity, + aCoverVariable.inverted, + aCoverVariable.threshold, + aCoverVariable.slot, + aSide); aTileEntity.setOutputRedstoneSignal(aSide, signal); return aCoverVariable; } @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; @@ -141,9 +135,8 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. aCoverVariable.slot++; 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")); + 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); } @@ -156,38 +149,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; } @@ -234,8 +227,8 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. maxSlot = getMaxSlot(); - builder.widget(new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_ItemMeter.this) + builder.widget( + new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_ItemMeter.this) .addFollower( CoverDataFollower_ToggleButtonWidget.ofRedstone(), coverData -> coverData.inverted, @@ -243,9 +236,7 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. coverData.inverted = state; return coverData; }, - widget -> widget.addTooltip(0, NORMAL) - .addTooltip(1, INVERTED) - .setPos(0, 0)) + widget -> widget.addTooltip(0, NORMAL).addTooltip(1, INVERTED).setPos(0, 0)) .addFollower( new CoverDataFollower_TextFieldWidget<>(), coverData -> getSlotTextFieldContent(coverData.slot), @@ -253,19 +244,15 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. coverData.slot = getIntFromText(state); return coverData; }, - widget -> widget.setOnScrollText() - .setValidator(val -> { - final int valSlot = getIntFromText(val); - if (valSlot > -1) { - return TextFieldWidget.format.format(Math.min(valSlot, maxSlot)); - } else { - return ALL_TEXT; - } - }) - .setPattern(BaseTextFieldWidget.NATURAL_NUMS) - .setFocusOnGuiOpen(true) - .setPos(0, spaceY + 2) - .setSize(spaceX * 2 + 5, 12)) + widget -> widget.setOnScrollText().setValidator(val -> { + final int valSlot = getIntFromText(val); + if (valSlot > -1) { + return TextFieldWidget.format.format(Math.min(valSlot, maxSlot)); + } else { + return ALL_TEXT; + } + }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setFocusOnGuiOpen(true) + .setPos(0, spaceY + 2).setSize(spaceX * 2 + 5, 12)) .addFollower( new CoverDataFollower_TextFieldWidget<>(), coverData -> String.valueOf(coverData.threshold), @@ -273,34 +260,35 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. coverData.threshold = (int) MathExpression.parseMathExpression(state); return coverData; }, - widget -> widget.setOnScrollNumbers(1, 10, 64) - .setNumbers(0, getUpperBound()) - .setPos(0, spaceY * 2 + 2) - .setSize(spaceX * 2 + 5, 12)) + widget -> widget.setOnScrollNumbers(1, 10, 64).setNumbers(0, getUpperBound()) + .setPos(0, spaceY * 2 + 2).setSize(spaceX * 2 + 5, 12)) .setPos(startX, startY)) - .widget(new ItemWatcherSlotWidget() - .setGetter(this::getTargetItem) - .setPos(startX + spaceX * 8 - 4, startY + spaceY)) - .widget(TextWidget.dynamicString( + .widget( + new ItemWatcherSlotWidget().setGetter( + this::getTargetItem).setPos( + startX + spaceX * 8 - 4, + startY + spaceY)) + .widget( + TextWidget.dynamicString( () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "") - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 4 + startY)) - .widget(new TextWidget(GT_Utility.trans("254", "Detect slot#")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 4 + startY + spaceY)) - .widget(new TextWidget(GT_Utility.trans("221", "Item threshold")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, startY + spaceY * 2 + 4)); + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 4 + startY)) + .widget( + new TextWidget(GT_Utility.trans("254", "Detect slot#")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 4 + startY + spaceY)) + .widget( + new TextWidget(GT_Utility.trans("221", "Item threshold")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, startY + spaceY * 2 + 4)); } private int getMaxSlot() { final ICoverable tile = getUIBuildContext().getTile(); - if (tile instanceof TileEntity - && !tile.isDead() + if (tile instanceof TileEntity && !tile.isDead() && tile instanceof IGregTechTileEntity - && !(((IGregTechTileEntity) tile).getMetaTileEntity() - instanceof GT_MetaTileEntity_DigitalChestBase)) + && !(((IGregTechTileEntity) tile) + .getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase)) return Math.min(tile.getSizeInventory() - 1, SLOT_MASK - 1); else return -1; } @@ -337,6 +325,7 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. } public static class ItemMeterData implements ISerializableObject { + private boolean inverted; /** The special value {@code -1} means all slots. */ private int slot; 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 b8675bf1c2..1171a4717f 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java @@ -5,6 +5,7 @@ import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; public class GT_Cover_Lens extends GT_CoverBehavior { + private final byte mColor; /** @@ -21,8 +22,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 62e560487b..4a3b96a769 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java @@ -1,9 +1,24 @@ package gregtech.common.covers; +import java.util.Arrays; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -16,17 +31,6 @@ import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalTankBase; import io.netty.buffer.ByteBuf; -import java.util.Arrays; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; /** * TODO: Implement overlay rendering only with @@ -49,8 +53,8 @@ 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; } @@ -62,12 +66,10 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe if (tanks != null) { for (FluidTankInfo tank : tanks) { if (tank != null) { - if (tileEntity instanceof BaseMetaTileEntity - && ((BaseMetaTileEntity) tileEntity).getMetaTileEntity() - instanceof GT_MetaTileEntity_DigitalTankBase) { - max += ((GT_MetaTileEntity_DigitalTankBase) - ((BaseMetaTileEntity) tileEntity).getMetaTileEntity()) - .getRealCapacity(); + if (tileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tileEntity) + .getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalTankBase) { + max += ((GT_MetaTileEntity_DigitalTankBase) ((BaseMetaTileEntity) tileEntity) + .getMetaTileEntity()).getRealCapacity(); } else max += tank.capacity; FluidStack tLiquid = tank.fluid; if (tLiquid != null) { @@ -84,13 +86,8 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe } @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) { byte signal = computeSignalBasedOnFluid(aTileEntity, aCoverVariable.inverted, aCoverVariable.threshold); aTileEntity.setOutputRedstoneSignal(aSide, signal); @@ -98,15 +95,8 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe } @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")); @@ -118,44 +108,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; } @@ -200,16 +190,15 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe final int maxCapacity; if (getUIBuildContext().getTile() instanceof IFluidHandler) { - FluidTankInfo[] tanks = - ((IFluidHandler) getUIBuildContext().getTile()).getTankInfo(ForgeDirection.UNKNOWN); - maxCapacity = - Arrays.stream(tanks).mapToInt(tank -> tank.capacity).sum(); + FluidTankInfo[] tanks = ((IFluidHandler) getUIBuildContext().getTile()) + .getTankInfo(ForgeDirection.UNKNOWN); + maxCapacity = Arrays.stream(tanks).mapToInt(tank -> tank.capacity).sum(); } else { maxCapacity = -1; } - builder.widget(new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_LiquidMeter.this) + builder.widget( + new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_LiquidMeter.this) .addFollower( CoverDataFollower_ToggleButtonWidget.ofRedstone(), coverData -> coverData.inverted, @@ -217,8 +206,7 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe coverData.inverted = state; return coverData; }, - widget -> widget.addTooltip(0, NORMAL) - .addTooltip(1, INVERTED) + widget -> widget.addTooltip(0, NORMAL).addTooltip(1, INVERTED) .setPos(spaceX * 0, spaceY * 0)) .addFollower( new CoverDataFollower_TextFieldWidget<>(), @@ -229,22 +217,23 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe }, widget -> widget.setOnScrollNumbers(1000, 100, 100000) .setNumbers(0, maxCapacity > 0 ? maxCapacity : Integer.MAX_VALUE) - .setFocusOnGuiOpen(true) - .setPos(spaceX * 0, spaceY * 1 + 2) + .setFocusOnGuiOpen(true).setPos(spaceX * 0, spaceY * 1 + 2) .setSize(spaceX * 4 + 5, 12)) .setPos(startX, startY)) - .widget(TextWidget.dynamicString( + .widget( + TextWidget.dynamicString( () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "") - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("222", "Fluid threshold")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5 - 10, startY + spaceY * 1 + 4)); + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("222", "Fluid threshold")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5 - 10, startY + spaceY * 1 + 4)); } } public static class LiquidMeterData implements ISerializableObject { + private boolean inverted; /** The special value {@code 0} means threshold check is disabled. */ private int threshold; 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 5dfb837499..cb8c4e691e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java @@ -1,7 +1,12 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -14,9 +19,6 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { @@ -33,21 +35,20 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { } public static boolean isRotor(ItemStack rotor) { - return (rotor != null - && rotor.getItem() instanceof GT_MetaGenerated_Tool + return (rotor != null && rotor.getItem() instanceof GT_MetaGenerated_Tool && rotor.getItemDamage() >= 170 && rotor.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; @@ -67,8 +68,10 @@ 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 { @@ -87,15 +90,8 @@ 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; @@ -133,15 +129,18 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { break; case 10: GT_Utility.sendChatToPlayer( - aPlayer, GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod")); + 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)")); + 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")); + aPlayer, + GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod")); break; case 13: GT_Utility.sendChatToPlayer( @@ -183,8 +182,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; } @@ -224,94 +223,93 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - 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"), - }; + 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"), }; - 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"), - }; + 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"), }; - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_NeedMaintainance.this, - (index, coverData) -> isEnabled(index, convert(coverData)), - (index, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(index, convert(coverData)))) - .addToggleButton( - 0, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.addTooltip(tooltipText[0]).setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.addTooltip(tooltipText[1]).setPos(spaceX * 0, spaceY * 1)) - .addToggleButton( - 2, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.addTooltip(tooltipText[2]).setPos(spaceX * 0, spaceY * 2)) - .addToggleButton( - 3, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.addTooltip(tooltipText[3]).setPos(spaceX * 0, spaceY * 3)) - .addToggleButton( - 4, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.addTooltip(tooltipText[4]).setPos(spaceX * 4 + 4, spaceY * 0)) - .addToggleButton( - 5, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.addTooltip(tooltipText[5]).setPos(spaceX * 4 + 4, spaceY * 1)) - .addToggleButton( - 6, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.addTooltip(tooltipText[6]).setPos(spaceX * 4 + 4, spaceY * 2)) - .addToggleButton( - 7, - CoverDataFollower_ToggleButtonWidget.ofRedstone(), - widget -> widget.setPos(spaceX * 4 + 4, spaceY * 3)) - .setPos(startX, startY)) - .widget(new TextWidget(buttonText[0]) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0)) - .widget(new TextWidget(buttonText[1]) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1)) - .widget(new TextWidget(buttonText[2]) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, 4 + startY + spaceY * 2)) - .widget(new TextWidget(buttonText[3]) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, 4 + startY + spaceY * 3)) - .widget(new TextWidget(buttonText[4]) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 0)) - .widget(new TextWidget(buttonText[5]) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 1)) - .widget(new TextWidget(buttonText[6]) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 2)) - .widget(TextWidget.dynamicString( - () -> isEnabled(7, convert(getCoverData())) ? buttonText[7] : buttonText[8]) - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 3)); + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_NeedMaintainance.this, + (index, coverData) -> isEnabled(index, convert(coverData)), + (index, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(index, convert(coverData)))).addToggleButton( + 0, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.addTooltip(tooltipText[0]).setPos(spaceX * 0, spaceY * 0)) + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.addTooltip(tooltipText[1]) + .setPos(spaceX * 0, spaceY * 1)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.addTooltip(tooltipText[2]) + .setPos(spaceX * 0, spaceY * 2)) + .addToggleButton( + 3, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.addTooltip(tooltipText[3]) + .setPos(spaceX * 0, spaceY * 3)) + .addToggleButton( + 4, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.addTooltip(tooltipText[4]) + .setPos(spaceX * 4 + 4, spaceY * 0)) + .addToggleButton( + 5, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.addTooltip(tooltipText[5]) + .setPos(spaceX * 4 + 4, spaceY * 1)) + .addToggleButton( + 6, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.addTooltip(tooltipText[6]) + .setPos(spaceX * 4 + 4, spaceY * 2)) + .addToggleButton( + 7, + CoverDataFollower_ToggleButtonWidget.ofRedstone(), + widget -> widget.setPos(spaceX * 4 + 4, spaceY * 3)) + .setPos(startX, startY)) + .widget( + new TextWidget(buttonText[0]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(buttonText[1]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1)) + .widget( + new TextWidget(buttonText[2]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, 4 + startY + spaceY * 2)) + .widget( + new TextWidget(buttonText[3]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, 4 + startY + spaceY * 3)) + .widget( + new TextWidget(buttonText[4]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(buttonText[5]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 1)) + .widget( + new TextWidget(buttonText[6]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 2)) + .widget( + TextWidget + .dynamicString( + () -> isEnabled(7, convert(getCoverData())) ? buttonText[7] : buttonText[8]) + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 3)); } private int getNewCoverVariable(int id, int coverVariable) { 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 7f9e2ae5b0..5746807247 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -1,7 +1,12 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -11,9 +16,6 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_PlayerDetector extends GT_CoverBehavior { @@ -33,14 +35,14 @@ public class GT_Cover_PlayerDetector 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) { boolean playerDetected = false; if (aTileEntity instanceof IGregTechTileEntity) { @@ -55,10 +57,12 @@ 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; @@ -82,15 +86,8 @@ public class GT_Cover_PlayerDetector 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)) % 3; if (aCoverVariable < 0) { aCoverVariable = 2; @@ -140,8 +137,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; } @@ -181,34 +178,42 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_PlayerDetector.this, - (index, coverData) -> index == convert(coverData), - (index, coverData) -> new ISerializableObject.LegacyCoverData(index)) - .addToggleButton( - 0, CoverDataFollower_ToggleButtonWidget.ofCheck(), widget -> widget.addTooltip( - GT_Utility.trans("068.1", "Emit if any Player is close")) + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_PlayerDetector.this, + (index, coverData) -> index == convert(coverData), + (index, coverData) -> new ISerializableObject.LegacyCoverData(index)).addToggleButton( + 0, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget + .addTooltip(GT_Utility.trans("068.1", "Emit if any Player is close")) .setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, CoverDataFollower_ToggleButtonWidget.ofCheck(), widget -> widget.addTooltip( - GT_Utility.trans("069.1", "Emit if other Player is close")) - .setPos(spaceX * 0, spaceY * 1)) - .addToggleButton( - 2, CoverDataFollower_ToggleButtonWidget.ofCheck(), widget -> widget.addTooltip( - GT_Utility.trans("070", "Emit if you are close")) - .setPos(spaceX * 0, spaceY * 2)) - .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("319", "Any player")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("320", "Other players")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("321", "Only owner")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, 4 + startY + spaceY * 2)); + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget + .addTooltip( + GT_Utility.trans("069.1", "Emit if other Player is close")) + .setPos(spaceX * 0, spaceY * 1)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget + .addTooltip(GT_Utility.trans("070", "Emit if you are close")) + .setPos(spaceX * 0, spaceY * 2)) + .setPos(startX, startY)) + .widget( + new TextWidget(GT_Utility.trans("319", "Any player")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("320", "Other players")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("321", "Only owner")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, 4 + startY + spaceY * 2)); } } } 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 c15f7aec38..57f39d4ba6 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java @@ -1,7 +1,14 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -12,13 +19,9 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; public class GT_Cover_Pump extends GT_CoverBehavior { + public final int mTransferRate; /** @@ -35,14 +38,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; @@ -57,8 +60,8 @@ public class GT_Cover_Pump extends GT_CoverBehavior { 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(), @@ -67,8 +70,8 @@ public class GT_Cover_Pump extends GT_CoverBehavior { } } } 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); @@ -76,7 +79,9 @@ public class GT_Cover_Pump extends GT_CoverBehavior { tTank1.fill( ForgeDirection.getOrientation(aSide), tTank2.drain( - ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), + ForgeDirection.getOrientation(aSide).getOpposite(), + tLiquid.amount, + true), true); } } @@ -91,15 +96,8 @@ 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) { + 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; @@ -236,65 +234,80 @@ public class GT_Cover_Pump extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_Pump.this, - (id, coverData) -> !getClickable(id, convert(coverData)), - (id, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(id, convert(coverData)))) - .addToggleButton( - 0, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT) - .addTooltip(GT_Utility.trans("006", "Export")) - .setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT) - .addTooltip(GT_Utility.trans("007", "Import")) - .setPos(spaceX * 1, spaceY * 0)) - .addToggleButton( - 2, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) - .addTooltip(GT_Utility.trans("224", "Always On")) - .setPos(spaceX * 0, spaceY * 1)) - .addToggleButton( - 3, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON) - .addTooltip(GT_Utility.trans("225", "Active with Redstone Signal")) - .setPos(spaceX * 1, spaceY * 1)) - .addToggleButton( - 4, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF) - .addTooltip(GT_Utility.trans("226", "Inactive with Redstone Signal")) - .setPos(spaceX * 2, spaceY * 1)) - .addToggleButton( - 5, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT) - .addTooltip(GT_Utility.trans("227", "Allow Input")) - .setPos(spaceX * 0, spaceY * 2)) - .addToggleButton( - 6, - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT) - .addTooltip(GT_Utility.trans("228", "Block Input")) - .setPos(spaceX * 1, spaceY * 2)) - .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("229", "Import/Export")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 3 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("230", "Conditional")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 3 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("231", "Enable Input")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 3 + startY + spaceY * 2)); + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_Pump.this, + (id, coverData) -> !getClickable(id, convert(coverData)), + (id, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(id, convert(coverData)))).addToggleButton( + 0, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT) + .addTooltip(GT_Utility.trans("006", "Export")) + .setPos(spaceX * 0, spaceY * 0)) + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT) + .addTooltip(GT_Utility.trans("007", "Import")) + .setPos(spaceX * 1, spaceY * 0)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) + .addTooltip(GT_Utility.trans("224", "Always On")) + .setPos(spaceX * 0, spaceY * 1)) + .addToggleButton( + 3, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON) + .addTooltip( + GT_Utility.trans( + "225", + "Active with Redstone Signal")) + .setPos(spaceX * 1, spaceY * 1)) + .addToggleButton( + 4, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF) + .addTooltip( + GT_Utility.trans( + "226", + "Inactive with Redstone Signal")) + .setPos(spaceX * 2, spaceY * 1)) + .addToggleButton( + 5, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT) + .addTooltip(GT_Utility.trans("227", "Allow Input")) + .setPos(spaceX * 0, spaceY * 2)) + .addToggleButton( + 6, + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + widget -> widget + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT) + .addTooltip(GT_Utility.trans("228", "Block Input")) + .setPos(spaceX * 1, spaceY * 2)) + .setPos(startX, startY)) + .widget( + new TextWidget(GT_Utility.trans("229", "Import/Export")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 3 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("230", "Conditional")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 3 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("231", "Enable Input")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 3, 3 + startY + spaceY * 2)); } private int getNewCoverVariable(int id, int coverVariable) { 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 4be44136e6..733376f6e2 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java @@ -1,46 +1,42 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fluids.Fluid; @SuppressWarnings("unused") // Legacy from GT4. TODO: Consider re-enable registration public class GT_Cover_RedstoneConductor extends GT_CoverBehavior { + GT_Cover_RedstoneConductor(ITexture coverTexture) { super(coverTexture); } @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))); + 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) { + 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; @@ -102,8 +98,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 17d6b2e1c9..9cd9f7f5fb 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java @@ -19,25 +19,24 @@ public class GT_Cover_RedstoneReceiverExternal extends GT_Cover_RedstoneWireless } @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) { aTileEntity.setOutputRedstoneSignal( aSide, - GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null - ? 0 + 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 1e0a5f0593..8dec852149 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java @@ -21,32 +21,27 @@ public class GT_Cover_RedstoneReceiverInternal extends GT_Cover_RedstoneWireless } @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) ((IMachineProgress) aTileEntity).enableWorking(); - else ((IMachineProgress) aTileEntity).disableWorking(); + else((IMachineProgress) aTileEntity).disableWorking(); ((IMachineProgress) aTileEntity).setWorkDataValue(aInputRedstone); } return aCoverVariable; } @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 true; } @Override - public byte getRedstoneInput( - byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return GregTech_API.sWirelessRedstone.get(aCoverVariable) == null - ? 0 + public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, + ICoverable aTileEntity) { + return GregTech_API.sWirelessRedstone.get(aCoverVariable) == null ? 0 : GregTech_API.sWirelessRedstone.get(aCoverVariable); } 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 31a542a924..d596b4ec15 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java @@ -1,35 +1,30 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IMachineProgress; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fluids.Fluid; @SuppressWarnings("unused") // TODO: Consider re-registering this public class GT_Cover_RedstoneSignalizer extends GT_CoverBehavior { + GT_Cover_RedstoneSignalizer(ITexture coverTexture) { super(coverTexture); } @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) { case 0: @@ -37,11 +32,13 @@ public class GT_Cover_RedstoneSignalizer extends GT_CoverBehavior { break; case 1: GT_Utility.sendChatToPlayer( - aPlayer, GT_Utility.trans("079", "Conditional Signal = ") + (aCoverVariable & 0xF)); + 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)); + aPlayer, + GT_Utility.trans("080", "Inverted Conditional Signal = ") + (aCoverVariable & 0xF)); break; } return aCoverVariable; @@ -83,8 +80,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 984e817665..4f3a8367d3 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java @@ -2,12 +2,13 @@ package gregtech.common.covers; import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.covers.IControlsWorkCover; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.ISerializableObject; -import net.minecraft.item.ItemStack; public class GT_Cover_RedstoneTransmitterExternal extends GT_Cover_RedstoneWirelessBase { @@ -24,8 +25,8 @@ public class GT_Cover_RedstoneTransmitterExternal extends GT_Cover_RedstoneWirel } @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) { // TODO remove next line after 2.3.0 if (!IControlsWorkCover.makeSureOnlyOne(aSide, aTileEntity)) return aCoverVariable; GregTech_API.sWirelessRedstone.put(aCoverVariable, aInputRedstone); @@ -33,12 +34,8 @@ public class GT_Cover_RedstoneTransmitterExternal extends GT_Cover_RedstoneWirel } @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 true; } 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 a1f020c40c..f4b7f5fa80 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java @@ -19,16 +19,16 @@ public class GT_Cover_RedstoneTransmitterInternal extends GT_Cover_RedstoneWirel } @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; } @@ -43,8 +43,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 f6e5381c74..441201af08 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java @@ -1,8 +1,12 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.GregTech_API; import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; @@ -13,8 +17,6 @@ import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fluids.Fluid; public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { @@ -36,26 +38,22 @@ public abstract class GT_Cover_RedstoneWirelessBase 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) { 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; } @@ -64,15 +62,8 @@ 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); @@ -82,23 +73,16 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { 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) { + 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); @@ -210,32 +194,34 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_RedstoneWirelessBase.this) - .addFollower( - new CoverDataFollower_TextFieldWidget<>(), - coverData -> String.valueOf(getFlagFrequency(convert(coverData))), - (coverData, text) -> new ISerializableObject.LegacyCoverData( - (int) MathExpression.parseMathExpression(text) - | getFlagCheckbox(convert(coverData))), - widget -> widget.setOnScrollNumbers() - .setNumbers(0, MAX_CHANNEL) - .setFocusOnGuiOpen(true) - .setPos(spaceX * 0, spaceY * 0 + 2) - .setSize(spaceX * 4 - 3, 12)) - .addFollower( - CoverDataFollower_ToggleButtonWidget.ofCheck(), - coverData -> getFlagCheckbox(convert(coverData)) > 0, - (coverData, state) -> new ISerializableObject.LegacyCoverData( - getFlagFrequency(convert(coverData)) | (state ? CHECKBOX_MASK : 0)), - widget -> widget.setPos(spaceX * 0, spaceY * 2)) - .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("246", "Frequency")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 4, 4 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("602", "Use Private Frequency")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 1, startY + spaceY * 2 + 4)); + builder.widget( + new CoverDataControllerWidget<>( + this::getCoverData, + this::setCoverData, + GT_Cover_RedstoneWirelessBase.this) + .addFollower( + new CoverDataFollower_TextFieldWidget<>(), + coverData -> String.valueOf(getFlagFrequency(convert(coverData))), + (coverData, text) -> new ISerializableObject.LegacyCoverData( + (int) MathExpression.parseMathExpression(text) + | getFlagCheckbox(convert(coverData))), + widget -> widget.setOnScrollNumbers().setNumbers(0, MAX_CHANNEL) + .setFocusOnGuiOpen(true).setPos(spaceX * 0, spaceY * 0 + 2) + .setSize(spaceX * 4 - 3, 12)) + .addFollower( + CoverDataFollower_ToggleButtonWidget.ofCheck(), + coverData -> getFlagCheckbox(convert(coverData)) > 0, + (coverData, state) -> new ISerializableObject.LegacyCoverData( + getFlagFrequency(convert(coverData)) | (state ? CHECKBOX_MASK : 0)), + widget -> widget.setPos(spaceX * 0, spaceY * 2)) + .setPos(startX, startY)) + .widget( + new TextWidget(GT_Utility.trans("246", "Frequency")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 4, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("602", "Use Private Frequency")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 1, startY + spaceY * 2 + 4)); } private int getFlagFrequency(int coverVariable) { 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 84fc84d820..8f26c112ae 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java @@ -1,10 +1,11 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_Screen extends GT_CoverBehavior { @@ -21,8 +22,8 @@ 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; } @@ -77,33 +78,26 @@ 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 6a3df96c5a..f1e977efad 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java @@ -1,7 +1,11 @@ package gregtech.common.covers; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -12,8 +16,6 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fluids.Fluid; public class GT_Cover_Shutter extends GT_CoverBehavior { @@ -30,27 +32,20 @@ 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; @@ -77,64 +72,56 @@ 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @@ -180,41 +167,46 @@ public class GT_Cover_Shutter extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget(new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_Shutter.this, - (index, coverData) -> index == convert(coverData), - (index, coverData) -> new ISerializableObject.LegacyCoverData(index)) - .addToggleButton( - 0, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.setPos(spaceX * 0, spaceY * 0)) - .addToggleButton( - 1, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.setPos(spaceX * 0, spaceY * 1)) - .addToggleButton( - 2, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.setPos(spaceX * 0, spaceY * 2)) - .addToggleButton( - 3, - CoverDataFollower_ToggleButtonWidget.ofCheck(), - widget -> widget.setPos(spaceX * 0, spaceY * 3)) - .setPos(startX, startY)) - .widget(new TextWidget(GT_Utility.trans("082", "Open if work enabled")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0)) - .widget(new TextWidget(GT_Utility.trans("083", "Open if work disabled")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1)) - .widget(new TextWidget(GT_Utility.trans("084", "Only Output allowed")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2)) - .widget(new TextWidget(GT_Utility.trans("085", "Only Input allowed")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3)); + builder.widget( + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_Shutter.this, + (index, coverData) -> index == convert(coverData), + (index, coverData) -> new ISerializableObject.LegacyCoverData(index)) + .addToggleButton( + 0, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.setPos(spaceX * 0, spaceY * 0)) + .addToggleButton( + 1, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.setPos(spaceX * 0, spaceY * 1)) + .addToggleButton( + 2, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.setPos(spaceX * 0, spaceY * 2)) + .addToggleButton( + 3, + CoverDataFollower_ToggleButtonWidget.ofCheck(), + widget -> widget.setPos(spaceX * 0, spaceY * 3)) + .setPos(startX, startY)) + .widget( + new TextWidget(GT_Utility.trans("082", "Open if work enabled")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0)) + .widget( + new TextWidget(GT_Utility.trans("083", "Open if work disabled")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1)) + .widget( + new TextWidget(GT_Utility.trans("084", "Only Output allowed")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2)) + .widget( + new TextWidget(GT_Utility.trans("085", "Only Input allowed")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3)); } } } 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 de1a0c7617..7bd0503214 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java @@ -2,15 +2,17 @@ package gregtech.common.covers; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class GT_Cover_SolarPanel extends GT_CoverBehavior { + private final int mVoltage; public GT_Cover_SolarPanel(int aVoltage) { @@ -18,14 +20,14 @@ 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) { + 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; @@ -61,15 +63,9 @@ public class GT_Cover_SolarPanel 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) { if (aPlayer.capabilities.isCreativeMode) { GT_Utility.sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable.get() >> 2) + "% dirt"); aCoverVariable.set(aCoverVariable.get() & 0x3); @@ -82,7 +78,8 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { 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"); + aPlayer, + "Cleaned solar panel from " + (aCoverVariable.get() >> 2) + "% dirt"); aCoverVariable.set(aCoverVariable.get() & 0x3); return true; } @@ -93,15 +90,8 @@ public class GT_Cover_SolarPanel 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 (aPlayer.capabilities.isCreativeMode) { GT_Utility.sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable >> 2) + "% dirt"); aTileEntity.setCoverDataAtSide(aSide, (aCoverVariable & 0x3)); 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 30c48fdf56..916f5ed75e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java @@ -1,9 +1,10 @@ package gregtech.common.covers; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_ModHandler; -import net.minecraftforge.fluids.FluidStack; public class GT_Cover_SteamValve extends GT_Cover_Pump { @@ -20,8 +21,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 1208816d7d..184ac5bb57 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java @@ -3,10 +3,6 @@ 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; -import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; @@ -16,7 +12,13 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; + public class GT_Cover_Vent extends GT_CoverBehavior { + private final int mEfficiency; private final Fluid IC2_HOT_COOLANT = FluidRegistry.getFluid("ic2hotcoolant"); private final Fluid IC2_COOLANT = FluidRegistry.getFluid("ic2coolant"); @@ -26,14 +28,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) { @@ -60,8 +62,7 @@ public class GT_Cover_Vent extends GT_CoverBehavior { final int offsetY = aTileEntity.getOffsetY(aSide, 1); final int offsetZ = aTileEntity.getOffsetZ(aSide, 1); final World world = aTileEntity.getWorld(); - if (aTileEntity.hasThingsToDo() - && aCoverVariable != aTileEntity.getProgress() + if (aTileEntity.hasThingsToDo() && aCoverVariable != aTileEntity.getProgress() && !GT_Utility.hasBlockHitBox(world, offsetX, offsetY, offsetZ)) { aTileEntity.increaseProgress(this.mEfficiency); } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java index 6b7c7f282e..e296785cd8 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java @@ -1,8 +1,18 @@ package gregtech.common.covers.redstone; +import java.util.Arrays; +import java.util.UUID; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -11,12 +21,6 @@ import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import java.util.Arrays; -import java.util.UUID; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; public abstract class GT_Cover_AdvancedRedstoneReceiverBase extends GT_Cover_AdvancedWirelessRedstoneBase<GT_Cover_AdvancedRedstoneReceiverBase.ReceiverData> { @@ -66,26 +70,24 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase @Override protected void addUIWidgets(ModularWindow.Builder builder) { super.addUIWidgets(builder); - builder.widget(new TextWidget(GT_Utility.trans("335", "Gate Mode")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2)); + builder.widget( + new TextWidget(GT_Utility.trans("335", "Gate Mode")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2)); } @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIForDataController(CoverDataControllerWidget<ReceiverData> controller) { super.addUIForDataController(controller); - controller - .addFollower( - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - coverData -> coverData.mode == GateMode.AND, - (coverData, state) -> { - coverData.mode = GateMode.AND; - return coverData; - }, - widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_AND) - .addTooltip(GT_Utility.trans("331", "AND Gate")) - .setPos(spaceX * 0, spaceY * 2)) + controller.addFollower( + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + coverData -> coverData.mode == GateMode.AND, + (coverData, state) -> { + coverData.mode = GateMode.AND; + return coverData; + }, + widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_AND) + .addTooltip(GT_Utility.trans("331", "AND Gate")).setPos(spaceX * 0, spaceY * 2)) .addFollower( CoverDataFollower_ToggleButtonWidget.ofDisableable(), coverData -> coverData.mode == GateMode.NAND, @@ -94,8 +96,7 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase return coverData; }, widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_NAND) - .addTooltip(GT_Utility.trans("332", "NAND Gate")) - .setPos(spaceX * 1, spaceY * 2)) + .addTooltip(GT_Utility.trans("332", "NAND Gate")).setPos(spaceX * 1, spaceY * 2)) .addFollower( CoverDataFollower_ToggleButtonWidget.ofDisableable(), coverData -> coverData.mode == GateMode.OR, @@ -104,8 +105,7 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase return coverData; }, widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_OR) - .addTooltip(GT_Utility.trans("333", "OR Gate")) - .setPos(spaceX * 2, spaceY * 2)) + .addTooltip(GT_Utility.trans("333", "OR Gate")).setPos(spaceX * 2, spaceY * 2)) .addFollower( CoverDataFollower_ToggleButtonWidget.ofDisableable(), coverData -> coverData.mode == GateMode.NOR, @@ -114,8 +114,7 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase return coverData; }, widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_NOR) - .addTooltip(GT_Utility.trans("334", "NOR Gate")) - .setPos(spaceX * 3, spaceY * 2)) + .addTooltip(GT_Utility.trans("334", "NOR Gate")).setPos(spaceX * 3, spaceY * 2)) .addFollower( CoverDataFollower_ToggleButtonWidget.ofDisableable(), coverData -> coverData.mode == GateMode.SINGLE_SOURCE, @@ -124,10 +123,11 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase return coverData; }, widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ANALOG) - .addTooltips(Arrays.asList( - "ANALOG Mode", - "Only use this mode with ONE transmitter in total,", - "no logic involved")) + .addTooltips( + Arrays.asList( + "ANALOG Mode", + "Only use this mode with ONE transmitter in total,", + "no logic involved")) .setPos(spaceX * 4, spaceY * 2)); } } @@ -141,6 +141,7 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase } public static class ReceiverData extends GT_Cover_AdvancedWirelessRedstoneBase.WirelessData { + private GateMode mode; public ReceiverData(int frequency, UUID uuid, GateMode mode) { diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverExternal.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverExternal.java index 56b7fadd24..caf4b6bdcd 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverExternal.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverExternal.java @@ -10,13 +10,8 @@ public class GT_Cover_AdvancedRedstoneReceiverExternal extends GT_Cover_Advanced } @Override - public ReceiverData doCoverThingsImpl( - byte aSide, - byte aInputRedstone, - int aCoverID, - ReceiverData aCoverVariable, - ICoverable aTileEntity, - long aTimer) { + public ReceiverData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, ReceiverData aCoverVariable, + ICoverable aTileEntity, long aTimer) { aTileEntity.setOutputRedstoneSignal( aSide, getSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), aCoverVariable.getGateMode())); @@ -25,14 +20,14 @@ public class GT_Cover_AdvancedRedstoneReceiverExternal extends GT_Cover_Advanced } @Override - protected boolean isRedstoneSensitiveImpl( - byte aSide, int aCoverID, ReceiverData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, ReceiverData aCoverVariable, + ICoverable aTileEntity, long aTimer) { return false; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl( - byte aSide, int aCoverID, ReceiverData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, ReceiverData aCoverVariable, + ICoverable aTileEntity) { return true; } } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverInternal.java index 61dbb7859c..f80fdc8e65 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverInternal.java @@ -11,13 +11,8 @@ public class GT_Cover_AdvancedRedstoneReceiverInternal extends GT_Cover_Advanced } @Override - public ReceiverData doCoverThingsImpl( - byte aSide, - byte aInputRedstone, - int aCoverID, - ReceiverData aCoverVariable, - ICoverable aTileEntity, - long aTimer) { + public ReceiverData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, ReceiverData aCoverVariable, + ICoverable aTileEntity, long aTimer) { if (aTileEntity instanceof IMachineProgress) { IMachineProgress machine = ((IMachineProgress) aTileEntity); if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) > 0) { @@ -33,14 +28,14 @@ public class GT_Cover_AdvancedRedstoneReceiverInternal extends GT_Cover_Advanced } @Override - protected byte getRedstoneInputImpl( - byte aSide, byte aInputRedstone, int aCoverID, ReceiverData aCoverVariable, ICoverable aTileEntity) { + protected byte getRedstoneInputImpl(byte aSide, byte aInputRedstone, int aCoverID, ReceiverData aCoverVariable, + ICoverable aTileEntity) { return getSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), aCoverVariable.getGateMode()); } @Override - protected boolean isRedstoneSensitiveImpl( - byte aSide, int aCoverID, ReceiverData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, ReceiverData aCoverVariable, + ICoverable aTileEntity, long aTimer) { return true; } } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java index c065c085b2..f39b573742 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java @@ -1,8 +1,19 @@ package gregtech.common.covers.redstone; +import java.util.Objects; +import java.util.UUID; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -11,16 +22,8 @@ import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import java.util.Objects; -import java.util.UUID; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -public abstract class GT_Cover_AdvancedRedstoneTransmitterBase< - T extends GT_Cover_AdvancedRedstoneTransmitterBase.TransmitterData> +public abstract class GT_Cover_AdvancedRedstoneTransmitterBase<T extends GT_Cover_AdvancedRedstoneTransmitterBase.TransmitterData> extends GT_Cover_AdvancedWirelessRedstoneBase<T> { public GT_Cover_AdvancedRedstoneTransmitterBase(Class<T> typeToken, ITexture coverTexture) { @@ -33,28 +36,21 @@ public abstract class GT_Cover_AdvancedRedstoneTransmitterBase< } @Override - public boolean onCoverRemovalImpl( - byte aSide, int aCoverID, TransmitterData aCoverVariable, ICoverable aTileEntity, boolean aForced) { + public boolean onCoverRemovalImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, ICoverable aTileEntity, + boolean aForced) { unregisterSignal(aSide, aCoverVariable, aTileEntity); return true; } @Override - protected void onBaseTEDestroyedImpl( - byte aSide, int aCoverID, TransmitterData aCoverVariable, ICoverable aTileEntity) { + protected void onBaseTEDestroyedImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, + ICoverable aTileEntity) { unregisterSignal(aSide, aCoverVariable, aTileEntity); } @Override - 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) { aCoverVariable.invert = !aCoverVariable.invert; GT_Utility.sendChatToPlayer( aPlayer, @@ -64,8 +60,8 @@ public abstract class GT_Cover_AdvancedRedstoneTransmitterBase< } @Override - protected void preDataChangedImpl( - byte aSide, int aCoverID, int aNewCoverId, T aCoverVariable, T aNewCoverVariable, ICoverable aTileEntity) { + protected void preDataChangedImpl(byte aSide, int aCoverID, int aNewCoverId, T aCoverVariable, T aNewCoverVariable, + ICoverable aTileEntity) { if (aCoverVariable.frequency != aNewCoverVariable.frequency || !Objects.equals(aCoverVariable.uuid, aNewCoverVariable.uuid)) { unregisterSignal(aSide, aCoverVariable, aTileEntity); @@ -73,6 +69,7 @@ public abstract class GT_Cover_AdvancedRedstoneTransmitterBase< } public static class TransmitterData extends GT_Cover_AdvancedWirelessRedstoneBase.WirelessData { + protected boolean invert; public TransmitterData(int frequency, UUID uuid, boolean invert) { @@ -159,17 +156,14 @@ public abstract class GT_Cover_AdvancedRedstoneTransmitterBase< protected void addUIWidgets(ModularWindow.Builder builder) { super.addUIWidgets(builder); builder.widget(TextWidget.dynamicString(() -> { - T coverData = getCoverData(); - if (coverData != null) { - return getCoverData().invert - ? GT_Utility.trans("INVERTED", "Inverted") - : GT_Utility.trans("NORMAL", "Normal"); - } else { - return ""; - } - }) - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) + T coverData = getCoverData(); + if (coverData != null) { + return getCoverData().invert ? GT_Utility.trans("INVERTED", "Inverted") + : GT_Utility.trans("NORMAL", "Normal"); + } else { + return ""; + } + }).setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()) .setPos(startX + spaceX * 10, 4 + startY + spaceY * getButtonRow())); } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterExternal.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterExternal.java index aaa526e565..05c4105eb4 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterExternal.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterExternal.java @@ -21,13 +21,8 @@ public class GT_Cover_AdvancedRedstoneTransmitterExternal } @Override - public TransmitterData doCoverThingsImpl( - byte aSide, - byte aInputRedstone, - int aCoverID, - TransmitterData aCoverVariable, - ICoverable aTileEntity, - long aTimer) { + public TransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, + TransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { byte outputRedstone = aInputRedstone; if (aCoverVariable.isInvert()) { if (outputRedstone > 0) outputRedstone = 0; @@ -41,8 +36,8 @@ public class GT_Cover_AdvancedRedstoneTransmitterExternal } @Override - public boolean letsRedstoneGoInImpl( - byte aSide, int aCoverID, TransmitterData aCoverVariable, ICoverable aTileEntity) { + public boolean letsRedstoneGoInImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, + ICoverable aTileEntity) { return true; } } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterInternal.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterInternal.java index 1d21b7060f..8cd288f8e2 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterInternal.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterInternal.java @@ -21,13 +21,8 @@ public class GT_Cover_AdvancedRedstoneTransmitterInternal } @Override - public TransmitterData doCoverThingsImpl( - byte aSide, - byte aInputRedstone, - int aCoverID, - TransmitterData aCoverVariable, - ICoverable aTileEntity, - long aTimer) { + public TransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, + TransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { byte outputRedstone = aTileEntity.getOutputRedstoneSignal(aSide); if (aCoverVariable.isInvert()) { if (outputRedstone > 0) outputRedstone = 0; @@ -40,14 +35,14 @@ public class GT_Cover_AdvancedRedstoneTransmitterInternal } @Override - public boolean letsRedstoneGoOutImpl( - byte aSide, int aCoverID, TransmitterData aCoverVariable, ICoverable aTileEntity) { + public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, + ICoverable aTileEntity) { return true; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl( - byte aSide, int aCoverID, TransmitterData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, + ICoverable aTileEntity) { return true; } } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java index b62d086cb2..50302bade0 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java @@ -1,9 +1,21 @@ package gregtech.common.covers.redstone; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.Fluid; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.GregTech_API; import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; @@ -15,17 +27,8 @@ import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.Fluid; -public abstract class GT_Cover_AdvancedWirelessRedstoneBase< - T extends GT_Cover_AdvancedWirelessRedstoneBase.WirelessData> +public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_AdvancedWirelessRedstoneBase.WirelessData> extends GT_CoverBehaviorBase<T> { public GT_Cover_AdvancedWirelessRedstoneBase(Class<T> typeToken, ITexture coverTexture) { @@ -41,33 +44,17 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase< switch (mode) { case AND: - return (byte) - (signals.values().stream() - .map(signal -> signal > 0) - .reduce(true, (signalA, signalB) -> signalA && signalB) - ? 15 - : 0); + return (byte) (signals.values().stream().map(signal -> signal > 0) + .reduce(true, (signalA, signalB) -> signalA && signalB) ? 15 : 0); case NAND: - return (byte) - (signals.values().stream() - .map(signal -> signal > 0) - .reduce(true, (signalA, signalB) -> signalA && signalB) - ? 0 - : 15); + return (byte) (signals.values().stream().map(signal -> signal > 0) + .reduce(true, (signalA, signalB) -> signalA && signalB) ? 0 : 15); case OR: - return (byte) - (signals.values().stream() - .map(signal -> signal > 0) - .reduce(false, (signalA, signalB) -> signalA || signalB) - ? 15 - : 0); + return (byte) (signals.values().stream().map(signal -> signal > 0) + .reduce(false, (signalA, signalB) -> signalA || signalB) ? 15 : 0); case NOR: - return (byte) - (signals.values().stream() - .map(signal -> signal > 0) - .reduce(false, (signalA, signalB) -> signalA || signalB) - ? 0 - : 15); + return (byte) (signals.values().stream().map(signal -> signal > 0) + .reduce(false, (signalA, signalB) -> signalA || signalB) ? 0 : 15); case SINGLE_SOURCE: if (signals.values().isEmpty()) { return 0; @@ -89,24 +76,19 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase< } public static void setSignalAt(UUID uuid, int frequency, long hash, byte value) { - Map<Integer, Map<Long, Byte>> frequencies = GregTech_API.sAdvancedWirelessRedstone.computeIfAbsent( - String.valueOf(uuid), k -> new ConcurrentHashMap<>()); + Map<Integer, Map<Long, Byte>> frequencies = GregTech_API.sAdvancedWirelessRedstone + .computeIfAbsent(String.valueOf(uuid), k -> new ConcurrentHashMap<>()); Map<Long, Byte> signals = frequencies.computeIfAbsent(frequency, k -> new ConcurrentHashMap<>()); signals.put(hash, value); } /** - * x hashed into first 20 bytes - * y hashed into second 20 bytes - * z hashed into fifth 10 bytes - * dim hashed into sixth 10 bytes - * side hashed into last 4 bytes + * x hashed into first 20 bytes y hashed into second 20 bytes z hashed into fifth 10 bytes dim hashed into sixth 10 + * bytes side hashed into last 4 bytes */ public static long hashCoverCoords(ICoverable tile, byte side) { return (((((long) tile.getXCoord() << 20) + tile.getZCoord() << 10) + tile.getYCoord() << 10) - + tile.getWorld().provider.dimensionId - << 4) - + side; + + tile.getWorld().provider.dimensionId << 4) + side; } @Override @@ -141,7 +123,8 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase< @Override public String getDescriptionImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { - return GT_Utility.trans("081", "Frequency: ") + aCoverVariable.frequency + ", Transmission: " + return GT_Utility.trans("081", "Frequency: ") + aCoverVariable.frequency + + ", Transmission: " + (aCoverVariable.uuid == null ? "Public" : "Private"); } @@ -151,6 +134,7 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase< } public abstract static class WirelessData implements ISerializableObject { + protected int frequency; /** @@ -247,40 +231,39 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase< final int privateExtraColumn = isShiftPrivateLeft() ? 1 : 5; CoverDataControllerWidget<T> dataController = new CoverDataControllerWidget<>( - this::getCoverData, this::setCoverData, GT_Cover_AdvancedWirelessRedstoneBase.this); + this::getCoverData, + this::setCoverData, + GT_Cover_AdvancedWirelessRedstoneBase.this); dataController.setPos(startX, startY); addUIForDataController(dataController); builder.widget(dataController) - .widget(new TextWidget(GT_Utility.trans("246", "Frequency")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5, 4 + startY + spaceY * getFrequencyRow())) - .widget(new TextWidget(GT_Utility.trans("602", "Use Private Frequency")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * privateExtraColumn, 4 + startY + spaceY * getButtonRow())); + .widget( + new TextWidget(GT_Utility.trans("246", "Frequency")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5, 4 + startY + spaceY * getFrequencyRow())) + .widget( + new TextWidget(GT_Utility.trans("602", "Use Private Frequency")) + .setDefaultColor(COLOR_TEXT_GRAY.get()).setPos( + startX + spaceX * privateExtraColumn, + 4 + startY + spaceY * getButtonRow())); } protected void addUIForDataController(CoverDataControllerWidget<T> controller) { - controller - .addFollower( - new CoverDataFollower_TextFieldWidget<>(), - coverData -> String.valueOf(coverData.frequency), - (coverData, state) -> { - coverData.frequency = (int) MathExpression.parseMathExpression(state); - return coverData; - }, - widget -> widget.setOnScrollNumbers() - .setNumbers(0, Integer.MAX_VALUE) - .setFocusOnGuiOpen(true) - .setPos(1, 2 + spaceY * getFrequencyRow()) - .setSize(spaceX * 5 - 4, 12)) + controller.addFollower( + new CoverDataFollower_TextFieldWidget<>(), + coverData -> String.valueOf(coverData.frequency), + (coverData, state) -> { + coverData.frequency = (int) MathExpression.parseMathExpression(state); + return coverData; + }, + widget -> widget.setOnScrollNumbers().setNumbers(0, Integer.MAX_VALUE).setFocusOnGuiOpen(true) + .setPos(1, 2 + spaceY * getFrequencyRow()).setSize(spaceX * 5 - 4, 12)) .addFollower( CoverDataFollower_ToggleButtonWidget.ofCheck(), coverData -> coverData.uuid != null, (coverData, state) -> { if (state) { - coverData.uuid = - getUIBuildContext().getPlayer().getUniqueID(); + coverData.uuid = getUIBuildContext().getPlayer().getUniqueID(); } else { coverData.uuid = null; } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java index 67b931dd99..06388602c0 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java @@ -1,9 +1,18 @@ package gregtech.common.covers.redstone; +import java.util.UUID; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -13,11 +22,6 @@ import gregtech.common.covers.GT_Cover_LiquidMeter; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import io.netty.buffer.ByteBuf; -import java.util.UUID; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; public class GT_Cover_WirelessFluidDetector extends GT_Cover_AdvancedRedstoneTransmitterBase<GT_Cover_WirelessFluidDetector.FluidTransmitterData> { @@ -37,15 +41,10 @@ public class GT_Cover_WirelessFluidDetector } @Override - public FluidTransmitterData doCoverThingsImpl( - byte aSide, - byte aInputRedstone, - int aCoverID, - FluidTransmitterData aCoverVariable, - ICoverable aTileEntity, - long aTimer) { - byte signal = GT_Cover_LiquidMeter.computeSignalBasedOnFluid( - aTileEntity, aCoverVariable.invert, aCoverVariable.threshold); + public FluidTransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, + FluidTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + byte signal = GT_Cover_LiquidMeter + .computeSignalBasedOnFluid(aTileEntity, aCoverVariable.invert, aCoverVariable.threshold); long hash = hashCoverCoords(aTileEntity, aSide); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); @@ -53,18 +52,19 @@ public class GT_Cover_WirelessFluidDetector } @Override - public boolean letsRedstoneGoOutImpl( - byte aSide, int aCoverID, FluidTransmitterData aCoverVariable, ICoverable aTileEntity) { + public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, FluidTransmitterData aCoverVariable, + ICoverable aTileEntity) { return true; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl( - byte aSide, int aCoverID, FluidTransmitterData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, FluidTransmitterData aCoverVariable, + ICoverable aTileEntity) { return true; } public static class FluidTransmitterData extends GT_Cover_AdvancedRedstoneTransmitterBase.TransmitterData { + /** The special value {@code 0} means threshold check is disabled. */ private int threshold; @@ -143,9 +143,9 @@ public class GT_Cover_WirelessFluidDetector @Override protected void addUIWidgets(ModularWindow.Builder builder) { super.addUIWidgets(builder); - builder.widget(new TextWidget(GT_Utility.trans("222", "Fluid threshold")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5, 4 + startY)); + builder.widget( + new TextWidget(GT_Utility.trans("222", "Fluid threshold")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5, 4 + startY)); } @Override @@ -158,9 +158,7 @@ public class GT_Cover_WirelessFluidDetector coverData.threshold = (int) MathExpression.parseMathExpression(state); return coverData; }, - widget -> widget.setOnScrollNumbers() - .setNumbers(0, Integer.MAX_VALUE) - .setPos(1, 2) + widget -> widget.setOnScrollNumbers().setNumbers(0, Integer.MAX_VALUE).setPos(1, 2) .setSize(spaceX * 5 - 4, 12)); } } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java index 620f0bc35e..0b69150e86 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java @@ -1,5 +1,15 @@ package gregtech.common.covers.redstone; +import java.util.UUID; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.api.math.MathExpression; @@ -7,6 +17,7 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -19,13 +30,6 @@ import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import gregtech.common.gui.modularui.widget.ItemWatcherSlotWidget; import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalChestBase; import io.netty.buffer.ByteBuf; -import java.util.UUID; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; public class GT_Cover_WirelessItemDetector extends GT_Cover_AdvancedRedstoneTransmitterBase<GT_Cover_WirelessItemDetector.ItemTransmitterData> { @@ -45,15 +49,14 @@ public class GT_Cover_WirelessItemDetector } @Override - public ItemTransmitterData doCoverThingsImpl( - byte aSide, - byte aInputRedstone, - int aCoverID, - ItemTransmitterData aCoverVariable, - ICoverable aTileEntity, - long aTimer) { + public ItemTransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, + ItemTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { byte signal = GT_Cover_ItemMeter.computeSignalBasedOnItems( - aTileEntity, aCoverVariable.invert, aCoverVariable.threshold, aCoverVariable.slot, aSide); + aTileEntity, + aCoverVariable.invert, + aCoverVariable.threshold, + aCoverVariable.slot, + aSide); long hash = hashCoverCoords(aTileEntity, aSide); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); @@ -61,18 +64,19 @@ public class GT_Cover_WirelessItemDetector } @Override - public boolean letsRedstoneGoOutImpl( - byte aSide, int aCoverID, ItemTransmitterData aCoverVariable, ICoverable aTileEntity) { + public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, ItemTransmitterData aCoverVariable, + ICoverable aTileEntity) { return true; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl( - byte aSide, int aCoverID, ItemTransmitterData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, ItemTransmitterData aCoverVariable, + ICoverable aTileEntity) { return true; } public static class ItemTransmitterData extends GT_Cover_AdvancedRedstoneTransmitterBase.TransmitterData { + /** * The special value {@code -1} means all slots. */ @@ -169,32 +173,31 @@ public class GT_Cover_WirelessItemDetector protected void addUIWidgets(ModularWindow.Builder builder) { maxSlot = getMaxSlot(); super.addUIWidgets(builder); - builder.widget(new ItemWatcherSlotWidget() - .setGetter(this::getTargetItem) + builder.widget( + new ItemWatcherSlotWidget().setGetter(this::getTargetItem) .setPos(startX + spaceX * 4 - 1, startY + spaceY * 3)) - .widget(new TextWidget(GT_Utility.trans("221", "Item threshold")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2)) - .widget(new TextWidget(GT_Utility.trans("254.0", "Detect Slot")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5, 4 + startY + spaceY * 3)); + .widget( + new TextWidget(GT_Utility.trans("221", "Item threshold")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2)) + .widget( + new TextWidget(GT_Utility.trans("254.0", "Detect Slot")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5, 4 + startY + spaceY * 3)); } @Override protected void addUIForDataController(CoverDataControllerWidget<ItemTransmitterData> controller) { super.addUIForDataController(controller); - controller - .addFollower( - new CoverDataFollower_TextFieldWidget<>(), - coverData -> String.valueOf(coverData.threshold), - (coverData, state) -> { - coverData.threshold = (int) MathExpression.parseMathExpression(state); - return coverData; - }, - widget -> widget.setOnScrollNumbers(1, 10, 64) - .setNumbers(() -> 0, this::getMaxItemCount) - .setPos(1, 2 + spaceY * 2) - .setSize(spaceX * 5 - 4, 12)) + controller.addFollower( + new CoverDataFollower_TextFieldWidget<>(), + coverData -> String.valueOf(coverData.threshold), + (coverData, state) -> { + coverData.threshold = (int) MathExpression.parseMathExpression(state); + return coverData; + }, + widget -> widget.setOnScrollNumbers(1, 10, 64).setNumbers(() -> 0, this::getMaxItemCount) + .setPos(1, 2 + spaceY * 2).setSize(spaceX * 5 - 4, 12)) .addFollower( new CoverDataFollower_TextFieldWidget<>(), coverData -> getSlotTextFieldContent(coverData.slot), @@ -202,27 +205,23 @@ public class GT_Cover_WirelessItemDetector coverData.slot = getIntFromText(state); return coverData; }, - widget -> widget.setOnScrollText() - .setValidator(val -> { - final int valSlot = getIntFromText(val); - if (valSlot > -1) { - return TextFieldWidget.format.format(Math.min(valSlot, maxSlot)); - } else { - return ALL_TEXT; - } - }) - .setPattern(BaseTextFieldWidget.NATURAL_NUMS) - .setPos(1, 2 + spaceY * 3) + widget -> widget.setOnScrollText().setValidator(val -> { + final int valSlot = getIntFromText(val); + if (valSlot > -1) { + return TextFieldWidget.format.format(Math.min(valSlot, maxSlot)); + } else { + return ALL_TEXT; + } + }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setPos(1, 2 + spaceY * 3) .setSize(spaceX * 4 - 8, 12)); } private int getMaxSlot() { final ICoverable tile = getUIBuildContext().getTile(); - if (tile instanceof TileEntity - && !tile.isDead() + if (tile instanceof TileEntity && !tile.isDead() && tile instanceof IGregTechTileEntity - && !(((IGregTechTileEntity) tile).getMetaTileEntity() - instanceof GT_MetaTileEntity_DigitalChestBase)) { + && !(((IGregTechTileEntity) tile) + .getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase)) { return tile.getSizeInventory() - 1; } else { return -1; @@ -248,8 +247,7 @@ public class GT_Cover_WirelessItemDetector private ItemStack getTargetItem() { final ICoverable tile = getUIBuildContext().getTile(); final ItemTransmitterData coverVariable = getCoverData(); - if (coverVariable != null - && coverVariable.slot >= 0 + if (coverVariable != null && coverVariable.slot >= 0 && tile instanceof TileEntity && !tile.isDead() && tile.getSizeInventory() >= coverVariable.slot) { diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java index 598e289c66..085a7e1f4d 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java @@ -1,8 +1,18 @@ package gregtech.common.covers.redstone; +import java.util.UUID; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; + import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_CoverUIBuildContext; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -16,16 +26,9 @@ import gregtech.common.covers.GT_Cover_NeedMaintainance; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -import java.util.UUID; -import javax.annotation.Nonnull; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -public class GT_Cover_WirelessMaintenanceDetector - extends GT_Cover_AdvancedRedstoneTransmitterBase< - GT_Cover_WirelessMaintenanceDetector.MaintenanceTransmitterData> { +public class GT_Cover_WirelessMaintenanceDetector extends + GT_Cover_AdvancedRedstoneTransmitterBase<GT_Cover_WirelessMaintenanceDetector.MaintenanceTransmitterData> { public GT_Cover_WirelessMaintenanceDetector(ITexture coverTexture) { super(MaintenanceTransmitterData.class, coverTexture); @@ -41,8 +44,8 @@ public class GT_Cover_WirelessMaintenanceDetector return createDataObject(); } - private static byte computeSignalBasedOnMaintenance( - MaintenanceTransmitterData coverVariable, ICoverable tileEntity) { + private static byte computeSignalBasedOnMaintenance(MaintenanceTransmitterData coverVariable, + ICoverable tileEntity) { boolean signal = false; if (tileEntity instanceof IGregTechTileEntity) { @@ -73,9 +76,10 @@ public class GT_Cover_WirelessMaintenanceDetector if (coverVariable.mode == MaintenanceMode.ROTOR_80) { signal = current >= max * 8 / 10; } else { - long expectedDamage = Math.round(Math.min( - (double) multiTE.mEUt / multiTE.damageFactorLow, - Math.pow(multiTE.mEUt, multiTE.damageFactorHigh))); + long expectedDamage = Math.round( + Math.min( + (double) multiTE.mEUt / multiTE.damageFactorLow, + Math.pow(multiTE.mEUt, multiTE.damageFactorHigh))); signal = current + expectedDamage * 2 >= max; } } else { @@ -93,13 +97,8 @@ public class GT_Cover_WirelessMaintenanceDetector } @Override - public MaintenanceTransmitterData doCoverThingsImpl( - byte aSide, - byte aInputRedstone, - int aCoverID, - MaintenanceTransmitterData aCoverVariable, - ICoverable aTileEntity, - long aTimer) { + public MaintenanceTransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, + MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { byte signal = computeSignalBasedOnMaintenance(aCoverVariable, aTileEntity); long hash = hashCoverCoords(aTileEntity, aSide); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); @@ -108,20 +107,20 @@ public class GT_Cover_WirelessMaintenanceDetector } @Override - public boolean letsRedstoneGoOutImpl( - byte aSide, int aCoverID, MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity) { + public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, MaintenanceTransmitterData aCoverVariable, + ICoverable aTileEntity) { return true; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl( - byte aSide, int aCoverID, MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, + MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - public int getTickRateImpl( - byte aSide, int aCoverID, MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity) { + public int getTickRateImpl(byte aSide, int aCoverID, MaintenanceTransmitterData aCoverVariable, + ICoverable aTileEntity) { return 60; } @@ -137,6 +136,7 @@ public class GT_Cover_WirelessMaintenanceDetector } public static class MaintenanceTransmitterData extends GT_Cover_AdvancedRedstoneTransmitterBase.TransmitterData { + private MaintenanceMode mode; public MaintenanceTransmitterData(int frequency, UUID uuid, boolean invert, MaintenanceMode mode) { @@ -190,10 +190,8 @@ public class GT_Cover_WirelessMaintenanceDetector // GUI stuff - private static final String[] extraTexts = new String[] { - "No Issues", ">= 1 Issue", ">= 2 Issues", ">= 3 Issues", - ">= 4 Issues", ">= 5 Issues", "Rotor < 80%", "Rotor < 100%" - }; + private static final String[] extraTexts = new String[] { "No Issues", ">= 1 Issue", ">= 2 Issues", ">= 3 Issues", + ">= 4 Issues", ">= 5 Issues", "Rotor < 80%", "Rotor < 100%" }; @Override public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { @@ -225,9 +223,9 @@ public class GT_Cover_WirelessMaintenanceDetector protected void addUIWidgets(ModularWindow.Builder builder) { super.addUIWidgets(builder); for (int i = 0; i < 8; i++) { - builder.widget(new TextWidget(extraTexts[i]) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * (i % 2 == 0 ? 1 : 7), 4 + startY + spaceY * (2 + i / 2))); + builder.widget( + new TextWidget(extraTexts[i]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * (i % 2 == 0 ? 1 : 7), 4 + startY + spaceY * (2 + i / 2))); } } @@ -243,8 +241,8 @@ public class GT_Cover_WirelessMaintenanceDetector coverData.mode = MaintenanceMode.values()[index]; return coverData; }, - widget -> widget.setToggleTexture( - GT_UITextures.OVERLAY_BUTTON_CHECKMARK, GT_UITextures.TRANSPARENT) + widget -> widget + .setToggleTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK, GT_UITextures.TRANSPARENT) .setPos(spaceX * (index % 2 == 0 ? 0 : 6), spaceY * (2 + index / 2))); } } diff --git a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java index 5cb81ab20d..219cafdaf1 100644 --- a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java +++ b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java @@ -1,6 +1,7 @@ package gregtech.common.entities; import java.util.Random; + import net.minecraft.client.particle.EntityFX; import net.minecraft.world.World; 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 028b3199f7..5afd1b3b47 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java @@ -1,13 +1,8 @@ package gregtech.common.entities; -import com.mojang.authlib.GameProfile; -import gregtech.api.enums.ParticleFX; -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; @@ -30,7 +25,16 @@ import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.FakePlayerFactory; +import com.mojang.authlib.GameProfile; + +import gregtech.api.enums.ParticleFX; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; + public class GT_Entity_Arrow extends EntityArrow { + private int mHitBlockX = -1; private int mHitBlockY = -1; private int mHitBlockZ = -1; @@ -72,10 +76,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(); @@ -83,8 +87,8 @@ 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); + 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; @@ -106,21 +110,19 @@ 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)); + 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); @@ -141,9 +143,8 @@ 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; } } @@ -151,19 +152,17 @@ 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()) + 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 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)); } @@ -211,28 +210,26 @@ public class GT_Entity_Arrow extends EntityArrow { tPlayer.setDead(); } } - DamageSource tDamageSource = - DamageSource.causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity); + 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, @@ -250,12 +247,11 @@ public class GT_Entity_Arrow extends EntityArrow { : null, tHitLivingEntity, this.mArrow); - if ((tShootingEntity != null) - && (tHitLivingEntity != tShootingEntity) + if ((tShootingEntity != null) && (tHitLivingEntity != tShootingEntity) && ((tHitLivingEntity instanceof EntityPlayer)) && ((tShootingEntity instanceof EntityPlayerMP))) { - ((EntityPlayerMP) tShootingEntity) - .playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + ((EntityPlayerMP) tShootingEntity).playerNetServerHandler + .sendPacket(new S2BPacketChangeGameState(6, 0.0F)); } } if (((tShootingEntity instanceof EntityPlayer)) && (tMagicDamage > 0.0F)) { @@ -284,8 +280,8 @@ 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)); @@ -300,30 +296,41 @@ public class GT_Entity_Arrow extends EntityArrow { setIsCritical(false); if (this.mHitBlock.getMaterial() != Material.air) { this.mHitBlock.onEntityCollidedWithBlock( - this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, this); + 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); + 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()); + .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()); } this.posX += this.motionX; this.posY += this.motionY; @@ -331,12 +338,10 @@ public class GT_Entity_Arrow extends EntityArrow { 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) {} + 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; } @@ -350,8 +355,7 @@ public class GT_Entity_Arrow extends EntityArrow { this.rotationYaw = (this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F); float tFrictionMultiplier = 0.99F; if (isInWater()) { - events.setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ) - .setIdentifier(ParticleFX.BUBBLE) + events.setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ).setIdentifier(ParticleFX.BUBBLE) .setPosition( this.posX - this.motionX * 0.25D, this.posY - this.motionY * 0.25D, @@ -405,8 +409,7 @@ public class GT_Entity_Arrow extends EntityArrow { @Override public void onCollideWithPlayer(EntityPlayer aPlayer) { - if ((!this.worldObj.isRemote) - && (this.inGround) + if ((!this.worldObj.isRemote) && (this.inGround) && (this.arrowShake <= 0) && (this.canBePickedUp == 1) && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) { @@ -416,16 +419,9 @@ public class GT_Entity_Arrow extends EntityArrow { } } - 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 ec98099ba8..e44129d245 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 @@ -8,6 +8,7 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; public class GT_Entity_Arrow_Potion extends GT_Entity_Arrow { + private int[] mPotions = new int[0]; public GT_Entity_Arrow_Potion(World aWorld) { @@ -50,25 +51,28 @@ 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); + aHitEntity, + aShootingEntity, + aArrow, + 1, + aMagicDamage, + aKnockback, + aFireDamage, + aHitTimer); } } diff --git a/src/main/java/gregtech/common/fluid/GT_Fluid.java b/src/main/java/gregtech/common/fluid/GT_Fluid.java index 10caccbcd0..e4503f95ea 100644 --- a/src/main/java/gregtech/common/fluid/GT_Fluid.java +++ b/src/main/java/gregtech/common/fluid/GT_Fluid.java @@ -1,5 +1,14 @@ package gregtech.common.fluid; +import javax.annotation.Nonnull; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.FluidState; import gregtech.api.enums.GT_Values; @@ -8,15 +17,9 @@ import gregtech.api.interfaces.fluid.IGT_Fluid; import gregtech.api.interfaces.fluid.IGT_RegisteredFluid; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; -import javax.annotation.Nonnull; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, Runnable { + private final String localizedName; private final ResourceLocation stillIconResourceLocation; private final ResourceLocation flowingIconResourceLocation; @@ -79,8 +82,7 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, R */ @Override public int getColor() { - return (Math.max(0, Math.min(255, colorRGBA[0])) << 16) - | (Math.max(0, Math.min(255, colorRGBA[1])) << 8) + return (Math.max(0, Math.min(255, colorRGBA[0])) << 16) | (Math.max(0, Math.min(255, colorRGBA[1])) << 8) | Math.max(0, Math.min(255, colorRGBA[2])); } @@ -111,13 +113,16 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, R * @inheritDoc */ @Override - public IGT_RegisteredFluid registerContainers( - final ItemStack fullContainer, final ItemStack emptyContainer, final int containerSize) { + public IGT_RegisteredFluid registerContainers(final ItemStack fullContainer, final ItemStack emptyContainer, + final int containerSize) { if (fullContainer != null && emptyContainer != null) { final FluidStack fluidStack = new FluidStack(registeredFluid, containerSize); if (!FluidContainerRegistry.registerFluidContainer(fluidStack, fullContainer, emptyContainer)) { GT_Values.RA.addFluidCannerRecipe( - fullContainer, GT_Utility.getContainerItem(fullContainer, false), null, fluidStack); + fullContainer, + GT_Utility.getContainerItem(fullContainer, false), + null, + fluidStack); } } return this; @@ -179,8 +184,8 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, R // ----- Runnable interface implementations ----- /** - * This {@link Runnable#run()} implementation is scheduled within the {@link GregTech_API#sGTBlockIconload} - * to load this {@link IGT_Fluid}'s texture icons. + * This {@link Runnable#run()} implementation is scheduled within the {@link GregTech_API#sGTBlockIconload} to load + * this {@link IGT_Fluid}'s texture icons. * * @see Runnable#run() */ diff --git a/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java b/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java index 48d4e0e95e..f3effb0c99 100644 --- a/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java +++ b/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java @@ -2,19 +2,23 @@ package gregtech.common.fluid; import static gregtech.api.enums.GT_Values.MOD_ID; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.FluidState; -import gregtech.api.interfaces.fluid.IGT_Fluid; -import gregtech.api.interfaces.fluid.IGT_FluidBuilder; -import gregtech.api.interfaces.fluid.IGT_RegisteredFluid; import java.util.Locale; + import javax.annotation.Nonnull; + import net.minecraft.block.Block; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.FluidState; +import gregtech.api.interfaces.fluid.IGT_Fluid; +import gregtech.api.interfaces.fluid.IGT_FluidBuilder; +import gregtech.api.interfaces.fluid.IGT_RegisteredFluid; + public class GT_FluidBuilder implements IGT_FluidBuilder { + final String fluidName; String localizedName; ResourceLocation stillIconResourceLocation = null, flowingIconResourceLocation = null; @@ -108,8 +112,8 @@ public class GT_FluidBuilder implements IGT_FluidBuilder { * @inheritDoc */ @Override - public IGT_FluidBuilder withTextures( - final ResourceLocation stillIconResourceLocation, final ResourceLocation flowingIconResourceLocation) { + public IGT_FluidBuilder withTextures(final ResourceLocation stillIconResourceLocation, + final ResourceLocation flowingIconResourceLocation) { this.stillIconResourceLocation = stillIconResourceLocation; this.flowingIconResourceLocation = flowingIconResourceLocation; return this; diff --git a/src/main/java/gregtech/common/gui/modularui/UIHelper.java b/src/main/java/gregtech/common/gui/modularui/UIHelper.java index 42d704bbf4..8973992c28 100644 --- a/src/main/java/gregtech/common/gui/modularui/UIHelper.java +++ b/src/main/java/gregtech/common/gui/modularui/UIHelper.java @@ -1,38 +1,30 @@ package gregtech.common.gui.modularui; -import com.gtnewhorizons.modularui.api.drawable.IDrawable; -import com.gtnewhorizons.modularui.api.math.Pos2d; -import gregtech.api.enums.SteamVariant; -import gregtech.api.gui.modularui.SteamTexture; -import gregtech.api.util.GT_Recipe; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; + import javax.annotation.Nullable; +import com.gtnewhorizons.modularui.api.drawable.IDrawable; +import com.gtnewhorizons.modularui.api.math.Pos2d; + +import gregtech.api.enums.SteamVariant; +import gregtech.api.gui.modularui.SteamTexture; +import gregtech.api.util.GT_Recipe; + public class UIHelper { /** * Iterates over candidates for slot placement. */ - public static void forEachSlots( - ForEachSlot forEachItemInputSlot, - ForEachSlot forEachItemOutputSlot, - ForEachSlot forEachSpecialSlot, - ForEachSlot forEachFluidInputSlot, - ForEachSlot forEachFluidOutputSlot, - IDrawable itemSlotBackground, - IDrawable fluidSlotBackground, - @Nullable GT_Recipe.GT_Recipe_Map recipeMap, - int itemInputCount, - int itemOutputCount, - int fluidInputCount, - int fluidOutputCount, - SteamVariant steamVariant, - Pos2d offset) { - List<Pos2d> itemInputPositions = recipeMap != null - ? recipeMap.getItemInputPositions(itemInputCount) + public static void forEachSlots(ForEachSlot forEachItemInputSlot, ForEachSlot forEachItemOutputSlot, + ForEachSlot forEachSpecialSlot, ForEachSlot forEachFluidInputSlot, ForEachSlot forEachFluidOutputSlot, + IDrawable itemSlotBackground, IDrawable fluidSlotBackground, @Nullable GT_Recipe.GT_Recipe_Map recipeMap, + int itemInputCount, int itemOutputCount, int fluidInputCount, int fluidOutputCount, + SteamVariant steamVariant, Pos2d offset) { + List<Pos2d> itemInputPositions = recipeMap != null ? recipeMap.getItemInputPositions(itemInputCount) : UIHelper.getItemInputPositions(itemInputCount); itemInputPositions = itemInputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList()); for (int i = 0; i < itemInputPositions.size(); i++) { @@ -42,11 +34,9 @@ public class UIHelper { itemInputPositions.get(i)); } - List<Pos2d> itemOutputPositions = recipeMap != null - ? recipeMap.getItemOutputPositions(itemOutputCount) + List<Pos2d> itemOutputPositions = recipeMap != null ? recipeMap.getItemOutputPositions(itemOutputCount) : UIHelper.getItemOutputPositions(itemOutputCount); - itemOutputPositions = - itemOutputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList()); + itemOutputPositions = itemOutputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList()); for (int i = 0; i < itemOutputPositions.size(); i++) { forEachItemOutputSlot.accept( i, @@ -60,11 +50,9 @@ public class UIHelper { (recipeMap != null ? recipeMap.getSpecialItemPosition() : UIHelper.getSpecialItemPosition()) .add(offset)); - List<Pos2d> fluidInputPositions = recipeMap != null - ? recipeMap.getFluidInputPositions(fluidInputCount) + List<Pos2d> fluidInputPositions = recipeMap != null ? recipeMap.getFluidInputPositions(fluidInputCount) : UIHelper.getFluidInputPositions(fluidInputCount); - fluidInputPositions = - fluidInputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList()); + fluidInputPositions = fluidInputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList()); for (int i = 0; i < fluidInputPositions.size(); i++) { forEachFluidInputSlot.accept( i, @@ -72,11 +60,9 @@ public class UIHelper { fluidInputPositions.get(i)); } - List<Pos2d> fluidOutputPositions = recipeMap != null - ? recipeMap.getFluidOutputPositions(fluidOutputCount) + List<Pos2d> fluidOutputPositions = recipeMap != null ? recipeMap.getFluidOutputPositions(fluidOutputCount) : UIHelper.getFluidOutputPositions(fluidOutputCount); - fluidOutputPositions = - fluidOutputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList()); + fluidOutputPositions = fluidOutputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList()); for (int i = 0; i < fluidOutputPositions.size(); i++) { forEachFluidOutputSlot.accept( i, @@ -164,16 +150,15 @@ public class UIHelper { return results; } - public static List<Pos2d> getGridPositions( - int totalCount, int xOrigin, int yOrigin, int xDirMaxCount, int yDirMaxCount) { + public static List<Pos2d> getGridPositions(int totalCount, int xOrigin, int yOrigin, int xDirMaxCount, + int yDirMaxCount) { // 18 pixels to get to a new grid for placing an item tile since they are 16x16 and have 1 pixel buffers // around them. int distance = 18; List<Pos2d> results = new ArrayList<>(); int count = 0; - loop: - for (int j = 0; j < yDirMaxCount; j++) { + loop: for (int j = 0; j < yDirMaxCount; j++) { for (int i = 0; i < xDirMaxCount; i++) { if (count >= totalCount) break loop; results.add(new Pos2d(xOrigin + i * distance, yOrigin + j * distance)); @@ -191,19 +176,13 @@ public class UIHelper { * @deprecated Renamed to {@link #getGridPositions} */ @Deprecated - public static List<Pos2d> getItemGridPositions( - int itemCount, int xOrigin, int yOrigin, int xDirMaxCount, int yDirMaxCount) { + public static List<Pos2d> getItemGridPositions(int itemCount, int xOrigin, int yOrigin, int xDirMaxCount, + int yDirMaxCount) { return getGridPositions(itemCount, xOrigin, yOrigin, xDirMaxCount, yDirMaxCount); } - private static IDrawable[] getBackgroundsForSlot( - IDrawable base, - GT_Recipe.GT_Recipe_Map recipeMap, - boolean isFluid, - boolean isOutput, - int index, - boolean isSpecial, - SteamVariant steamVariant) { + private static IDrawable[] getBackgroundsForSlot(IDrawable base, GT_Recipe.GT_Recipe_Map recipeMap, boolean isFluid, + boolean isOutput, int index, boolean isSpecial, SteamVariant steamVariant) { if (recipeMap != null) { IDrawable overlay; if (steamVariant != SteamVariant.NONE) { @@ -217,14 +196,15 @@ public class UIHelper { overlay = recipeMap.getOverlayForSlot(isFluid, isOutput, index, isSpecial); } if (overlay != null) { - return new IDrawable[] {base, overlay}; + return new IDrawable[] { base, overlay }; } } - return new IDrawable[] {base}; + return new IDrawable[] { base }; } @FunctionalInterface public interface ForEachSlot { + void accept(int index, IDrawable[] backgrounds, Pos2d pos); } } diff --git a/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java b/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java index c3161b3f5e..00cfcf9d6d 100644 --- a/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java +++ b/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java @@ -1,5 +1,15 @@ package gregtech.common.gui.modularui.uifactory; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.Consumer; +import java.util.function.Supplier; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; + import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; @@ -11,23 +21,15 @@ import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; import com.gtnewhorizons.modularui.common.widget.ButtonWidget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.enums.Dyes; import gregtech.api.gui.GT_GUIColorOverride; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; -import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Consumer; -import java.util.function.Supplier; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; /** - * Creates UI for selecting item from given list. - * This is client-only UI to allow using client-preferred settings. + * Creates UI for selecting item from given list. This is client-only UI to allow using client-preferred settings. */ public class SelectItemUIFactory { @@ -55,36 +57,31 @@ public class SelectItemUIFactory { private final Supplier<Integer> COLOR_TITLE = () -> getTextColorOrDefault("title", 0x222222); private final Supplier<Integer> COLOR_TEXT_GRAY = () -> getTextColorOrDefault("text_gray", 0x555555); - public SelectItemUIFactory( - String header, ItemStack headerItem, Consumer<ItemStack> selectedCallback, List<ItemStack> stacks) { + public SelectItemUIFactory(String header, ItemStack headerItem, Consumer<ItemStack> selectedCallback, + List<ItemStack> stacks) { this(header, headerItem, selectedCallback, stacks, UNSELECTED); } - public SelectItemUIFactory( - String header, - ItemStack headerItem, - Consumer<ItemStack> selectedCallback, - List<ItemStack> stacks, - int selected) { + public SelectItemUIFactory(String header, ItemStack headerItem, Consumer<ItemStack> selectedCallback, + List<ItemStack> stacks, int selected) { this(header, headerItem, selectedCallback, stacks, selected, false); } /** - * Constructor for a dialog to select an item from given list. Given callback may be called zero or more times depending on user action. + * Constructor for 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 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 + * @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 SelectItemUIFactory( - String header, - ItemStack headerItem, - Consumer<ItemStack> selectedCallback, - List<ItemStack> stacks, - int selected, - boolean noDeselect) { + public SelectItemUIFactory(String header, ItemStack headerItem, Consumer<ItemStack> selectedCallback, + List<ItemStack> stacks, int selected, boolean noDeselect) { this.header = header; this.headerItem = headerItem; this.selectedCallback = selectedCallback; @@ -96,7 +93,8 @@ public class SelectItemUIFactory { /** * @param anotherWindow If UI is shown on top of another window - * @param dialogOpened Flag to store whether this UI is opened and hence it should block duplicated creation of this UI + * @param dialogOpened Flag to store whether this UI is opened and hence it should block duplicated creation of + * this UI */ public SelectItemUIFactory setAnotherWindow(boolean anotherWindow, AtomicBoolean dialogOpened) { this.anotherWindow = anotherWindow; @@ -118,8 +116,8 @@ public class SelectItemUIFactory { } public ModularWindow createWindow(UIBuildContext buildContext) { - ModularWindow.Builder builder = - ModularWindow.builder(getGUIWidth(), 53 + 18 * ((stacks.size() - 1) / cols + 1)); + ModularWindow.Builder builder = ModularWindow + .builder(getGUIWidth(), 53 + 18 * ((stacks.size() - 1) / cols + 1)); builder.setBackground(ModularUITextures.VANILLA_BACKGROUND); builder.setGuiTint(guiTint); @@ -128,33 +126,29 @@ public class SelectItemUIFactory { } builder.widget(new TextWidget(header).setDefaultColor(COLOR_TITLE.get()).setPos(25, 9)); - builder.widget( - new SlotWidget(BaseSlot.phantom(currentDisplayItemHandler, 0)) { - @Override - public void draw(float partialTicks) { - if (currentGetter != null) { - ItemStack current = currentGetter.get(); - currentDisplayItemHandler.setStackInSlot(0, current); - selected = GT_Utility.findMatchingStackInList(stacks, current); - } - super.draw(partialTicks); - } - }.disableInteraction() - .setBackground(GT_UITextures.SLOT_DARK_GRAY) - .setPos( - 9 - + getFontRenderer() - .getStringWidth(StatCollector.translateToLocal( - "GT5U.gui.select.current")), - 24)) - .widget(new TextWidget(StatCollector.translateToLocal("GT5U.gui.select.current")) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(8, 25 + (18 - getFontRenderer().FONT_HEIGHT) / 2)); + builder.widget(new SlotWidget(BaseSlot.phantom(currentDisplayItemHandler, 0)) { + + @Override + public void draw(float partialTicks) { + if (currentGetter != null) { + ItemStack current = currentGetter.get(); + currentDisplayItemHandler.setStackInSlot(0, current); + selected = GT_Utility.findMatchingStackInList(stacks, current); + } + super.draw(partialTicks); + } + }.disableInteraction().setBackground(GT_UITextures.SLOT_DARK_GRAY).setPos( + 9 + getFontRenderer().getStringWidth(StatCollector.translateToLocal("GT5U.gui.select.current")), + 24)).widget( + new TextWidget(StatCollector.translateToLocal("GT5U.gui.select.current")) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(8, 25 + (18 - getFontRenderer().FONT_HEIGHT) / 2)); for (int i = 0; i < stacks.size(); i++) { final int index = i; builder.widget( - new SlotWidget(new BaseSlot(new ItemStackHandler(new ItemStack[] {stacks.get(index)}), 0, true)) { + new SlotWidget(new BaseSlot(new ItemStackHandler(new ItemStack[] { stacks.get(index) }), 0, true)) { + @Override public ClickResult onClick(int buttonId, boolean doubleClick) { if (buttonId == 0) { @@ -171,24 +165,22 @@ public class SelectItemUIFactory { @Override public IDrawable[] getBackground() { return new IDrawable[] { - index == selected ? GT_UITextures.SLOT_DARK_GRAY : ModularUITextures.ITEM_SLOT - }; + index == selected ? GT_UITextures.SLOT_DARK_GRAY : ModularUITextures.ITEM_SLOT }; } }.disableInteraction().setPos(7 + 18 * (index % cols), 43 + 18 * (index / cols))); } if (anotherWindow) { dialogOpened.set(true); - builder.widget( - new ButtonWidget() { - @Override - public void onDestroy() { - dialogOpened.set(false); - } - }.setOnClick((clickData, widget) -> widget.getWindow().tryClose()) - .setBackground(ModularUITextures.VANILLA_BACKGROUND, new Text("x")) - .setPos(getGUIWidth() - 15, 3) - .setSize(12, 12)); + builder.widget(new ButtonWidget() { + + @Override + public void onDestroy() { + dialogOpened.set(false); + } + }.setOnClick((clickData, widget) -> widget.getWindow().tryClose()) + .setBackground(ModularUITextures.VANILLA_BACKGROUND, new Text("x")).setPos(getGUIWidth() - 15, 3) + .setSize(12, 12)); } return builder.build(); diff --git a/src/main/java/gregtech/common/gui/modularui/widget/AESlotWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/AESlotWidget.java index f3620d3234..386bb7112c 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/AESlotWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/AESlotWidget.java @@ -1,15 +1,18 @@ package gregtech.common.gui.modularui.widget; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.inventory.Slot; + import appeng.client.render.AppEngRenderItem; import appeng.core.AELog; import appeng.util.Platform; + import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; import com.gtnewhorizons.modularui.common.internal.wrapper.ModularGui; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.inventory.Slot; public class AESlotWidget extends SlotWidget { diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java index 599ed28a5f..70978351c2 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java @@ -1,26 +1,28 @@ package gregtech.common.gui.modularui.widget; +import org.lwjgl.opengl.GL11; + import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.modularui.GT_UITextures; -import org.lwjgl.opengl.GL11; /** - * Fires click action on mouse release, not on press. - * Draws different backgrounds depending on whether the mouse is being pressed or the widget is hovered. + * Fires click action on mouse release, not on press. Draws different backgrounds depending on whether the mouse is + * being pressed or the widget is hovered. */ public class CoverCycleButtonWidget extends CycleButtonWidget { - private static final UITexture BUTTON_NORMAL_NOT_PRESSED = - GT_UITextures.BUTTON_COVER_NORMAL.getSubArea(0, 0, 1, 0.5f); + private static final UITexture BUTTON_NORMAL_NOT_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL + .getSubArea(0, 0, 1, 0.5f); private static final UITexture BUTTON_NORMAL_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL.getSubArea(0, 0.5f, 1, 1); - private static final UITexture BUTTON_HOVERED_NOT_PRESSED = - GT_UITextures.BUTTON_COVER_NORMAL_HOVERED.getSubArea(0, 0, 1, 0.5f); - private static final UITexture BUTTON_HOVERED_PRESSED = - GT_UITextures.BUTTON_COVER_NORMAL_HOVERED.getSubArea(0, 0.5f, 1, 1); + private static final UITexture BUTTON_HOVERED_NOT_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL_HOVERED + .getSubArea(0, 0, 1, 0.5f); + private static final UITexture BUTTON_HOVERED_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL_HOVERED + .getSubArea(0, 0.5f, 1, 1); private boolean clickPressed; @@ -74,15 +76,15 @@ public class CoverCycleButtonWidget extends CycleButtonWidget { public IDrawable[] getBackground() { if (isHovering()) { if (clickPressed) { - return new IDrawable[] {BUTTON_HOVERED_PRESSED}; + return new IDrawable[] { BUTTON_HOVERED_PRESSED }; } else { - return new IDrawable[] {BUTTON_HOVERED_NOT_PRESSED}; + return new IDrawable[] { BUTTON_HOVERED_NOT_PRESSED }; } } else { if (clickPressed) { - return new IDrawable[] {BUTTON_NORMAL_PRESSED}; + return new IDrawable[] { BUTTON_NORMAL_PRESSED }; } else { - return new IDrawable[] {BUTTON_NORMAL_NOT_PRESSED}; + return new IDrawable[] { BUTTON_NORMAL_NOT_PRESSED }; } } } diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataControllerWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataControllerWidget.java index d28117054a..3fa25abdbf 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataControllerWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataControllerWidget.java @@ -1,35 +1,38 @@ package gregtech.common.gui.modularui.widget; -import com.gtnewhorizons.modularui.api.widget.Widget; -import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; -import gregtech.api.gui.modularui.IDataFollowerWidget; -import gregtech.api.util.GT_CoverBehaviorBase; -import gregtech.api.util.ISerializableObject; import java.io.IOException; import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; + import net.minecraft.network.PacketBuffer; +import com.gtnewhorizons.modularui.api.widget.Widget; +import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; + +import gregtech.api.gui.modularui.IDataFollowerWidget; +import gregtech.api.util.GT_CoverBehaviorBase; +import gregtech.api.util.ISerializableObject; + public class CoverDataControllerWidget<T extends ISerializableObject> extends DataControllerWidget<T> { protected final GT_CoverBehaviorBase<T> coverBehavior; /** - * @param dataGetter () -> cover data this widget handles - * @param dataSetter data to set -> if setting cover data is successful + * @param dataGetter () -> cover data this widget handles + * @param dataSetter data to set -> if setting cover data is successful * @param coverBehavior cover this widget handles data update */ - public CoverDataControllerWidget( - Supplier<T> dataGetter, Function<T, Boolean> dataSetter, GT_CoverBehaviorBase<T> coverBehavior) { + public CoverDataControllerWidget(Supplier<T> dataGetter, Function<T, Boolean> dataSetter, + GT_CoverBehaviorBase<T> coverBehavior) { super(dataGetter, dataSetter); this.coverBehavior = coverBehavior; } @Override - public <U, W extends Widget & IDataFollowerWidget<T, U>> CoverDataControllerWidget<T> addFollower( - W widget, Function<T, U> dataToStateGetter, BiFunction<T, U, T> dataUpdater, Consumer<W> applyForWidget) { + public <U, W extends Widget & IDataFollowerWidget<T, U>> CoverDataControllerWidget<T> addFollower(W widget, + Function<T, U> dataToStateGetter, BiFunction<T, U, T> dataUpdater, Consumer<W> applyForWidget) { super.addFollower(widget, dataToStateGetter, dataUpdater, applyForWidget); return this; } @@ -58,31 +61,27 @@ public class CoverDataControllerWidget<T extends ISerializableObject> extends Da private final BiFunction<Integer, T, T> dataUpdater; /** - * @param coverDataGetter () -> cover data this widget handles - * @param coverDataSetter data to set -> if setting cover data is successful - * @param coverBehavior cover this widget handles data update + * @param coverDataGetter () -> cover data this widget handles + * @param coverDataSetter data to set -> if setting cover data is successful + * @param coverBehavior cover this widget handles data update * @param dataToStateGetter (index of button, given cover data) -> button state - * @param dataUpdater (index of button, current cover data) -> new cover data + * @param dataUpdater (index of button, current cover data) -> new cover data */ - public CoverDataIndexedControllerWidget_ToggleButtons( - Supplier<T> coverDataGetter, - Function<T, Boolean> coverDataSetter, - GT_CoverBehaviorBase<T> coverBehavior, - BiFunction<Integer, T, Boolean> dataToStateGetter, - BiFunction<Integer, T, T> dataUpdater) { + public CoverDataIndexedControllerWidget_ToggleButtons(Supplier<T> coverDataGetter, + Function<T, Boolean> coverDataSetter, GT_CoverBehaviorBase<T> coverBehavior, + BiFunction<Integer, T, Boolean> dataToStateGetter, BiFunction<Integer, T, T> dataUpdater) { super(coverDataGetter, coverDataSetter, coverBehavior); this.dataToStateGetter = dataToStateGetter; this.dataUpdater = dataUpdater; } /** - * @param index index of widget to add - * @param widget widget to add + * @param index index of widget to add + * @param widget widget to add * @param applyForWidget methods to call for widget to add */ - public <W extends CoverDataFollower_ToggleButtonWidget<T>> - CoverDataIndexedControllerWidget_ToggleButtons<T> addToggleButton( - int index, W widget, Consumer<CoverDataFollower_ToggleButtonWidget<T>> applyForWidget) { + public <W extends CoverDataFollower_ToggleButtonWidget<T>> CoverDataIndexedControllerWidget_ToggleButtons<T> addToggleButton( + int index, W widget, Consumer<CoverDataFollower_ToggleButtonWidget<T>> applyForWidget) { addFollower( widget, data -> dataToStateGetter.apply(index, data), @@ -102,31 +101,27 @@ public class CoverDataControllerWidget<T extends ISerializableObject> extends Da private final BiFunction<Integer, T, T> dataUpdater; /** - * @param coverDataGetter () -> cover data this widget handles - * @param coverDataSetter data to set -> if setting cover data is successful - * @param coverBehavior cover this widget handles data update + * @param coverDataGetter () -> cover data this widget handles + * @param coverDataSetter data to set -> if setting cover data is successful + * @param coverBehavior cover this widget handles data update * @param dataToStateGetter (index of button, given cover data) -> button state - * @param dataUpdater (index of button, current cover data) -> new cover data + * @param dataUpdater (index of button, current cover data) -> new cover data */ - public CoverDataIndexedControllerWidget_CycleButtons( - Supplier<T> coverDataGetter, - Function<T, Boolean> coverDataSetter, - GT_CoverBehaviorBase<T> coverBehavior, - BiFunction<Integer, T, Integer> dataToStateGetter, - BiFunction<Integer, T, T> dataUpdater) { + public CoverDataIndexedControllerWidget_CycleButtons(Supplier<T> coverDataGetter, + Function<T, Boolean> coverDataSetter, GT_CoverBehaviorBase<T> coverBehavior, + BiFunction<Integer, T, Integer> dataToStateGetter, BiFunction<Integer, T, T> dataUpdater) { super(coverDataGetter, coverDataSetter, coverBehavior); this.dataToStateGetter = dataToStateGetter; this.dataUpdater = dataUpdater; } /** - * @param index index of widget to add - * @param widget widget to add + * @param index index of widget to add + * @param widget widget to add * @param applyForWidget methods to call for the widget to add */ - public <W extends CoverDataFollower_CycleButtonWidget<T>> - CoverDataIndexedControllerWidget_CycleButtons<T> addCycleButton( - int index, W widget, Consumer<CoverDataFollower_CycleButtonWidget<T>> applyForWidget) { + public <W extends CoverDataFollower_CycleButtonWidget<T>> CoverDataIndexedControllerWidget_CycleButtons<T> addCycleButton( + int index, W widget, Consumer<CoverDataFollower_CycleButtonWidget<T>> applyForWidget) { addFollower( widget, data -> dataToStateGetter.apply(index, data), diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_CycleButtonWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_CycleButtonWidget.java index d07165cc6e..6e69b1ff79 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_CycleButtonWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_CycleButtonWidget.java @@ -1,10 +1,11 @@ package gregtech.common.gui.modularui.widget; -import gregtech.api.gui.modularui.IDataFollowerWidget; -import gregtech.api.util.ISerializableObject; import java.util.function.Consumer; import java.util.function.Function; +import gregtech.api.gui.modularui.IDataFollowerWidget; +import gregtech.api.util.ISerializableObject; + /** * Determines button state with cover data. */ diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_SlotWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_SlotWidget.java index c09c5b5279..c7795efbdc 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_SlotWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_SlotWidget.java @@ -1,15 +1,18 @@ package gregtech.common.gui.modularui.widget; +import java.io.IOException; +import java.util.function.Consumer; +import java.util.function.Function; + +import net.minecraft.item.ItemStack; + import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; import com.gtnewhorizons.modularui.api.widget.Interactable; import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import gregtech.api.gui.modularui.IDataFollowerWidget; import gregtech.api.util.ISerializableObject; -import java.io.IOException; -import java.util.function.Consumer; -import java.util.function.Function; -import net.minecraft.item.ItemStack; public class CoverDataFollower_SlotWidget<T extends ISerializableObject> extends SlotWidget implements IDataFollowerWidget<T, ItemStack> { diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_TextFieldWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_TextFieldWidget.java index 9130f8e3d0..7d11656231 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_TextFieldWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_TextFieldWidget.java @@ -1,15 +1,18 @@ package gregtech.common.gui.modularui.widget; +import java.util.function.Consumer; +import java.util.function.Function; + +import net.minecraft.client.gui.GuiScreen; + import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.math.Color; import com.gtnewhorizons.modularui.api.math.MathExpression; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; + import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.gui.modularui.IDataFollowerWidget; import gregtech.api.util.ISerializableObject; -import java.util.function.Consumer; -import java.util.function.Function; -import net.minecraft.client.gui.GuiScreen; public class CoverDataFollower_TextFieldWidget<T extends ISerializableObject> extends TextFieldWidget implements IDataFollowerWidget<T, String> { diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java index 8e091d7bc6..cb5fbf7994 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java @@ -1,11 +1,13 @@ package gregtech.common.gui.modularui.widget; +import java.util.function.Consumer; +import java.util.function.Function; + import com.gtnewhorizons.modularui.api.drawable.IDrawable; + import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.gui.modularui.IDataFollowerWidget; import gregtech.api.util.ISerializableObject; -import java.util.function.Consumer; -import java.util.function.Function; public class CoverDataFollower_ToggleButtonWidget<T extends ISerializableObject> extends CoverCycleButtonWidget implements IDataFollowerWidget<T, Boolean> { @@ -77,7 +79,7 @@ public class CoverDataFollower_ToggleButtonWidget<T extends ISerializableObject> @Override public IDrawable[] getBackground() { - if (!canClick()) return new IDrawable[] {GT_UITextures.BUTTON_COVER_NORMAL_DISABLED}; + if (!canClick()) return new IDrawable[] { GT_UITextures.BUTTON_COVER_NORMAL_DISABLED }; return super.getBackground(); } } diff --git a/src/main/java/gregtech/common/gui/modularui/widget/DataControllerWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/DataControllerWidget.java index f29b8eeaf9..4e9ac4a245 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/DataControllerWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/DataControllerWidget.java @@ -1,26 +1,31 @@ package gregtech.common.gui.modularui.widget; +import java.io.IOException; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; + +import net.minecraft.network.PacketBuffer; + import com.gtnewhorizons.modularui.api.widget.ISyncedWidget; import com.gtnewhorizons.modularui.api.widget.Widget; import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; import com.gtnewhorizons.modularui.common.widget.MultiChildWidget; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.modularui.IDataFollowerWidget; import gregtech.api.util.ISerializableObject; -import java.io.IOException; -import java.util.function.BiFunction; -import java.util.function.Consumer; -import java.util.function.Function; -import java.util.function.Supplier; -import net.minecraft.network.PacketBuffer; /** - * Controls state of child widgets with specific data, and allows centralized control of multiple widgets. - * e.g. clicking button B will set machine mode to B, so button A, whose state is bound to the mode, - * will be automatically deactivated by this widget. - * <br> This widget wraps data and handles validation, e.g. tell client to close GUI when tile is broken or cover is removed. - * <br> Data can be anything, e.g. {@link ISerializableObject} or machine recipe mode. + * Controls state of child widgets with specific data, and allows centralized control of multiple widgets. e.g. clicking + * button B will set machine mode to B, so button A, whose state is bound to the mode, will be automatically deactivated + * by this widget. <br> + * This widget wraps data and handles validation, e.g. tell client to close GUI when tile is broken or cover is removed. + * <br> + * Data can be anything, e.g. {@link ISerializableObject} or machine recipe mode. + * * @param <T> Data type stored in this widget * @see IDataFollowerWidget */ @@ -139,15 +144,15 @@ public abstract class DataControllerWidget<T> extends MultiChildWidget implement } /** - * @param widget widget to add that implements {@link IDataFollowerWidget} + * @param widget widget to add that implements {@link IDataFollowerWidget} * @param dataToStateGetter given data -> state of the widget to add - * @param dataUpdater (current data, state of the widget to add) -> new data to set - * @param applyForWidget methods to call for the widget to add - * @param <U> state type stored in the widget to add - * @param <W> widget type to add + * @param dataUpdater (current data, state of the widget to add) -> new data to set + * @param applyForWidget methods to call for the widget to add + * @param <U> state type stored in the widget to add + * @param <W> widget type to add */ - public <U, W extends Widget & IDataFollowerWidget<T, U>> DataControllerWidget<T> addFollower( - W widget, Function<T, U> dataToStateGetter, BiFunction<T, U, T> dataUpdater, Consumer<W> applyForWidget) { + public <U, W extends Widget & IDataFollowerWidget<T, U>> DataControllerWidget<T> addFollower(W widget, + Function<T, U> dataToStateGetter, BiFunction<T, U, T> dataUpdater, Consumer<W> applyForWidget) { widget.setDataToStateGetter(dataToStateGetter); widget.setStateSetter(state -> { T newData = dataUpdater.apply(getLastData(), state); diff --git a/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java index 688800e4ef..182f007b33 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java @@ -1,19 +1,12 @@ package gregtech.common.gui.modularui.widget; -import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; -import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; -import com.gtnewhorizons.modularui.common.widget.SlotWidget; -import gregtech.GT_Mod; -import gregtech.api.interfaces.IFluidAccess; -import gregtech.api.interfaces.IHasFluidDisplayItem; -import gregtech.api.interfaces.metatileentity.IFluidLockable; -import gregtech.api.util.GT_Utility; import java.io.IOException; import java.util.Collections; import java.util.List; import java.util.function.BiFunction; import java.util.function.Predicate; import java.util.function.Supplier; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; @@ -22,6 +15,16 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; +import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; +import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; + +import gregtech.GT_Mod; +import gregtech.api.interfaces.IFluidAccess; +import gregtech.api.interfaces.IHasFluidDisplayItem; +import gregtech.api.interfaces.metatileentity.IFluidLockable; +import gregtech.api.util.GT_Utility; + public class FluidDisplaySlotWidget extends SlotWidget { private IHasFluidDisplayItem iHasFluidDisplay; @@ -57,11 +60,10 @@ public class FluidDisplaySlotWidget extends SlotWidget { if (interactionDisabled) return ClickResult.REJECT; /* - * While a logical client don't really need to process fluid cells upon click (it could have just wait - * for server side to send the result), doing so would result in every fluid interaction having a - * noticeable delay between clicking and changes happening even on single player. - * 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 + * While a logical client don't really need to process fluid cells upon click (it could have just wait for + * server side to send the result), doing so would result in every fluid interaction having a noticeable delay + * between clicking and changes happening even on single player. 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 */ ClickData clickData = ClickData.create(buttonId, doubleClick); ItemStack verifyToken = executeRealClick(clickData); @@ -126,8 +128,7 @@ public class FluidDisplaySlotWidget extends SlotWidget { ItemStack serverVerifyToken = executeRealClick(clickData); // similar to what NetHandlerPlayServer#processClickWindow does if (!ItemStack.areItemStacksEqual(clientVerifyToken, serverVerifyToken)) { - ((EntityPlayerMP) getContext().getPlayer()) - .sendContainerToPlayer(getContext().getContainer()); + ((EntityPlayerMP) getContext().getPlayer()).sendContainerToPlayer(getContext().getContainer()); } } @@ -140,8 +141,8 @@ public class FluidDisplaySlotWidget extends SlotWidget { ItemStack ret = null; if (actionRealClick == Action.TRANSFER) { if (fluidAccessConstructor == null) { - GT_Mod.GT_FML_LOGGER.warn( - "FluidDisplaySlotWidget is asked to transfer fluid, but fluidAccessConstructor is null!"); + GT_Mod.GT_FML_LOGGER + .warn("FluidDisplaySlotWidget is asked to transfer fluid, but fluidAccessConstructor is null!"); return null; } ret = transferFluid( @@ -158,12 +159,8 @@ public class FluidDisplaySlotWidget extends SlotWidget { return ret; } - protected ItemStack transferFluid( - IFluidAccess aFluidAccess, - EntityPlayer aPlayer, - boolean aProcessFullStack, - boolean aCanDrain, - boolean aCanFill) { + protected ItemStack transferFluid(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; @@ -224,12 +221,10 @@ public class FluidDisplaySlotWidget extends SlotWidget { if (aProcessFullStack) { int tFilledAmount = tOriginalFluidAmount - tTankStack.amount; /* - work out how many more items we can fill - one cell is already used, so account for that - the round down behavior will left over a fraction of a cell worth of fluid - the user then get to decide what to do with it - it will not be too fancy if it spills out partially filled cells - */ + * work out how many more items we can fill one cell is already used, so account for that the round down + * behavior will left over a fraction of a cell worth of fluid the user then get to decide what to do + * with it it will not be too fancy if it spills out partially filled cells + */ int tAdditionalParallel = Math.min(tStackHeld.stackSize - 1, tTankStack.amount / tFilledAmount); tTankStack.amount -= tFilledAmount * tAdditionalParallel; tFilledContainer.stackSize += tAdditionalParallel; @@ -240,8 +235,8 @@ public class FluidDisplaySlotWidget extends SlotWidget { 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; ItemStack tStackHeld = aPlayer.inventory.getItemStack(); @@ -402,8 +397,8 @@ public class FluidDisplaySlotWidget extends SlotWidget { } /** - * Add a predicate on whether a client stack will be accepted. Note this will only be called when this slot is already - * empty. It is assumed whatever is already in the slot will pass the filter. + * Add a predicate on whether a client stack will be accepted. Note this will only be called when this slot is + * already empty. It is assumed whatever is already in the slot will pass the filter. */ public FluidDisplaySlotWidget setEmptyCanFillFilter(Predicate<Fluid> canFillFilter) { this.canFillFilter = canFillFilter; @@ -411,8 +406,7 @@ public class FluidDisplaySlotWidget extends SlotWidget { } /** - * Sets action called on drag-and-drop from NEI. - * You can't use {@link Action#TRANSFER} here. + * Sets action called on drag-and-drop from NEI. You can't use {@link Action#TRANSFER} here. */ public FluidDisplaySlotWidget setActionDragAndDrop(Action actionDragAndDrop) { this.actionDragAndDrop = actionDragAndDrop; @@ -421,6 +415,7 @@ public class FluidDisplaySlotWidget extends SlotWidget { /** * Sets function called before {@link #executeRealClick}. + * * @param beforeRealClick (click data, this widget) -> if allow click */ public FluidDisplaySlotWidget setBeforeRealClick( @@ -431,6 +426,7 @@ public class FluidDisplaySlotWidget extends SlotWidget { /** * Sets function called before {@link #executeDragAndDrop}. + * * @param beforeDragAndDrop (click data, this widget) -> if allow click */ public FluidDisplaySlotWidget setBeforeDragAndDrop( @@ -441,7 +437,8 @@ public class FluidDisplaySlotWidget extends SlotWidget { /** * Sets function called before both of {@link #executeRealClick} and {@link #executeDragAndDrop}. - * @param beforeClick (click data, this widget) -> if allow click + * + * @param beforeClick (click data, this widget) -> if allow click */ public FluidDisplaySlotWidget setBeforeClick(BiFunction<ClickData, FluidDisplaySlotWidget, Boolean> beforeClick) { setBeforeRealClick(beforeClick); @@ -450,8 +447,8 @@ public class FluidDisplaySlotWidget extends SlotWidget { } /** - * By default, this widget runs {@link IHasFluidDisplayItem#updateFluidDisplayItem} after click. - * You can specify custom update action with this method. + * By default, this widget runs {@link IHasFluidDisplayItem#updateFluidDisplayItem} after click. You can specify + * custom update action with this method. */ public FluidDisplaySlotWidget setUpdateFluidDisplayItem(Runnable updateFluidDisplayItem) { this.updateFluidDisplayItem = updateFluidDisplayItem; @@ -464,20 +461,17 @@ public class FluidDisplaySlotWidget extends SlotWidget { public enum Action { /** - * Fill/drain fluid into/from the tank. - * Uses fluid amount, so drag-and-drop cannot use this mode. + * Fill/drain fluid into/from the tank. Uses fluid amount, so drag-and-drop cannot use this mode. */ TRANSFER, /** - * Lock fluid for {@link IFluidLockable}. - * Does not use fluid amount. + * Lock fluid for {@link IFluidLockable}. Does not use fluid amount. */ LOCK, /** - * Set filter for the tank. (not implemented yet) - * Does not use fluid amount. + * Set filter for the tank. (not implemented yet) Does not use fluid amount. */ FILTER, diff --git a/src/main/java/gregtech/common/gui/modularui/widget/ItemWatcherSlotWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/ItemWatcherSlotWidget.java index 7385208874..265450d384 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/ItemWatcherSlotWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/ItemWatcherSlotWidget.java @@ -1,16 +1,18 @@ package gregtech.common.gui.modularui.widget; +import java.util.function.Supplier; + +import net.minecraft.item.ItemStack; + import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import gregtech.api.util.GT_Utility; -import java.util.function.Supplier; -import net.minecraft.item.ItemStack; /** - * Watches specific ItemStack and pulls changes from it. - * Player cannot interact with slot, other than viewing NEI recipe or adding bookmark. + * Watches specific ItemStack and pulls changes from it. Player cannot interact with slot, other than viewing NEI recipe + * or adding bookmark. */ public class ItemWatcherSlotWidget extends SlotWidget { diff --git a/src/main/java/gregtech/common/items/CombType.java b/src/main/java/gregtech/common/items/CombType.java index b010cba824..ff08fde695 100644 --- a/src/main/java/gregtech/common/items/CombType.java +++ b/src/main/java/gregtech/common/items/CombType.java @@ -1,10 +1,12 @@ package gregtech.common.items; +import java.util.Arrays; + import gregtech.api.enums.Materials; import gregtech.api.util.GT_LanguageManager; -import java.util.Arrays; public enum CombType { + // Organic Line LIGNIE(0, "lignite", true, Materials.Lignite, 100, 0x58300B, 0x906237, ItemComb.Voltage.LV), COAL(1, "coal", true, Materials.Coal, 100, 0x525252, 0x666666, ItemComb.Voltage.LV), @@ -26,8 +28,8 @@ public enum CombType { CONDUCTIVEIRON(13, "conductiveiron", true, Materials.ConductiveIron, 80, 0x817671, 0xCEADA3, ItemComb.Voltage.MV), VIBRANTALLOY(14, "vibrantalloy", true, Materials.VibrantAlloy, 50, 0x86A12D, 0xC4F2AE, ItemComb.Voltage.HV), ENERGETICALLOY(15, "energeticalloy", true, Materials.EnergeticAlloy, 70, 0xFF9933, 0xFFAD5C, ItemComb.Voltage.HV), - ELECTRICALSTEEL( - 16, "electricalsteel", true, Materials.ElectricalSteel, 90, 0x787878, 0xD8D8D8, ItemComb.Voltage.LV), + ELECTRICALSTEEL(16, "electricalsteel", true, Materials.ElectricalSteel, 90, 0x787878, 0xD8D8D8, + ItemComb.Voltage.LV), DARKSTEEL(17, "darksteel", true, Materials.DarkSteel, 80, 0x252525, 0x443B44, ItemComb.Voltage.MV), PULSATINGIRON(18, "pulsatingiron", true, Materials.PulsatingIron, 80, 0x006600, 0x6DD284, ItemComb.Voltage.HV), STAINLESSSTEEL(19, "stainlesssteel", true, Materials.StainlessSteel, 75, 0x778899, 0xC8C8DC, ItemComb.Voltage.HV), @@ -124,8 +126,8 @@ public enum CombType { MYTRYL(96, "mytryl", true, Materials.Mytryl, 65, 0xDAA520, 0xF26404, ItemComb.Voltage.IV), QUANTIUM(97, "quantium", true, Materials.Quantium, 50, 0x00FF00, 0x00D10B, ItemComb.Voltage.IV), ORIHARUKON(98, "oriharukon", true, Materials.Oriharukon, 50, 0x228B22, 0x677D68, ItemComb.Voltage.IV), - MYSTERIOUSCRYSTAL( - 99, "mysteriouscrystal", true, Materials.MysteriousCrystal, 45, 0x3CB371, 0x16856C, ItemComb.Voltage.LuV), + MYSTERIOUSCRYSTAL(99, "mysteriouscrystal", true, Materials.MysteriousCrystal, 45, 0x3CB371, 0x16856C, + ItemComb.Voltage.LuV), BLACKPLUTONIUM(100, "blackplutonium", true, Materials.Quantium, 25, 0x000000, 0x323232, ItemComb.Voltage.LuV), TRINIUM(101, "trinium", true, Materials.Trinium, 25, 0xB0E0E6, 0xC8C8D2, ItemComb.Voltage.ZPM), @@ -224,19 +226,13 @@ public enum CombType { this.material = material; this.chance = chance; this.showInList = show; - this.color = new int[] {color1, color2}; + this.color = new int[] { color1, color2 }; this.localizedName = GT_LanguageManager.addStringLocalization( - "comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); + "comb." + this.name, + this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); } - CombType( - int id, - String pName, - boolean show, - Materials material, - int chance, - int color1, - int color2, + CombType(int id, String pName, boolean show, Materials material, int chance, int color1, int color2, ItemComb.Voltage voltage) { if (id < 0 && !"INVALIDCOMB".equals(pName)) throw new IllegalArgumentException(); this.id = id; @@ -245,9 +241,10 @@ public enum CombType { this.material = material; this.chance = chance; this.showInList = show; - this.color = new int[] {color1, color2}; + this.color = new int[] { color1, color2 }; this.localizedName = GT_LanguageManager.addStringLocalization( - "comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); + "comb." + this.name, + this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); } public void setHidden() { @@ -260,7 +257,7 @@ public enum CombType { } 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() { @@ -272,13 +269,11 @@ public enum CombType { } private static final class Companion { + 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()) { diff --git a/src/main/java/gregtech/common/items/DropType.java b/src/main/java/gregtech/common/items/DropType.java index 6bc8eadcf7..3195e9ecbd 100644 --- a/src/main/java/gregtech/common/items/DropType.java +++ b/src/main/java/gregtech/common/items/DropType.java @@ -4,6 +4,7 @@ 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), @@ -14,17 +15,9 @@ public enum DropType { 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}, - }; + 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; @@ -42,7 +35,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"); + "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 7a4df4f1a3..a7505f8953 100644 --- a/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java +++ b/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java @@ -1,8 +1,9 @@ package gregtech.common.items; +import net.minecraft.item.ItemStack; + import gregtech.api.items.GT_RadioactiveCellIC_Item; import ic2.api.reactor.IReactor; -import net.minecraft.item.ItemStack; public class GT_DepletetCell_Item extends GT_RadioactiveCellIC_Item { @@ -11,19 +12,12 @@ 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; } @@ -43,8 +37,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 373147a738..624e326268 100644 --- a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java +++ b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java @@ -1,17 +1,11 @@ package gregtech.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; -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.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -26,7 +20,15 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -@SuppressWarnings({"rawtypes", "unchecked"}) +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.items.GT_Generic_Item; +import gregtech.api.util.GT_Utility; + +@SuppressWarnings({ "rawtypes", "unchecked" }) public class GT_FluidDisplayItem extends GT_Generic_Item { private static final Map<Fluid, String> sFluidTooltips = new HashMap<>(); @@ -39,8 +41,8 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { @Override protected void addAdditionalToolTips(List<String> aList, ItemStack aStack, EntityPlayer aPlayer) { if (FluidRegistry.getFluid(aStack.getItemDamage()) != null) { - String tChemicalFormula = - getChemicalFormula(new FluidStack(FluidRegistry.getFluid(aStack.getItemDamage()), 1)); + String tChemicalFormula = getChemicalFormula( + new FluidStack(FluidRegistry.getFluid(aStack.getItemDamage()), 1)); if (!tChemicalFormula.isEmpty()) aList.add(EnumChatFormatting.YELLOW + tChemicalFormula + EnumChatFormatting.RESET); } @@ -54,14 +56,21 @@ 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); } } @@ -71,12 +80,8 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { @Override public IIcon getIconFromDamage(int aMetaData) { - return Stream.of(FluidRegistry.getFluid(aMetaData), FluidRegistry.WATER) - .filter(Objects::nonNull) - .map(Fluid::getStillIcon) - .filter(Objects::nonNull) - .findFirst() - .orElseThrow(IllegalStateException::new); + return Stream.of(FluidRegistry.getFluid(aMetaData), FluidRegistry.WATER).filter(Objects::nonNull) + .map(Fluid::getStillIcon).filter(Objects::nonNull).findFirst().orElseThrow(IllegalStateException::new); } @Override @@ -125,8 +130,7 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { // tooltip List tTooltip = tContainer.getTooltip(null, true); for (Object tInfo : tTooltip) { - if (!((String) tInfo).contains(" ") - && !((String) tInfo).contains(":") + if (!((String) tInfo).contains(" ") && !((String) tInfo).contains(":") && tTooltip.indexOf(tInfo) != 0) { return (String) tInfo; } @@ -164,8 +168,8 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { for (int tOreDict : OreDictionary.getOreIDs(tItemStack)) { String tOreDictName = OreDictionary.getOreName(tOreDict); if (tOreDictName.startsWith("cell")) { - return Materials.getRealMaterial( - tOreDictName.replace("cell", "").replace("Molten", "").replace("Plasma", "")); + return Materials + .getRealMaterial(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 a5842bb9c1..3fa06018f0 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -3,29 +3,12 @@ package gregtech.common.items; import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; -import com.gtnewhorizons.modularui.api.UIInfos; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.INetworkUpdatableItem; -import gregtech.api.items.GT_Generic_Item; -import gregtech.api.net.GT_Packet_UpdateItem; -import gregtech.api.objects.XSTR; -import gregtech.api.util.GT_Config; -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 gregtech.common.gui.modularui.uifactory.SelectItemUIFactory; 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; @@ -40,9 +23,31 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.FakePlayer; + import org.apache.commons.lang3.tuple.Pair; +import com.gtnewhorizons.modularui.api.UIInfos; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.INetworkUpdatableItem; +import gregtech.api.items.GT_Generic_Item; +import gregtech.api.net.GT_Packet_UpdateItem; +import gregtech.api.objects.XSTR; +import gregtech.api.util.GT_Config; +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 gregtech.common.gui.modularui.uifactory.SelectItemUIFactory; + 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]; @@ -64,81 +69,105 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo GT_ModHandler.addShapelessCraftingRecipe( ItemList.Circuit_Integrated.getWithDamage(1L, 0L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] {OrePrefixes.circuit.get(Materials.Basic)}); + 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, 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, 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) { @@ -164,25 +193,18 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo @Override public void addAdditionalToolTips(List<String> 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 @@ -201,8 +223,8 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo 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)); + 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"); @@ -259,13 +281,15 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo 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 stack; } configuratorStack = player.inventory.mainInventory[configurator.getKey()]; @@ -275,14 +299,15 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } private void openSelectorGui(ItemStack configurator, int meta, EntityPlayer player) { - UIInfos.openClientUI(player, buildContext -> new SelectItemUIFactory( + UIInfos.openClientUI( + player, + buildContext -> new SelectItemUIFactory( StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), configurator, GT_IntegratedCircuit_Item::onConfigured, ALL_VARIANTS, meta, - true) - .createWindow(buildContext)); + true).createWindow(buildContext)); } private static void onConfigured(ItemStack stack) { @@ -299,8 +324,8 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo if (!GT_Utility.isStackValid(toolStack)) continue; - for (Map.Entry<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> p : - GregTech_API.sCircuitProgrammerList.entrySet()) + 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 e6882c4977..2abb7ff209 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 @@ -2,6 +2,23 @@ package gregtech.common.items; import static gregtech.api.enums.Textures.BlockIcons.*; +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; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.util.MathHelper; +import net.minecraftforge.oredict.OreDictionary; + import cpw.mods.fml.common.Loader; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; @@ -27,26 +44,12 @@ 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; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.util.MathHelper; -import net.minecraftforge.oredict.OreDictionary; 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 "; @@ -57,8 +60,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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( @@ -112,805 +114,560 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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", "4,096 Credits")); ItemList.Credit_Greg_Naquadah.set(addItem(tLastID = 6, "Naquadah GT Credit", "32,768 Credits")); ItemList.Credit_Greg_Neutronium.set(addItem(tLastID = 7, "Neutronium GT Credit", "262,144 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.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}); + 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}); + 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}); + 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}); + 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}); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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))); + 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.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) - }); + 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.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) - }); + 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))); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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))); + 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 | @@ -920,8 +677,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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")); @@ -932,8 +689,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")); @@ -943,425 +700,398 @@ 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")); - ItemList.Shape_Mold_ToolHeadDrill.set( - addItem(tLastID = 331, "Mold (Drill Head)", "Mold for making Drill Heads")); + ItemList.Shape_Mold_Pipe_Huge + .set(addItem(tLastID = 330, "Mold (Huge Pipe)", "Mold for making full Block Pipes")); + ItemList.Shape_Mold_ToolHeadDrill + .set(addItem(tLastID = 331, "Mold (Drill Head)", "Mold for making Drill Heads")); 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")); + 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_Extruder_ToolHeadDrill.set( - addItem(tLastID = 377, "Extruder Shape (Drill Head)", "Extruder Shape for a Drill Head")); + 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_Extruder_ToolHeadDrill + .set(addItem(tLastID = 377, "Extruder Shape (Drill Head)", "Extruder Shape for a Drill Head")); 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")); + 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.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) - }); + 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.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))); + 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))); + 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) - }, + 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))); + 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) - }); + 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))); + 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) - }, + 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.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) - }, + 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))); + 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) - }, + 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))); + 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) - }, + 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))); + 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) - }, + 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))); + 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) - }, + 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))); + 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) - }, + 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))); + 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) - }, + 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))); + 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) - }, + 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))); + 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) - }, + 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)); + 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), @@ -1371,70 +1101,71 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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); + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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, @@ -1445,31 +1176,34 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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))); + 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), @@ -1480,41 +1214,41 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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) - }, + 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))); + 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), @@ -1525,35 +1259,33 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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) - }, + 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")); + 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))); + 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) @@ -1565,391 +1297,423 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { // 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))); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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))); + 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 - }); + 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)); @@ -2026,642 +1790,580 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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))); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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))); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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))); + 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), @@ -2706,155 +2408,103 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addCraftingRecipe( ItemList.Electric_Pump_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.NOT_REMOVABLE + 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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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))); + 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), @@ -2877,8 +2527,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(16384, TextureFactory.of(OVERLAY_VALVE))); - ItemList.FluidRegulator_LV.set( - addItem(tLastID = 660, "Fluid Regulator (LV)", FRText1 + GT_Utility.formatNumbers(640) + FRText2)); + 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( @@ -2927,214 +2577,183 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(524288, TextureFactory.of(OVERLAY_PUMP))); - ItemList.FluidFilter.set( - addItem(669, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type")); + 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(TextureFactory.of(OVERLAY_SHUTTER))); - ItemList.ItemFilter_Export.set(addItem( - 270, - "Item Filter Cover (Export)", - "Right click with an item to set filter (Only supports Export Mode)")); + 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, TextureFactory.of(OVERLAY_CONVEYOR))); - ItemList.ItemFilter_Import.set(addItem( - 271, - "Item Filter Cover (Import)", - "Right click with an item to set filter (Only supports Import Mode)")); + 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, TextureFactory.of(OVERLAY_CONVEYOR))); - ItemList.Cover_FluidLimiter.set( - addItem(272, "Fluid Limiter Cover", "Limits fluid input depending on fill level")); + 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(TextureFactory.of(OVERLAY_SHUTTER))); - 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))); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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), @@ -3177,219 +2796,168 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 32, TextureFactory.of(OVERLAY_CONVEYOR))); - 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))); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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), @@ -3416,607 +2984,552 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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))); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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))); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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) - }); + 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.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.StableAdhesive.set(addItem( - 427, - "Hyper-Stable Self-Healing Adhesive", - "Complete and selective adhesion, even when torn or damaged", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 30L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 5L))); - ItemList.SuperconductorComposite.set(addItem( - 428, - "Superconductor Rare-Earth Composite", - "Zero resistance to electrical and quantum flow, regardless of temperature", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 50L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 25L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 15L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 10L))); - ItemList.NaquadriaSupersolid.set(addItem( - 429, - "Black Body Naquadria Supersolid", - "Flows like a fluid and reflects nothing, perfect absorption and transfer", - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 100L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 60L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 40L), - new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 10L))); + 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.StableAdhesive.set( + addItem( + 427, + "Hyper-Stable Self-Healing Adhesive", + "Complete and selective adhesion, even when torn or damaged", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 30L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 5L))); + ItemList.SuperconductorComposite.set( + addItem( + 428, + "Superconductor Rare-Earth Composite", + "Zero resistance to electrical and quantum flow, regardless of temperature", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 50L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 25L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 15L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 10L))); + ItemList.NaquadriaSupersolid.set( + addItem( + 429, + "Black Body Naquadria Supersolid", + "Flows like a fluid and reflects nothing, perfect absorption and transfer", + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 100L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 60L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 40L), + new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 10L))); // Circuits ULV - LuV. - ItemList.Circuit_Primitive.set(addItem( - tLastID = 700, - "Vacuum Tube", - "A very simple Circuit", - OrePrefixes.circuit.get(Materials.Primitive), - SubTag.NO_UNIFICATION)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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())); + 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())); + 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))); + 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_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_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")); @@ -4030,239 +3543,204 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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)); + 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.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) - }); + 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.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) - }); + 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.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))); + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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))); + 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) - }, + 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, @@ -4275,10 +3753,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { final ITexture doesWorkCoverTexture = TextureFactory.of( TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), - TextureFactory.builder() - .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) - .glow() - .build()); + TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build()); GregTech_API.registerCover( ItemList.Cover_ActivityDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], doesWorkCoverTexture), @@ -4298,10 +3773,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { final ITexture playerDectectorCoverTexture = TextureFactory.of( TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), - TextureFactory.builder() - .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) - .glow() - .build()); + TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build()); GregTech_API.registerCover( ItemList.Cover_PlayerDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], playerDectectorCoverTexture), @@ -4311,161 +3783,118 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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))); + 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.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) - }); + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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, @@ -4491,91 +3920,115 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), new GT_Cover_Shutter(TextureFactory.of(OVERLAY_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))); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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), @@ -4589,105 +4042,98 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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.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.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 - }); + 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))); + 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) - }, + 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 (External)", - "Transfers Redstone signals 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 (Internal)", - "Transfers Redstone signals 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 (External)", - "Transfers Redstone signals 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 (Internal)", - "Transfers Redstone signals wireless", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_RedstoneTransmitterExternal.set( + addItem( + tLastID = 741, + "Redstone Transmitter (External)", + "Transfers Redstone signals 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 (Internal)", + "Transfers Redstone signals 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 (External)", + "Transfers Redstone signals 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 (Internal)", + "Transfers Redstone signals 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), @@ -4707,109 +4153,84 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { new GT_Cover_RedstoneReceiverInternal(TextureFactory.of(OVERLAY_REDSTONE_RECEIVER))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Emitter_EV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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)}); + new Object[] { ItemList.Cover_RedstoneTransmitterExternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.Cover_RedstoneReceiverInternal.get(1L), - new Object[] {ItemList.Cover_RedstoneReceiverExternal.get(1L)}); + new Object[] { ItemList.Cover_RedstoneReceiverExternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.Cover_RedstoneTransmitterExternal.get(1L), - new Object[] {ItemList.Cover_RedstoneTransmitterInternal.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))); + 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(OVERLAY_MAINTENANCE_DETECTOR)), new GT_Cover_NeedMaintainance(TextureFactory.of(OVERLAY_MAINTENANCE_DETECTOR))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Emitter_MV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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.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)}); + 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)}); + 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) - }, + 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) - }, + 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, @@ -4818,19 +4239,9 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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) - }); + 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<>(); @@ -4856,8 +4267,9 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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; } @@ -4865,8 +4277,11 @@ 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; } @@ -4904,8 +4319,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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 + if (recipe.getFluidOutput(0).isFluidEqual(aMaterial.getPlasma(1L))) return true; // Fusion recipe + // output matches + // current plasma + // cell fluid } } } @@ -4914,17 +4331,16 @@ 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 1b95f90e36..c52255ce3a 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 @@ -2,6 +2,21 @@ package gregtech.common.items; import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraft.dispenser.IBlockSource; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.world.World; + import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; @@ -26,22 +41,9 @@ import gregtech.common.covers.redstone.GT_Cover_WirelessFluidDetector; import gregtech.common.covers.redstone.GT_Cover_WirelessItemDetector; import gregtech.common.covers.redstone.GT_Cover_WirelessMaintenanceDetector; import gregtech.common.items.behaviors.Behaviour_Arrow; -import net.minecraft.dispenser.IBlockSource; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnumEnchantmentType; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -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"; @@ -85,1110 +87,1156 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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( + 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( + 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( + 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, @@ -1199,421 +1247,474 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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))); + 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.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_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_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_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_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_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))); 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))); 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))); @@ -1621,23 +1722,39 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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))); 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))); 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))); @@ -1645,35 +1762,63 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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))); 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))); 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))); 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))); @@ -1684,8 +1829,12 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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")); @@ -1694,123 +1843,123 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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); @@ -1821,274 +1970,408 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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))), + 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_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_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_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_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))); + 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")); @@ -2105,255 +2388,309 @@ 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.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_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.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.Cover_AdvancedRedstoneTransmitterExternal.set(addItem( - tLastID = 577, - "Advanced Redstone Transmitter (External)", - "Transfers Redstone signals wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); - ItemList.Cover_AdvancedRedstoneTransmitterInternal.set(addItem( - tLastID = 578, - "Advanced Redstone Transmitter (Internal)", - "Transfers Redstone signals wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); - ItemList.Cover_AdvancedRedstoneReceiverExternal.set(addItem( - tLastID = 579, - "Advanced Redstone Receiver (External)", - "Transfers Redstone signals wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); - ItemList.Cover_AdvancedRedstoneReceiverInternal.set(addItem( - tLastID = 580, - "Advanced Redstone Receiver (Internal)", - "Transfers Redstone signals wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); + ItemList.Cover_AdvancedRedstoneTransmitterExternal.set( + addItem( + tLastID = 577, + "Advanced Redstone Transmitter (External)", + "Transfers Redstone signals wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); + ItemList.Cover_AdvancedRedstoneTransmitterInternal.set( + addItem( + tLastID = 578, + "Advanced Redstone Transmitter (Internal)", + "Transfers Redstone signals wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); + ItemList.Cover_AdvancedRedstoneReceiverExternal.set( + addItem( + tLastID = 579, + "Advanced Redstone Receiver (External)", + "Transfers Redstone signals wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); + ItemList.Cover_AdvancedRedstoneReceiverInternal.set( + addItem( + tLastID = 580, + "Advanced Redstone Receiver (Internal)", + "Transfers Redstone signals wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); - ItemList.Cover_WirelessFluidDetector.set(addItem( - tLastID = 581, - "Wireless Fluid Detector Cover", - "Transfers Fluid Amount as Redstone wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); - ItemList.Cover_WirelessItemDetector.set(addItem( - tLastID = 582, - "Wireless Item Detector Cover", - "Transfers Item Amount as Redstone wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L))); + ItemList.Cover_WirelessFluidDetector.set( + addItem( + tLastID = 581, + "Wireless Fluid Detector Cover", + "Transfers Fluid Amount as Redstone wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + ItemList.Cover_WirelessItemDetector.set( + addItem( + tLastID = 582, + "Wireless Item Detector Cover", + "Transfers Item Amount as Redstone wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L))); - ItemList.Cover_WirelessNeedsMaintainance.set(addItem( - tLastID = 583, - "Wireless Needs Maintenance Cover", - "Transfers Maintenance Issues as Redstone wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 3L))); + ItemList.Cover_WirelessNeedsMaintainance.set( + addItem( + tLastID = 583, + "Wireless Needs Maintenance Cover", + "Transfers Maintenance Issues as Redstone wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 3L))); GregTech_API.registerCover( ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), @@ -2393,53 +2730,42 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { new GT_Cover_WirelessMaintenanceDetector(TextureFactory.of(OVERLAY_WIRELESS_MAINTENANCE_DETECTOR))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Cover_RedstoneTransmitterExternal.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { ItemList.Cover_RedstoneTransmitterExternal.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), + GT_Utility.getIntegratedCircuit(1) }, GT_Values.NF, ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), 3200, 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Cover_RedstoneReceiverExternal.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { ItemList.Cover_RedstoneReceiverExternal.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), + GT_Utility.getIntegratedCircuit(1) }, GT_Values.NF, ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L), 3200, 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Cover_FluidDetector.get(1L), - ItemList.Emitter_EV.get(1L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { ItemList.Cover_FluidDetector.get(1L), ItemList.Emitter_EV.get(1L), + GT_Utility.getIntegratedCircuit(1) }, GT_Values.NF, ItemList.Cover_WirelessFluidDetector.get(1L), 3200, 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Cover_ItemDetector.get(1L), ItemList.Emitter_EV.get(1L), GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { ItemList.Cover_ItemDetector.get(1L), ItemList.Emitter_EV.get(1L), + GT_Utility.getIntegratedCircuit(1) }, GT_Values.NF, ItemList.Cover_WirelessItemDetector.get(1L), 3200, 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Cover_NeedsMaintainance.get(1L), - ItemList.Emitter_EV.get(1L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { ItemList.Cover_NeedsMaintainance.get(1L), ItemList.Emitter_EV.get(1L), + GT_Utility.getIntegratedCircuit(1) }, GT_Values.NF, ItemList.Cover_WirelessNeedsMaintainance.get(1L), 3200, @@ -2447,16 +2773,16 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addShapelessCraftingRecipe( ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L), - new Object[] {ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L)}); + new Object[] { ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L), - new Object[] {ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L)}); + new Object[] { ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), - new Object[] {ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L)}); + new Object[] { ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L), - new Object[] {ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L)}); + new Object[] { ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(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)); @@ -2480,40 +2806,47 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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)); + 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)); + 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_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)); + 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)); + 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)); + 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)); + 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)); + ItemList.Crop_Drop_Tine.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)); GT_ModHandler.addPulverisationRecipe( new ItemStack(Blocks.melon_block, 1, 0), new ItemStack(Items.melon, 8, 0), @@ -2521,9 +2854,17 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 80, false); GT_ModHandler.addPulverisationRecipe( - new ItemStack(Blocks.pumpkin, 1, 0), new ItemStack(Items.pumpkin_seeds, 4, 0), null, 0, false); + 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); + 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), @@ -2550,8 +2891,8 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { false); GT_ModHandler.addPulverisationRecipe( ItemList.Tesseract.get(1), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TranscendentMetal, 8L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TranscendentMetal, 8L) }, + new int[] { 10000 }, 32_000_000, 100); try { @@ -2565,12 +2906,13 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { 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 @@ -2593,8 +2935,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) { @@ -2606,13 +2948,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); } @@ -2624,8 +2966,7 @@ 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 + Enchantment tEnchant = aMaterial.mEnchantmentTools == Enchantment.fortune ? Enchantment.looting : aMaterial.mEnchantmentTools; if (tEnchant.type == EnumEnchantmentType.weapon) { NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); 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 aa18e8f02c..353e660727 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 @@ -4,15 +4,17 @@ 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 net.minecraftforge.oredict.OreDictionary; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.items.GT_MetaGenerated_Item_X32; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.common.covers.GT_Cover_SolarPanel; -import net.minecraftforge.oredict.OreDictionary; public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { + public static GT_MetaGenerated_Item_03 INSTANCE; public GT_MetaGenerated_Item_03() { @@ -28,138 +30,143 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { Object[] o = new Object[0]; /** - * circuit boards tier 1-7: - * coated circuit board / wood plate + resin - * Plastic Circuit Board / Plastic + Copper Foil + Sulfuric Acid - * phenolic circuit board /carton+glue+chemical bath - * epoxy circuit board /epoxy plate + copper foil + sulfuric acid - * fiberglass circuit board (simple + multilayer) / glass + plastic + electrum foil + sulfurci acid - * wetware lifesupport board / fiberglass CB + teflon + + * circuit boards tier 1-7: coated circuit board / wood plate + resin Plastic Circuit Board / Plastic + Copper + * Foil + Sulfuric Acid phenolic circuit board /carton+glue+chemical bath epoxy circuit board /epoxy plate + + * copper foil + sulfuric acid 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)); /** - * electronic components: - * vacuum tube (glass tube + red alloy cables) - * basic electronic circuits normal+smd - * coils - * diodes normal+smd - * transistors normal+smd - * capacitors normal+smd - * Glass Fibers + * electronic components: vacuum tube (glass tube + red alloy cables) basic electronic circuits normal+smd coils + * diodes normal+smd transistors normal+smd 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 + .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); + 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); + 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); + 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); + 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); + OrePrefixes.componentCircuit, + Materials.Inductor, + ItemList.Circuit_Parts_InductorSMD.get(1L), + true); /** - * ICs - * Lenses made from perfect crystals first instead of plates - * Monocrystalline silicon ingot (normal+glowstone+naquadah) EBF, normal silicon no EBF need anymore - * wafer(normal+glowstone+naquadah) cut mono silicon ingot in cutting machine + * ICs Lenses made from perfect crystals first instead of plates Monocrystalline silicon ingot + * (normal+glowstone+naquadah) EBF, normal silicon no EBF need anymore wafer(normal+glowstone+naquadah) cut mono + * silicon ingot in cutting machine * - * Integrated Logic Circuit(8bit DIP) - * RAM - * NAND Memory - * NOR Memory - * CPU (4 sizes) - * SoCs(2 sizes, high tier cheap low tech component) - * Power IC/High Power IC/Ultra High power + * Integrated Logic Circuit(8bit DIP) RAM NAND Memory NOR Memory CPU (4 sizes) SoCs(2 sizes, high tier cheap low + * tech component) Power IC/High Power IC/Ultra High power * * nanotube interconnected circuit (H-IC + nanotubes) * * 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_Ingot6.set( - addItem(tLastID = 721, "Optically Enriched Crystalline 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_Ingot6 + .set(addItem(tLastID = 721, "Optically Enriched Crystalline 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)); @@ -197,8 +204,8 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { 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)); @@ -224,375 +231,415 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { ItemList.Circuit_Wafer_QPIC.set(addItem(tLastID = 164, "QPIC Wafer", "Raw Circuit", o)); ItemList.Circuit_Chip_QPIC.set(addItem(tLastID = 165, "Quantum Power IC", "Quantum Power Circuit", o)); /** - * Engraved Crystal Chip - * Engraved Lapotron Chip - * Crystal CPU - * SoCrystal - * stem cells (disassemble eggs) + * Engraved Crystal Chip Engraved Lapotron Chip Crystal CPU 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)); ItemList.Circuit_Chip_Optical.set(addItem(tLastID = 724, "Raw Exposed Optical Chip", "Raw Optical Chip", o)); // Nand Chip - ItemList.NandChip.set(addItem( - tLastID = 75, - "NAND Chip", - "A very simple Circuit", - OrePrefixes.circuit.get(Materials.Primitive), - SubTag.NO_UNIFICATION)); + 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)); + // 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)); + // 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)); + 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 + // 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)); + // 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)); + 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)); + 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 + // 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)); + 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)); + 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)); + 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)); + 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)); + 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_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)); + 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 // 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_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_Optical.set( - addItem(tLastID = 728, "Optical Circuit Board", "Optically Infused Board", o)); + ItemList.Circuit_Board_Bio_Ultra + .set(addItem(tLastID = 107, "Ultra Bio Mutated Circuit Board", "Bio genetic mutated Board", o)); + ItemList.Circuit_Board_Optical + .set(addItem(tLastID = 728, "Optical Circuit Board", "Optically Infused 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))); + 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), @@ -619,164 +666,194 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { 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_Frame.set(addItem(tLastID = 199, "Upgrade Frame", "Crafting component", o)); - ItemList.IndustrialApiary_Upgrade_Acceleration_1.set(addItem( - tLastID = 200, - "Acceleration Upgrade x2", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 2x acceleration level/n * Energy Consumption +1 AMP LV", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_2.set(addItem( - tLastID = 201, - "Acceleration Upgrade x4", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 4x acceleration level/n * Energy Consumption +1 AMP MV", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_3.set(addItem( - tLastID = 202, - "Acceleration Upgrade x8", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 8x acceleration level/n * Energy Consumption +1 AMP HV", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_4.set(addItem( - tLastID = 203, - "Acceleration Upgrade x16", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 16x acceleration level/n * Energy Consumption +1 AMP EV", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_5.set(addItem( - tLastID = 204, - "Acceleration Upgrade x32", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 32x acceleration level/n * Energy Consumption +1 AMP IV", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_6.set(addItem( - tLastID = 205, - "Acceleration Upgrade x64", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 64x acceleration level/n * Energy Consumption +1 AMP LuV", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_7.set(addItem( - tLastID = 206, - "Acceleration Upgrade x128", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 128x acceleration level/n * Energy Consumption +1 AMP ZPM", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_8.set(addItem( - tLastID = 207, - "Acceleration Upgrade x256", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 256x acceleration level/n * Energy Consumption +1 AMP UV", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.set(addItem( - tLastID = 208, - "Upgraded Acceleration Upgrade x256", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 256x acceleration level/n * Will also grant 8x production upgrade/n * Energy Consumption +1 AMP UV", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_PRODUCTION.set(addItem( - tLastID = 209, - "Production Upgrade", - "Production upgrade for Industrial Apiary/n Maximum Installed: 8/n Increases production modifier by 0.25/n Energy Consumption +40%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_PLAINS.set(addItem( - tLastID = 210, - "Plains Emulation Upgrade", - "Plains emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Plains/n * Energy Consumption +40%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_LIGHT.set(addItem( - tLastID = 211, - "Light Upgrade", - "Light upgrade for Industrial Apiary/n Maximum Installed: 1/n * Internal Lighting/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_FLOWERING.set(addItem( - tLastID = 212, - "Flowering Upgrade", - "Flowering upgrade for Industrial Apiary/n Maximum Installed: 8/n * Flowering and Pollination +20%/n * Energy Consumption +10%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_WINTER.set(addItem( - tLastID = 213, - "Winter Emulation Upgrade", - "Winter emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Taiga/n * Energy Consumption +50%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_DRYER.set(addItem( - tLastID = 214, - "Dryer Upgrade", - "Dryer upgrade for Industrial Apiary/n Maximum Installed: 8/n * Humidity -25%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_AUTOMATION.set(addItem( - tLastID = 215, - "Automation Upgrade", - "Automation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Automation/n * Energy Consumption +10%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_HUMIDIFIER.set(addItem( - tLastID = 216, - "Humidifier Upgrade", - "Humidifier upgrade for Industrial Apiary/n Maximum Installed: 8/n * Humidity +25%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_HELL.set(addItem( - tLastID = 217, - "HELL Emulation Upgrade", - "HELL emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: HELL/n * Energy Consumption +50%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_POLLEN.set(addItem( - tLastID = 218, - "Pollen Scrubber Upgrade", - "Pollen scrubber upgrade for Industrial Apiary/n Maximum Installed: 1/n * Flowering and Pollination -100%/n * Energy Consumption +30%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_DESERT.set(addItem( - tLastID = 219, - "Desert Emulation Upgrade", - "Desert emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Desert/n * Energy Consumption +20%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_COOLER.set(addItem( - tLastID = 220, - "Cooler Upgrade", - "Cooler upgrade for Industrial Apiary/n Maximum Installed: 8/n * Temperature -25%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_LIFESPAN.set(addItem( - tLastID = 221, - "Lifespan Upgrade", - "Lifespan upgrade for Industrial Apiary/n Maximum Installed: 4/n * Lifespan -33%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_SEAL.set(addItem( - tLastID = 222, - "Seal Upgrade", - "Seal upgrade for Industrial Apiary/n Maximum Installed: 1/n * Rain Protection/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_STABILIZER.set(addItem( - tLastID = 223, - "Genetic Stabilizer Upgrade", - "Genetic stabilizer upgrade for Industrial Apiary/n Maximum Installed: 1/n * Genetic Decay -100%/n * Energy Consumption +150%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_JUNGLE.set(addItem( - tLastID = 224, - "Jungle Emulation Upgrade", - "Jungle emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Jungle/n * Energy Consumption +20%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_TERRITORY.set(addItem( - tLastID = 225, - "Territory Upgrade", - "Territory upgrade for Industrial Apiary/n Maximum Installed: 4/n * Territory +50%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_OCEAN.set(addItem( - tLastID = 226, - "Ocean Emulation Upgrade", - "Ocean emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Ocean/n * Energy Consumption +20%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_SKY.set(addItem( - tLastID = 227, - "Open Sky Upgrade", - "Open sky upgrade for Industrial Apiary/n Maximum Installed: 1/n * Open Sky Simulation/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_HEATER.set(addItem( - tLastID = 228, - "Heater Upgrade", - "Heater upgrade for Industrial Apiary/n Maximum Installed: 8/n * Temperature +25%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_SIEVE.set(addItem( - tLastID = 229, - "Sieve Upgrade", - "Sieve upgrade for Industrial Apiary/n Maximum Installed: 1/n * Pollen Collection/n * Energy Consumption +25%", - OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_1.set( + addItem( + tLastID = 200, + "Acceleration Upgrade x2", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 2x acceleration level/n * Energy Consumption +1 AMP LV", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_2.set( + addItem( + tLastID = 201, + "Acceleration Upgrade x4", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 4x acceleration level/n * Energy Consumption +1 AMP MV", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_3.set( + addItem( + tLastID = 202, + "Acceleration Upgrade x8", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 8x acceleration level/n * Energy Consumption +1 AMP HV", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_4.set( + addItem( + tLastID = 203, + "Acceleration Upgrade x16", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 16x acceleration level/n * Energy Consumption +1 AMP EV", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_5.set( + addItem( + tLastID = 204, + "Acceleration Upgrade x32", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 32x acceleration level/n * Energy Consumption +1 AMP IV", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_6.set( + addItem( + tLastID = 205, + "Acceleration Upgrade x64", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 64x acceleration level/n * Energy Consumption +1 AMP LuV", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_7.set( + addItem( + tLastID = 206, + "Acceleration Upgrade x128", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 128x acceleration level/n * Energy Consumption +1 AMP ZPM", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_8.set( + addItem( + tLastID = 207, + "Acceleration Upgrade x256", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 256x acceleration level/n * Energy Consumption +1 AMP UV", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.set( + addItem( + tLastID = 208, + "Upgraded Acceleration Upgrade x256", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 256x acceleration level/n * Will also grant 8x production upgrade/n * Energy Consumption +1 AMP UV", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_PRODUCTION.set( + addItem( + tLastID = 209, + "Production Upgrade", + "Production upgrade for Industrial Apiary/n Maximum Installed: 8/n Increases production modifier by 0.25/n Energy Consumption +40%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_PLAINS.set( + addItem( + tLastID = 210, + "Plains Emulation Upgrade", + "Plains emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Plains/n * Energy Consumption +40%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_LIGHT.set( + addItem( + tLastID = 211, + "Light Upgrade", + "Light upgrade for Industrial Apiary/n Maximum Installed: 1/n * Internal Lighting/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_FLOWERING.set( + addItem( + tLastID = 212, + "Flowering Upgrade", + "Flowering upgrade for Industrial Apiary/n Maximum Installed: 8/n * Flowering and Pollination +20%/n * Energy Consumption +10%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_WINTER.set( + addItem( + tLastID = 213, + "Winter Emulation Upgrade", + "Winter emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Taiga/n * Energy Consumption +50%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_DRYER.set( + addItem( + tLastID = 214, + "Dryer Upgrade", + "Dryer upgrade for Industrial Apiary/n Maximum Installed: 8/n * Humidity -25%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_AUTOMATION.set( + addItem( + tLastID = 215, + "Automation Upgrade", + "Automation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Automation/n * Energy Consumption +10%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_HUMIDIFIER.set( + addItem( + tLastID = 216, + "Humidifier Upgrade", + "Humidifier upgrade for Industrial Apiary/n Maximum Installed: 8/n * Humidity +25%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_HELL.set( + addItem( + tLastID = 217, + "HELL Emulation Upgrade", + "HELL emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: HELL/n * Energy Consumption +50%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_POLLEN.set( + addItem( + tLastID = 218, + "Pollen Scrubber Upgrade", + "Pollen scrubber upgrade for Industrial Apiary/n Maximum Installed: 1/n * Flowering and Pollination -100%/n * Energy Consumption +30%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_DESERT.set( + addItem( + tLastID = 219, + "Desert Emulation Upgrade", + "Desert emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Desert/n * Energy Consumption +20%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_COOLER.set( + addItem( + tLastID = 220, + "Cooler Upgrade", + "Cooler upgrade for Industrial Apiary/n Maximum Installed: 8/n * Temperature -25%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_LIFESPAN.set( + addItem( + tLastID = 221, + "Lifespan Upgrade", + "Lifespan upgrade for Industrial Apiary/n Maximum Installed: 4/n * Lifespan -33%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_SEAL.set( + addItem( + tLastID = 222, + "Seal Upgrade", + "Seal upgrade for Industrial Apiary/n Maximum Installed: 1/n * Rain Protection/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_STABILIZER.set( + addItem( + tLastID = 223, + "Genetic Stabilizer Upgrade", + "Genetic stabilizer upgrade for Industrial Apiary/n Maximum Installed: 1/n * Genetic Decay -100%/n * Energy Consumption +150%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_JUNGLE.set( + addItem( + tLastID = 224, + "Jungle Emulation Upgrade", + "Jungle emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Jungle/n * Energy Consumption +20%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_TERRITORY.set( + addItem( + tLastID = 225, + "Territory Upgrade", + "Territory upgrade for Industrial Apiary/n Maximum Installed: 4/n * Territory +50%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_OCEAN.set( + addItem( + tLastID = 226, + "Ocean Emulation Upgrade", + "Ocean emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Ocean/n * Energy Consumption +20%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_SKY.set( + addItem( + tLastID = 227, + "Open Sky Upgrade", + "Open sky upgrade for Industrial Apiary/n Maximum Installed: 1/n * Open Sky Simulation/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_HEATER.set( + addItem( + tLastID = 228, + "Heater Upgrade", + "Heater upgrade for Industrial Apiary/n Maximum Installed: 8/n * Temperature +25%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_SIEVE.set( + addItem( + tLastID = 229, + "Sieve Upgrade", + "Sieve upgrade for Industrial Apiary/n Maximum Installed: 1/n * Pollen Collection/n * Energy Consumption +25%", + OrePrefixes.apiaryUpgrade.name())); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_1.get(1L)); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_2.get(1L)); @@ -809,113 +886,160 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_HEATER.get(1L)); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_SIEVE.get(1L)); - ItemList.NuclearStar.set(addItem( - 230, - "Nuclear Star", - "BY THE POWERS OF NAUGHTINESS, I COMMAND THIS PARTICULAR STAR, TO BE REALLY, REALLY HOT", - SubTag.NO_UNIFICATION)); + ItemList.NuclearStar.set( + addItem( + 230, + "Nuclear Star", + "BY THE POWERS OF NAUGHTINESS, I COMMAND THIS PARTICULAR STAR, TO BE REALLY, REALLY HOT", + SubTag.NO_UNIFICATION)); - ItemList.Optical_Cpu_Containment_Housing.set( - addItem(tLastID = 727, "Optical CPU Containment Housing", "CPU Housing", o)); + ItemList.Optical_Cpu_Containment_Housing + .set(addItem(tLastID = 727, "Optical CPU Containment Housing", "CPU Housing", o)); ItemList.Optically_Perfected_CPU.set(addItem(tLastID = 726, "Optically Perfected CPU", "Perfected CPU!", o)); - ItemList.Optically_Compatible_Memory.set( - addItem(tLastID = 725, "Optically Compatible Memory", "Its in the name!", o)); + ItemList.Optically_Compatible_Memory + .set(addItem(tLastID = 725, "Optically Compatible Memory", "Its in the name!", o)); int whiteDwarfIDs = 729; - ItemList.White_Dwarf_Shape_Extruder_Plate.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Plate)", "Ultra Strong Stellar Shape for making Plates")); - ItemList.White_Dwarf_Shape_Extruder_Rod.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Rod)", "Ultra Strong Stellar Shape for making Rods")); - ItemList.White_Dwarf_Shape_Extruder_Bolt.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Bolt)", "Ultra Strong Stellar Shape for making Bolts")); - ItemList.White_Dwarf_Shape_Extruder_Ring.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Ring)", "Ultra Strong Stellar Shape for making Rings")); - ItemList.White_Dwarf_Shape_Extruder_Cell.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Cell)", "Ultra Strong Stellar Shape for making Cells")); - ItemList.White_Dwarf_Shape_Extruder_Ingot.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Ingot)", - "Ultra Strong Stellar Shape for, wait, can't we just use a Furnace?")); - ItemList.White_Dwarf_Shape_Extruder_Wire.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Wire)", "Ultra Strong Stellar Shape for making Wires")); - ItemList.White_Dwarf_Shape_Extruder_Casing.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Casing)", - "Ultra Strong Stellar Shape for making Item Casings")); - ItemList.White_Dwarf_Shape_Extruder_Pipe_Tiny.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Tiny Pipe)", - "Ultra Strong Stellar Shape for making tiny Pipes")); - ItemList.White_Dwarf_Shape_Extruder_Pipe_Small.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Small Pipe)", - "Ultra Strong Stellar Shape for making small Pipes")); - ItemList.White_Dwarf_Shape_Extruder_Pipe_Medium.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Normal Pipe)", - "Ultra Strong Stellar Shape for making Pipes")); - ItemList.White_Dwarf_Shape_Extruder_Pipe_Large.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Large Pipe)", - "Ultra Strong Stellar Shape for making large Pipes")); - ItemList.White_Dwarf_Shape_Extruder_Pipe_Huge.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Huge Pipe)", - "Ultra Strong Stellar Shape for making full Block Pipes")); - ItemList.White_Dwarf_Shape_Extruder_Block.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Block)", "Ultra Strong Stellar Shape for making Blocks")); - ItemList.White_Dwarf_Shape_Extruder_Sword.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Sword Blade)", - "Ultra Strong Stellar Shape for making Swords")); - ItemList.White_Dwarf_Shape_Extruder_Pickaxe.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Pickaxe Head)", - "Ultra Strong Stellar Shape for making Pickaxes")); - ItemList.White_Dwarf_Shape_Extruder_Shovel.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Shovel Head)", - "Ultra Strong Stellar Shape for making Shovels")); - ItemList.White_Dwarf_Shape_Extruder_Axe.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Axe Head)", - "Ultra Strong Stellar Shape for making Axes")); - ItemList.White_Dwarf_Shape_Extruder_Hoe.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Hoe Head)", - "Ultra Strong Stellar Shape for making Hoes")); - ItemList.White_Dwarf_Shape_Extruder_Hammer.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Hammer Head)", - "Ultra Strong Stellar Shape for making Hammers")); - ItemList.White_Dwarf_Shape_Extruder_File.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (File Head)", - "Ultra Strong Stellar Shape for making Files")); - ItemList.White_Dwarf_Shape_Extruder_Saw.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Saw Blade)", - "Ultra Strong Stellar Shape for making Saws")); - ItemList.White_Dwarf_Shape_Extruder_Gear.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Gear)", "Ultra Strong Stellar Shape for making Gears")); - ItemList.White_Dwarf_Shape_Extruder_Bottle.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Bottle)", - "Ultra Strong Stellar Shape for making Bottles")); - ItemList.White_Dwarf_Shape_Extruder_Rotor.set(addItem( - whiteDwarfIDs++, "White Dwarf Extruder Shape (Rotor)", "Ultra Strong Stellar Shape for a Rotor")); - ItemList.White_Dwarf_Shape_Extruder_Small_Gear.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Small Gear)", - "Ultra Strong Stellar Shape for a Small Gear")); - ItemList.White_Dwarf_Shape_Extruder_Turbine_Blade.set(addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Turbine Blade)", - "Ultra Strong Stellar Extruder Shape for a Turbine Blade")); - ItemList.White_Dwarf_Shape_Extruder_ToolHeadDrill.set(addItem( - whiteDwarfIDs, - "White Dwarf Extruder Shape (Drill Head)", - "White Dwarf Extruder Shape for a Drill Head")); + ItemList.White_Dwarf_Shape_Extruder_Plate.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Plate)", + "Ultra Strong Stellar Shape for making Plates")); + ItemList.White_Dwarf_Shape_Extruder_Rod.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Rod)", + "Ultra Strong Stellar Shape for making Rods")); + ItemList.White_Dwarf_Shape_Extruder_Bolt.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Bolt)", + "Ultra Strong Stellar Shape for making Bolts")); + ItemList.White_Dwarf_Shape_Extruder_Ring.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Ring)", + "Ultra Strong Stellar Shape for making Rings")); + ItemList.White_Dwarf_Shape_Extruder_Cell.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Cell)", + "Ultra Strong Stellar Shape for making Cells")); + ItemList.White_Dwarf_Shape_Extruder_Ingot.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Ingot)", + "Ultra Strong Stellar Shape for, wait, can't we just use a Furnace?")); + ItemList.White_Dwarf_Shape_Extruder_Wire.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Wire)", + "Ultra Strong Stellar Shape for making Wires")); + ItemList.White_Dwarf_Shape_Extruder_Casing.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Casing)", + "Ultra Strong Stellar Shape for making Item Casings")); + ItemList.White_Dwarf_Shape_Extruder_Pipe_Tiny.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Tiny Pipe)", + "Ultra Strong Stellar Shape for making tiny Pipes")); + ItemList.White_Dwarf_Shape_Extruder_Pipe_Small.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Small Pipe)", + "Ultra Strong Stellar Shape for making small Pipes")); + ItemList.White_Dwarf_Shape_Extruder_Pipe_Medium.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Normal Pipe)", + "Ultra Strong Stellar Shape for making Pipes")); + ItemList.White_Dwarf_Shape_Extruder_Pipe_Large.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Large Pipe)", + "Ultra Strong Stellar Shape for making large Pipes")); + ItemList.White_Dwarf_Shape_Extruder_Pipe_Huge.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Huge Pipe)", + "Ultra Strong Stellar Shape for making full Block Pipes")); + ItemList.White_Dwarf_Shape_Extruder_Block.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Block)", + "Ultra Strong Stellar Shape for making Blocks")); + ItemList.White_Dwarf_Shape_Extruder_Sword.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Sword Blade)", + "Ultra Strong Stellar Shape for making Swords")); + ItemList.White_Dwarf_Shape_Extruder_Pickaxe.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Pickaxe Head)", + "Ultra Strong Stellar Shape for making Pickaxes")); + ItemList.White_Dwarf_Shape_Extruder_Shovel.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Shovel Head)", + "Ultra Strong Stellar Shape for making Shovels")); + ItemList.White_Dwarf_Shape_Extruder_Axe.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Axe Head)", + "Ultra Strong Stellar Shape for making Axes")); + ItemList.White_Dwarf_Shape_Extruder_Hoe.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Hoe Head)", + "Ultra Strong Stellar Shape for making Hoes")); + ItemList.White_Dwarf_Shape_Extruder_Hammer.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Hammer Head)", + "Ultra Strong Stellar Shape for making Hammers")); + ItemList.White_Dwarf_Shape_Extruder_File.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (File Head)", + "Ultra Strong Stellar Shape for making Files")); + ItemList.White_Dwarf_Shape_Extruder_Saw.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Saw Blade)", + "Ultra Strong Stellar Shape for making Saws")); + ItemList.White_Dwarf_Shape_Extruder_Gear.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Gear)", + "Ultra Strong Stellar Shape for making Gears")); + ItemList.White_Dwarf_Shape_Extruder_Bottle.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Bottle)", + "Ultra Strong Stellar Shape for making Bottles")); + ItemList.White_Dwarf_Shape_Extruder_Rotor.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Rotor)", + "Ultra Strong Stellar Shape for a Rotor")); + ItemList.White_Dwarf_Shape_Extruder_Small_Gear.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Small Gear)", + "Ultra Strong Stellar Shape for a Small Gear")); + ItemList.White_Dwarf_Shape_Extruder_Turbine_Blade.set( + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Turbine Blade)", + "Ultra Strong Stellar Extruder Shape for a Turbine Blade")); + ItemList.White_Dwarf_Shape_Extruder_ToolHeadDrill.set( + addItem( + whiteDwarfIDs, + "White Dwarf Extruder Shape (Drill Head)", + "White Dwarf Extruder Shape for a Drill Head")); } @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 b7ec97c80f..7e50bd4556 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 @@ -1,24 +1,14 @@ package gregtech.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Item; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Util; -import gregtech.api.util.GT_Utility; import java.util.Arrays; import java.util.EnumMap; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; + import javax.annotation.Nullable; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -28,20 +18,34 @@ import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Util; +import gregtech.api.util.GT_Utility; + /** This class holds cells for non-GT fluids. */ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { + public static GT_MetaGenerated_Item_98 INSTANCE; /** * Registered fluids. * - * <p>When adding a fluid, don't forget to make sure that GregTech loads after the mod that adds - * that fluid! + * <p> + * When adding a fluid, don't forget to make sure that GregTech loads after the mod that adds that fluid! * - * <p>In order to avoid breaking existing worlds, fluids must not have their IDs changed! The - * only safe modification that can be made to this enum is adding new fluids, or removing - * existing fluids. When removing fluids, maybe leave a comment mentioning the old ID, so that - * we don't re-use it for a new fluid. + * <p> + * In order to avoid breaking existing worlds, fluids must not have their IDs changed! The only safe modification + * that can be made to this enum is adding new fluids, or removing existing fluids. When removing fluids, maybe + * leave a comment mentioning the old ID, so that we don't re-use it for a new fluid. */ public enum FluidCell { // Next unused ID: 22 @@ -84,8 +88,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { LIQUID_ENDER(3, "ender", CellType.REGULAR), // Hardcore Ender Expansion - ENDER_GOO(4, "endergoo", CellType.REGULAR), - ; + ENDER_GOO(4, "endergoo", CellType.REGULAR),; private final int mId; /** This is the Forge internal fluid name. */ @@ -117,8 +120,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** * Get a copy of this stack with stack size 1. * - * Always returns non-null stack even if the fluid referenced doesn't exist, - * so don't assume it's always valid. + * Always returns non-null stack even if the fluid referenced doesn't exist, so don't assume it's always valid. */ public ItemStack get() { trySetStack(); @@ -128,8 +130,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** * Get a copy of this cell WITHOUT copy. * - * Always returns non-null stack even if the fluid referenced doesn't exist, - * so don't assume it's always valid. + * Always returns non-null stack even if the fluid referenced doesn't exist, so don't assume it's always valid. * * Use with caution. */ @@ -141,8 +142,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** * Get a copy of this cell with specified stack size. * - * Always returns non-null stack even if the fluid referenced doesn't exist, - * so don't assume it's always valid. + * Always returns non-null stack even if the fluid referenced doesn't exist, so don't assume it's always valid. */ public ItemStack get(int aStackSize) { trySetStack(); @@ -158,6 +158,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** Cell type specifies the cell capacity, appearance, and item name format. */ private enum CellType { + REGULAR(1_000, OrePrefixes.cell), SMALL(144, OrePrefixes.cell), MOLTEN(144, OrePrefixes.cellMolten), @@ -174,6 +175,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** Struct class holding data that we need to properly handle a registered fluid cell item. */ private static class RegisteredFluidData { + private final Fluid fluid; private final short[] rgba; private final IIconContainer iconContainer; @@ -188,7 +190,8 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** * Map of ID to registered fluid data. * - * <p>Only contains IDs that were successfully registered. + * <p> + * Only contains IDs that were successfully registered. */ private final Map<Integer, RegisteredFluidData> registeredFluidDataMap; @@ -205,8 +208,8 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { } /** - * Loading needs to happen after the fluids we need have been registered, which means during post-load. - * However, cell icons seem to be deleted some time between load and post-load, so we must pre-cache them. + * Loading needs to happen after the fluids we need have been registered, which means during post-load. 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(); @@ -253,8 +256,9 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { // The fluid is not guaranteed to exist. // These fluids are non-GT fluids, so the mod may not be present. if (isStackAlreadySet) { - throw new RuntimeException("Cell item for fluid " + fluidName - + " has already been created, but the fluid doesn't exist during postload"); + throw new RuntimeException( + "Cell item for fluid " + fluidName + + " has already been created, but the fluid doesn't exist during postload"); } else { // fluid doesn't exist and this item has not been referenced return; @@ -269,8 +273,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { GT_LanguageManager.addStringLocalization( getUnlocalizedName(aCell.mStack) + ".name", - cellType.prefix.mLocalizedMaterialPre - + fluid.getLocalizedName(fluidStack) + cellType.prefix.mLocalizedMaterialPre + fluid.getLocalizedName(fluidStack) + cellType.prefix.mLocalizedMaterialPost); int color = fluid.getColor(); @@ -310,11 +313,8 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { @Override @SideOnly(Side.CLIENT) public void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aList) { - Arrays.stream(FluidCell.values()) - .filter(fluid -> FluidRegistry.getFluid(fluid.getFluidName()) != null) - .map(FluidCell::get) - .filter(Objects::nonNull) - .forEach(aList::add); + Arrays.stream(FluidCell.values()).filter(fluid -> FluidRegistry.getFluid(fluid.getFluidName()) != null) + .map(FluidCell::get).filter(Objects::nonNull).forEach(aList::add); } @Override 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 fb435a5b55..51d8405107 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 @@ -3,7 +3,16 @@ package gregtech.common.items; import static gregtech.api.enums.GT_Values.M; import static gregtech.api.enums.OrePrefixes.cellMolten; +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 com.google.common.collect.ImmutableList; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -14,20 +23,16 @@ 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; public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { + public static GT_MetaGenerated_Item_99 INSTANCE; /** * Ore prefixes appear in this list in the order in which they will be assigned ID blocks. * - * <p>In order to avoid breaking existing worlds, the entries in this list must not be re-ordered! The only safe + * <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( @@ -41,9 +46,8 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { private static final int NUM_CRACKED_CELL_TYPES = CRACKED_CELL_TYPES.size(); /** - * Assignment of metadata IDs: - * 0 - 999: Molten cells - * 10_000 - 15_999: Cracked fluid cells (# IDs used is NUM_CRACKED_CELL_TYPES * 1_000; update this if you add any) + * Assignment of metadata IDs: 0 - 999: Molten cells 10_000 - 15_999: Cracked fluid cells (# IDs used is + * NUM_CRACKED_CELL_TYPES * 1_000; update this if you add any) */ private BitSet enabled = new BitSet(); @@ -57,12 +61,10 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { continue; } - if ((tMaterial.contains(SubTag.SMELTING_TO_FLUID)) - && (!tMaterial.contains(SubTag.NO_SMELTING)) + 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 + if (tMaterial.mSmeltInto != tMaterial && tMaterial.mSmeltInto.mMetaItemSubID >= 0 && tMaterial.mSmeltInto.mMetaItemSubID < 1_000) { registerMolten(tMaterial.mSmeltInto, tMaterial.mSmeltInto.mMetaItemSubID); } @@ -83,9 +85,11 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { enabled.set(i); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".name", cellMolten.getDefaultLocalNameFormatForItem(tMaterial)); + getUnlocalizedName(tStack) + ".name", + cellMolten.getDefaultLocalNameFormatForItem(tMaterial)); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(cellMolten.mMaterialAmount / M)); + getUnlocalizedName(tStack) + ".tooltip", + tMaterial.getToolTip(cellMolten.mMaterialAmount / M)); if (cellMolten.mIsUnificatable) { GT_OreDictUnificator.set(cellMolten, tMaterial, tStack); @@ -101,9 +105,11 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { enabled.set(offset + i); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".name", prefix.getDefaultLocalNameFormatForItem(tMaterial)); + getUnlocalizedName(tStack) + ".name", + prefix.getDefaultLocalNameFormatForItem(tMaterial)); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(prefix.mMaterialAmount / M)); + getUnlocalizedName(tStack) + ".tooltip", + tMaterial.getToolTip(prefix.mMaterialAmount / M)); if (prefix.mIsUnificatable) { GT_OreDictUnificator.set(prefix, tMaterial, tStack); 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 b2fb154339..0ee136d7fb 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 @@ -1,5 +1,9 @@ package gregtech.common.items; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.items.GT_MetaGenerated_Tool; @@ -7,11 +11,9 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.common.tools.*; import gregtech.common.tools.pocket.*; -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 static final short SWORD = 0; public static final short PICKAXE = 2; public static final short SHOVEL = 4; @@ -572,300 +574,211 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { 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}); + 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 - }); + 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}); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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}); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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 - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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)}); + 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)}); + 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)}); + 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)}); + 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)}); + 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 5e307694f4..cfcedaa8b6 100644 --- a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java +++ b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java @@ -1,11 +1,13 @@ package gregtech.common.items; +import net.minecraft.item.ItemStack; + import gregtech.api.items.GT_Generic_Item; import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; -import net.minecraft.item.ItemStack; public class GT_NeutronReflector_Item extends GT_Generic_Item implements IReactorComponent { + public GT_NeutronReflector_Item(String aUnlocalized, String aEnglish, int aMaxDamage) { super(aUnlocalized, aEnglish, "Undestructable"); this.setMaxStackSize(64); @@ -13,15 +15,8 @@ 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); 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 ba744c216c..fbe8ab9728 100644 --- a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java +++ b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java @@ -1,14 +1,10 @@ package gregtech.common.items; -import cpw.mods.fml.relauncher.Side; -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; @@ -17,9 +13,16 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; + import shedar.mods.ic2.nuclearcontrol.api.*; +import cpw.mods.fml.relauncher.Side; +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; public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor, IPanelDataSource { + private static final UUID CARD_TYPE = new UUID(0L, 41L); private int strCount; @@ -38,8 +41,12 @@ 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"))); } } } diff --git a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java index 5c906152ed..db2efa4d81 100644 --- a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java +++ b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java @@ -6,27 +6,9 @@ import static ic2.core.util.LiquidUtil.drainContainerStack; import static ic2.core.util.LiquidUtil.fillContainerStack; import static ic2.core.util.LiquidUtil.placeFluid; -import com.gtnewhorizons.modularui.api.ModularUITextures; -import com.gtnewhorizons.modularui.api.math.Alignment; -import com.gtnewhorizons.modularui.api.math.Color; -import com.gtnewhorizons.modularui.api.math.MathExpression; -import com.gtnewhorizons.modularui.api.math.Pos2d; -import com.gtnewhorizons.modularui.api.math.Size; -import com.gtnewhorizons.modularui.api.screen.IItemWithModularUI; -import com.gtnewhorizons.modularui.api.screen.ModularWindow; -import com.gtnewhorizons.modularui.api.screen.UIBuildContext; -import com.gtnewhorizons.modularui.common.widget.VanillaButtonWidget; -import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; -import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.gui.modularui.GT_UITextures; -import gregtech.api.items.GT_Generic_Item; -import gregtech.api.util.GT_Utility; -import ic2.core.util.LiquidUtil; import java.util.List; import java.util.function.Function; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -49,7 +31,29 @@ import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; +import com.gtnewhorizons.modularui.api.ModularUITextures; +import com.gtnewhorizons.modularui.api.math.Alignment; +import com.gtnewhorizons.modularui.api.math.Color; +import com.gtnewhorizons.modularui.api.math.MathExpression; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; +import com.gtnewhorizons.modularui.api.screen.IItemWithModularUI; +import com.gtnewhorizons.modularui.api.screen.ModularWindow; +import com.gtnewhorizons.modularui.api.screen.UIBuildContext; +import com.gtnewhorizons.modularui.common.widget.VanillaButtonWidget; +import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; +import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.items.GT_Generic_Item; +import gregtech.api.util.GT_Utility; +import ic2.core.util.LiquidUtil; + public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContainerItem, IItemWithModularUI { + private final int maxCapacity; private final String unlocalFlaskName; @@ -72,17 +76,8 @@ 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; } @@ -333,6 +328,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain builder.setBackground(ModularUITextures.VANILLA_BACKGROUND); textField = new TextFieldWidget() { + @Override public void onDestroy() { if (isClient()) return; @@ -342,15 +338,12 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain }; textField.setText( String.valueOf(((GT_VolumetricFlask) getCurrentItem().getItem()).getCapacity(getCurrentItem()))); - builder.widget(textField - .setNumbers(() -> 1, () -> maxCapacity) - .setPattern(BaseTextFieldWidget.NATURAL_NUMS) - .setTextAlignment(Alignment.CenterLeft) - .setTextColor(Color.WHITE.dark(1)) - .setFocusOnGuiOpen(true) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD_LIGHT_GRAY.withOffset(-1, -1, 2, 2)) - .setPos(60, 55) - .setSize(59, 12)); + builder.widget( + textField.setNumbers(() -> 1, () -> maxCapacity).setPattern(BaseTextFieldWidget.NATURAL_NUMS) + .setTextAlignment(Alignment.CenterLeft).setTextColor(Color.WHITE.dark(1)) + .setFocusOnGuiOpen(true) + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD_LIGHT_GRAY.withOffset(-1, -1, 2, 2)) + .setPos(60, 55).setSize(59, 12)); addChangeAmountButton(builder, "+1", new Pos2d(20, 26), new Size(22, 20), val -> val + 1); addChangeAmountButton(builder, "+10", new Pos2d(48, 26), new Size(28, 20), val -> val + 10); @@ -360,34 +353,28 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain addChangeAmountButton(builder, "-10", new Pos2d(48, 75), new Size(28, 20), val -> val - 10); addChangeAmountButton(builder, "-100", new Pos2d(82, 75), new Size(32, 20), val -> val - 100); addChangeAmountButton(builder, "-1000", new Pos2d(120, 75), new Size(38, 20), val -> val - 1000); - builder.widget(new VanillaButtonWidget() - .setDisplayString("Accept") - .setClickableGetter(() -> MathExpression.parseMathExpression(textField.getText()) > 0) - .setOnClick((clickData, widget) -> { - if (widget.isClient()) { - textField.onRemoveFocus(); - } else { - widget.getWindow().tryClose(); - } - }) - .setPos(128, 51) - .setSize(38, 20)); + builder.widget( + new VanillaButtonWidget().setDisplayString("Accept") + .setClickableGetter(() -> MathExpression.parseMathExpression(textField.getText()) > 0) + .setOnClick((clickData, widget) -> { + if (widget.isClient()) { + textField.onRemoveFocus(); + } else { + widget.getWindow().tryClose(); + } + }).setPos(128, 51).setSize(38, 20)); return builder.build(); } - private void addChangeAmountButton( - ModularWindow.Builder builder, String text, Pos2d pos, Size size, Function<Integer, Integer> function) { - builder.widget(new VanillaButtonWidget() - .setDisplayString(text) - .setOnClick((clickData, widget) -> { - String currentText = textField.getText(); - int amount = (int) MathExpression.parseMathExpression(currentText, 1); - amount = Math.min(maxCapacity, Math.max(1, function.apply(amount))); - textField.setText(String.valueOf(amount)); - }) - .setPos(pos) - .setSize(size)); + private void addChangeAmountButton(ModularWindow.Builder builder, String text, Pos2d pos, Size size, + Function<Integer, Integer> function) { + builder.widget(new VanillaButtonWidget().setDisplayString(text).setOnClick((clickData, widget) -> { + String currentText = textField.getText(); + int amount = (int) MathExpression.parseMathExpression(currentText, 1); + amount = Math.min(maxCapacity, Math.max(1, function.apply(amount))); + textField.setText(String.valueOf(amount)); + }).setPos(pos).setSize(size)); } private ItemStack getCurrentItem() { diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java index d7af661e02..3882b71c98 100644 --- a/src/main/java/gregtech/common/items/ItemComb.java +++ b/src/main/java/gregtech/common/items/ItemComb.java @@ -2,8 +2,21 @@ package gregtech.common.items; import static gregtech.api.enums.GT_Values.*; +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.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -19,18 +32,9 @@ 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.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class ItemComb extends Item { + @SideOnly(Side.CLIENT) private IIcon secondIcon; @@ -98,92 +102,78 @@ public class ItemComb extends Item { public void initCombsRecipes() { // Organic - addProcessGT(CombType.LIGNIE, new Materials[] {Materials.Lignite}, Voltage.LV); - addProcessGT(CombType.COAL, new Materials[] {Materials.Coal}, Voltage.LV); + 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}, + 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); + 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 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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 Materials[] { Materials.Apatite, Materials.Phosphate }, + new int[] { 100 * 100, 80 * 100 }, new int[] {}, Voltage.ULV, NI, @@ -192,145 +182,138 @@ public class ItemComb extends Item { // ic2 addCentrifugeToItemStack( CombType.COOLANT, - new ItemStack[] {GT_Bees.drop.getStackForType(DropType.COOLANT), ItemList.FR_Wax.get(1)}, - new int[] {100 * 100, 100 * 100}, + 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}, + 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}, + 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 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.Cryotheum.getDust(1)}, - new int[] {50 * 100, 100 * 100}, + new ItemStack[] { ItemList.FR_RefractoryWax.get(1), Materials.Cryotheum.getDust(1) }, + new int[] { 50 * 100, 100 * 100 }, Voltage.MV); addCentrifugeToItemStack( CombType.BLIZZ, - new ItemStack[] {ItemList.FR_RefractoryWax.get(1), Materials.Blizz.getDust(1)}, - new int[] {50 * 100, 100 * 100}, + 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); + 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}, + 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 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 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 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 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 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 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 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 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 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 Materials[] { Materials.Bedrockium }, + new int[] { 50 * 100 }, new int[] {}, Voltage.EV, ItemList.FR_RefractoryWax.get(1), @@ -339,229 +322,204 @@ public class ItemComb extends Item { } else { addCentrifugeToMaterial( CombType.REDALLOY, - new Materials[] {Materials.RedAlloy, Materials.Redstone, Materials.Copper}, - new int[] {100 * 100, 75 * 100, 90 * 100}, + 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 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 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 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 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 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 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 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 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 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); + 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}, + 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); + 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}, + 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}, + 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); + 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 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}, + 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); + 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 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); + 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 - }, + 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); + 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}, + 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 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}, + 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 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 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}, + 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 Materials[] { Materials.Mithril, Materials.Platinum }, + new int[] { 75 * 100, 55 * 100 }, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), @@ -569,178 +527,168 @@ public class ItemComb extends Item { } // 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); + 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}, + 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); + 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}, + 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}, + 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 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 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}, + 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 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 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 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 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 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 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 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 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 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 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 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 Materials[] { Materials.Grossular, Materials.Aluminium, Materials.Silicon }, + new int[] { 100 * 100, 75 * 100, 75 * 100 }, new int[] {}, Voltage.ULV, NI, @@ -748,95 +696,95 @@ public class ItemComb extends Item { } // 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); + 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); + 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); + 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}, + 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 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 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 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 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 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 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 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 Materials[] { Materials.Sulfur }, + new int[] { 100 * 100 }, new int[] {}, Voltage.ULV, NI, @@ -844,45 +792,34 @@ public class ItemComb extends Item { } 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 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 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 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 Materials[] { Materials.Lead, Materials.Galena }, + new int[] { 100 * 100, 75 * 100 }, new int[] {}, Voltage.ULV, NI, @@ -890,30 +827,18 @@ public class ItemComb extends Item { 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 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 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, @@ -921,30 +846,18 @@ public class ItemComb extends Item { } 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 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 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, @@ -952,71 +865,65 @@ public class ItemComb extends Item { } 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 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 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 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 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 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 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 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 Materials[] { Materials.Arsenic, Materials.Bismuth, Materials.Antimony }, + new int[] { 80 * 100, 70 * 100, 70 * 100 }, new int[] {}, Voltage.ULV, NI, @@ -1024,237 +931,219 @@ public class ItemComb extends Item { } // 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); - 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); + 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); + 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}, + 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 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 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 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 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 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 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 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 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 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 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 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 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}, + 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); + 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 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 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 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 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 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 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 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 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 Materials[] { Materials.Neutronium, Materials.Americium }, + new int[] { 15 * 100, 35 * 100 }, new int[] {}, Voltage.UHV, NI, @@ -1264,126 +1153,96 @@ public class ItemComb extends Item { // 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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); + 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 Materials[] { Materials.HeeEndium }, + new int[] { 50 * 100 }, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), @@ -1391,143 +1250,132 @@ public class ItemComb extends Item { } 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}, + 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)}, + 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}, + 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}, + 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}, + 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); + 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 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); + 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 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 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 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 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 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 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 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 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 Materials[] { Materials.Trinium, Materials.Iridium }, + new int[] { 35 * 100, 45 * 100 }, new int[] {}, Voltage.ZPM, NI, @@ -1537,159 +1385,135 @@ public class ItemComb extends Item { // 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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}, + 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.INFINITYCATALYST, - new Materials[] {Materials.InfinityCatalyst, Materials.Neutronium}, - new int[] {(int) (25 * 100), 20 * 100}, + new Materials[] { Materials.InfinityCatalyst, Materials.Neutronium }, + new int[] { (int) (25 * 100), 20 * 100 }, new int[] {}, Voltage.ZPM, 100, @@ -1707,16 +1531,17 @@ public class ItemComb extends Item { // 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 - * **/ + * 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( @@ -1737,18 +1562,19 @@ public class ItemComb extends Item { null, fluid, 100 * 100, - (fluid.getFluid().getDensity() * 128 > 0 - ? (int) (fluid.getFluid().getDensity() * 100) - : 128), + (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. + * 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++) { @@ -1816,35 +1642,30 @@ public class ItemComb extends Item { } /** - * 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. + * 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) { + 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) { + 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); @@ -1871,7 +1692,7 @@ public class ItemComb extends Item { } /** - * @param volt required Tier of system. If it's lower than MV, it will also add forestry centrifuge. + * @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) { @@ -1923,6 +1744,7 @@ public class ItemComb extends Item { } enum Voltage { + ULV, LV, MV, @@ -1942,11 +1764,13 @@ public class ItemComb extends Item { public int getVoltage() { return (int) V[this.ordinal()]; } - /**@return aEU/t needed for chemical and autoclave process related to the Tier**/ + + /** @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 ...**/ + + /** @return Voltage tier according to EU provided. 0 = ULV, 1 = LV, 2 = MV ... **/ public int getChemicalEnergy() { return this.getVoltage() * 3 / 4; } @@ -1954,7 +1778,8 @@ public class ItemComb extends Item { 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**/ + + /** @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); @@ -1968,7 +1793,8 @@ public class ItemComb extends Item { return NF; } } - /**@return FluidStack needed for chemical process related to the Tier**/ + + /** @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 @@ -1976,38 +1802,41 @@ public class ItemComb extends Item { int fluidAmount = this.getFluidAmount(); switch (this.getVoltageFromEU()) { case 0: - /**ULV**/ + /** ULV **/ return Materials.Water.getFluid(fluidAmount); case 1: - /**LV**/ + /** LV **/ return Materials.SulfuricAcid.getFluid(fluidAmount); case 2: - /**MV**/ + /** MV **/ return Materials.HydrochloricAcid.getFluid(fluidAmount); case 3: - /**HV**/ + /** HV **/ return Materials.PhosphoricAcid.getFluid(fluidAmount); case 4: - /**EV**/ + /** EV **/ return Materials.HydrofluoricAcid.getFluid(this.getFluidAmount()); default: return Materials.PhthalicAcid.getFluid(fluidAmount); } } - /**@return additional required UU-Matter amount for Autoclave process related to the Tier**/ + + /** @return additional required UU-Matter amount for Autoclave process related to the Tier **/ 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**/ + + /** @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**/ + + /** @return Fluid amount needed for Chemical process related to the Tier **/ public int getFluidAmount() { return 9 * this.getSimpleTime() / 3; } - /**@return duration needed for Centrifuge process related to the Tier**/ + /** @return duration needed for Centrifuge process related to the Tier **/ public int getSimpleTime() { if (!GT_Mod.gregtechproxy.mNerfedCombs) { return 96 + this.ordinal() * 32; @@ -2016,7 +1845,8 @@ public class ItemComb extends Item { return 128 * (Math.max(1, this.ordinal())); } } - /**@return aEU/t needed for Centrifuge process related to the Tier**/ + + /** @return aEU/t needed for Centrifuge process related to the Tier **/ public int getSimpleEnergy() { if (this == Voltage.ULV) { return 5; diff --git a/src/main/java/gregtech/common/items/ItemDrop.java b/src/main/java/gregtech/common/items/ItemDrop.java index 37b9d583c5..4887e47722 100644 --- a/src/main/java/gregtech/common/items/ItemDrop.java +++ b/src/main/java/gregtech/common/items/ItemDrop.java @@ -3,6 +3,16 @@ package gregtech.common.items; import static gregtech.api.enums.GT_Values.MOD_ID; import static gregtech.api.enums.GT_Values.MOD_ID_DC; +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 net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -12,16 +22,9 @@ 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; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class ItemDrop extends Item { + @SideOnly(Side.CLIENT) private IIcon secondIcon; @@ -104,7 +107,7 @@ public class ItemDrop extends Item { 8); RecipeManagers.squeezerManager.addRecipe( 40, - new ItemStack[] {tDrop}, + new ItemStack[] { tDrop }, Materials.OilHeavy.getFluid(100L), GT_ModHandler.getModItem("Forestry", "propolis", 1L, 0), 30); @@ -117,7 +120,7 @@ public class ItemDrop extends Item { 8); RecipeManagers.squeezerManager.addRecipe( 40, - new ItemStack[] {tDrop}, + new ItemStack[] { tDrop }, new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 0), 30); @@ -130,7 +133,7 @@ public class ItemDrop extends Item { 8); RecipeManagers.squeezerManager.addRecipe( 40, - new ItemStack[] {tDrop}, + new ItemStack[] { tDrop }, new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), 30); @@ -151,7 +154,7 @@ public class ItemDrop extends Item { 2); RecipeManagers.squeezerManager.addRecipe( 400, - new ItemStack[] {tDrop}, + new ItemStack[] { tDrop }, new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), 30); @@ -172,7 +175,7 @@ public class ItemDrop extends Item { 8); RecipeManagers.squeezerManager.addRecipe( 400, - new ItemStack[] {tDrop}, + new ItemStack[] { tDrop }, new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), GT_ModHandler.getModItem("ExtraBees", "propolis", 1L, 2), 30); @@ -185,8 +188,8 @@ public class ItemDrop extends Item { 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) { + 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); } diff --git a/src/main/java/gregtech/common/items/ItemPollen.java b/src/main/java/gregtech/common/items/ItemPollen.java index 0532d52f9d..b2e2462585 100644 --- a/src/main/java/gregtech/common/items/ItemPollen.java +++ b/src/main/java/gregtech/common/items/ItemPollen.java @@ -2,18 +2,21 @@ 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 cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import forestry.api.core.Tabs; + public class ItemPollen extends Item { + @SideOnly(Side.CLIENT) private IIcon secondIcon; diff --git a/src/main/java/gregtech/common/items/ItemPropolis.java b/src/main/java/gregtech/common/items/ItemPropolis.java index dbb5f45786..c2d46a8249 100644 --- a/src/main/java/gregtech/common/items/ItemPropolis.java +++ b/src/main/java/gregtech/common/items/ItemPropolis.java @@ -3,6 +3,15 @@ package gregtech.common.items; import static gregtech.api.enums.GT_Values.MOD_ID; import static gregtech.api.enums.GT_Values.MOD_ID_DC; +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 net.minecraftforge.fluids.FluidRegistry; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -12,15 +21,9 @@ 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; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fluids.FluidRegistry; public class ItemPropolis extends Item { + @SideOnly(Side.CLIENT) private IIcon secondIcon; @@ -100,16 +103,31 @@ public class ItemPropolis extends Item { public void addProcessHV(ItemStack tPropolis, ItemStack aOutput2) { GT_Values.RA.addFluidExtractionRecipe( - tPropolis, aOutput2, FluidRegistry.getFluidStack("endergoo", 100), 5000, 50, 480); + 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); + 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); + 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 cb7499e862..b8cccb70b6 100644 --- a/src/main/java/gregtech/common/items/PollenType.java +++ b/src/main/java/gregtech/common/items/PollenType.java @@ -4,11 +4,10 @@ import gregtech.api.enums.Materials; import gregtech.api.util.GT_LanguageManager; public enum PollenType { + 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; @@ -25,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"); + "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 4d3d7407f8..15f4a2400b 100644 --- a/src/main/java/gregtech/common/items/PropolisType.java +++ b/src/main/java/gregtech/common/items/PropolisType.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Materials; import gregtech.api.util.GT_LanguageManager; public enum PropolisType { + End("End", true), Ectoplasma("Ectoplasma", true), Arcaneshard("Arcaneshard", true), @@ -14,8 +15,8 @@ public enum PropolisType { Endium("Endium", true), Fireessence("Fireessence", true); - private static int[] colours = - new int[] {0xCC00FA, 0xDCB0E5, 0x9010AD, 0xFFFF00, 0x911ECE, 0x161616, 0xEE053D, 0xa0ffff, 0xD41238}; + private static int[] colours = new int[] { 0xCC00FA, 0xDCB0E5, 0x9010AD, 0xFFFF00, 0x911ECE, 0x161616, 0xEE053D, + 0xa0ffff, 0xD41238 }; public boolean showInList; public Materials material; @@ -32,7 +33,7 @@ public enum PropolisType { } public String getName() { - // return "gt.comb."+this.name; + // return "gt.comb."+this.name; return GT_LanguageManager.addStringLocalization( "propolis." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Propolis"); 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 9c7d261eb6..93414ec8aa 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java @@ -1,9 +1,5 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.SubTag; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_Utility; -import gregtech.common.entities.GT_Entity_Arrow; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.IBlockSource; import net.minecraft.dispenser.IPosition; @@ -17,7 +13,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import gregtech.api.enums.SubTag; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; +import gregtech.common.entities.GT_Entity_Arrow; + public class Behaviour_Arrow extends Behaviour_None { + public static Behaviour_Arrow DEFAULT_WOODEN = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.0F, 6.0F); public static Behaviour_Arrow DEFAULT_PLASTIC = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.5F, 6.0F); private final int mLevel; @@ -30,12 +32,8 @@ 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; @@ -83,7 +81,13 @@ public class Behaviour_Arrow extends Behaviour_None { 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()); + aItem, + SubTag.PROJECTILE_ARROW, + aStack, + aWorld, + tPosition.getX(), + tPosition.getY(), + tPosition.getZ()); if (tEntityArrow != null) { tEntityArrow.setThrowableHeading( tFacing.getFrontOffsetX(), @@ -108,40 +112,33 @@ 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 8b2d4ab4ce..4397429018 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 @@ -1,8 +1,5 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.SubTag; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.common.entities.GT_Entity_Arrow_Potion; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -12,7 +9,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import gregtech.api.enums.SubTag; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.common.entities.GT_Entity_Arrow_Potion; + public class Behaviour_Arrow_Potion extends Behaviour_Arrow { + private final int[] mPotions; public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, int... aPotions) { @@ -20,8 +22,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; } @@ -31,9 +33,12 @@ 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)); } } } @@ -41,14 +46,8 @@ 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; } @@ -59,13 +58,8 @@ 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 c0bda95262..4a7beb453c 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 @@ -1,13 +1,8 @@ package gregtech.common.items.behaviors; -import gregtech.api.GregTech_API; -import gregtech.api.enums.SoundResource; -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; @@ -18,27 +13,25 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.GregTech_API; +import gregtech.api.enums.SoundResource; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.*; + 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; } @@ -90,38 +83,42 @@ 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) { + @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) { 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 + 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; + != 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); + 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; @@ -141,12 +138,9 @@ 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 + 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; + != null ? GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) : -1; if (tSide != -1) { int tCoverID = tCoverable.getCoverIDAtSide((byte) tSide); if (tCoverID == mCoverType) { 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 866eb6b9e9..9a8231cf4c 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java @@ -1,16 +1,18 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.SoundResource; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; 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 gregtech.api.enums.SoundResource; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + public class Behaviour_Crowbar extends Behaviour_None { + private final int mVanillaCosts; private final int mEUCosts; @@ -20,18 +22,8 @@ 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 f219db6e0c..8893245639 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java @@ -1,13 +1,16 @@ 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 gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; + public class Behaviour_DataOrb extends Behaviour_None { + public static void copyInventory(ItemStack[] aInventory, ItemStack[] aNewContent, int aIndexlength) { for (int i = 0; i < aIndexlength; i++) { if (aNewContent[i] == null) { 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 27efe7230d..1dbcd4691d 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java @@ -1,11 +1,14 @@ 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 gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; + public class Behaviour_DataStick extends Behaviour_None { + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { String tString = GT_Utility.ItemNBT.getBookTitle(aStack); 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 6194537a5b..933f30acb7 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java @@ -1,12 +1,7 @@ package gregtech.common.items.behaviors; -import cpw.mods.fml.common.eventhandler.Event; -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 gregtech.api.util.WorldSpawnedEventBuilder; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -15,7 +10,15 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.UseHoeEvent; +import cpw.mods.fml.common.eventhandler.Event; +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 gregtech.api.util.WorldSpawnedEventBuilder; + public class Behaviour_Hoe extends Behaviour_None { + private final int mCosts; private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.hoe", "Can till Dirt"); @@ -24,18 +27,8 @@ 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; } @@ -50,16 +43,13 @@ 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)) + 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) .setIdentifier(Blocks.farmland.stepSound.getStepResourcePath()) - .setPosition(aX + 0.5F, aY + 0.5F, aZ + 0.5F) - .setWorld(aWorld) - .run(); + .setPosition(aX + 0.5F, aY + 0.5F, aZ + 0.5F).setWorld(aWorld).run(); if (aWorld.isRemote) { return true; } 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 f18f9cd17a..db10ecfa8e 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java @@ -1,11 +1,7 @@ package gregtech.common.items.behaviors; -import codechicken.lib.math.MathHelper; -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; @@ -16,20 +12,27 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import codechicken.lib.math.MathHelper; +import gregtech.api.enums.SoundResource; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; + 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; @@ -69,34 +72,14 @@ 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; } @@ -147,10 +130,8 @@ 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 + 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); 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 f40d200410..ca6a1e8466 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java @@ -1,10 +1,7 @@ package gregtech.common.items.behaviors; -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; @@ -17,41 +14,27 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import gregtech.api.enums.SubTag; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; + public class Behaviour_None implements IItemBehaviour<GT_MetaBase_Item> { + @Override public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { return false; } @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; } @@ -66,8 +49,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) { @@ -94,25 +77,14 @@ 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; } 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 959e97aff3..c164695c36 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 @@ -1,54 +1,45 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.SoundResource; -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; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; + import thaumcraft.api.aspects.IEssentiaTransport; +import gregtech.api.enums.SoundResource; +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; 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 be14a44d09..e0d0f91e48 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 @@ -1,5 +1,14 @@ package gregtech.common.items.behaviors; +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 net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidHandler; + import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -8,36 +17,20 @@ 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; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.IFluidHandler; 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; } @@ -49,7 +42,13 @@ public class Behaviour_Plunger_Fluid extends Behaviour_None { || (((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); + aWorld, + SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, + 1.0F, + -1.0F, + aX, + aY, + aZ); return true; } } @@ -62,8 +61,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 e98702629b..1aeafc62fe 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 @@ -1,5 +1,14 @@ package gregtech.common.items.behaviors; +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 gregtech.api.enums.SoundResource; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.metatileentity.IMetaTileEntityItemPipe; @@ -8,36 +17,20 @@ 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; 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; } @@ -46,15 +39,14 @@ public class Behaviour_Plunger_Item extends Behaviour_None { 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)) + 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( @@ -68,7 +60,13 @@ public class Behaviour_Plunger_Item extends Behaviour_None { tEntity.motionZ = 0.0D; aWorld.spawnEntityInWorld(tEntity); GT_Utility.sendSoundToPlayers( - aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + 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 7562c0fb80..e3c4d58525 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java @@ -1,12 +1,15 @@ 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 gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; + public class Behaviour_PrintedPages extends Behaviour_None { + public static String getTitle(ItemStack aStack) { NBTTagCompound tNBT = aStack.getTagCompound(); if (tNBT == null) { 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 771e1f696f..1374a33f7d 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java @@ -1,5 +1,18 @@ package gregtech.common.items.behaviors; +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidBlock; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.SoundResource; @@ -13,23 +26,13 @@ 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; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.IFluidBlock; 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,18 +40,8 @@ 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; } @@ -59,14 +52,12 @@ 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 + 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("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; @@ -94,24 +85,26 @@ 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.")); + 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.")); + 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.")); + if (i < 4) GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("105", "Material is changing behind this Rock.")); break; } } @@ -125,13 +118,12 @@ 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("106", "Found traces of ") + tMaterial.mDefaultLocalName + GT_Utility.trans("101", " Ore.")); return true; } @@ -139,8 +131,7 @@ public class Behaviour_Prospecting extends Behaviour_None { } else { tMetaID = aWorld.getBlockMetadata(tX, tY, tZ); tAssociation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); - if (tAssociation != null - && tAssociation.mPrefix != null + if (tAssociation != null && tAssociation.mPrefix != null && tAssociation.mMaterial != null && tAssociation.mPrefix.toString().startsWith("ore")) { GT_Utility.sendChatToPlayer( 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 a24105bf75..ad8d99f6fb 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java @@ -1,12 +1,8 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.SoundResource; -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; @@ -14,24 +10,21 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; +import gregtech.api.enums.SoundResource; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; + 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<>(); 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 1cc81b764f..83d5ffffa3 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java @@ -1,21 +1,24 @@ package gregtech.common.items.behaviors; +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 forestry.api.lepidopterology.EnumFlutterType; import forestry.api.lepidopterology.IButterfly; 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; 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; @@ -30,23 +33,18 @@ public class Behaviour_Scoop extends Behaviour_None { if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { Object tButterfly = ((IEntityButterfly) aEntity).getButterfly(); - ((IButterfly) tButterfly) - .getGenome() - .getPrimary() - .getRoot() + ((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()))); + 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 2ab5167453..e2fa9d8f71 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java @@ -1,16 +1,18 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.SoundResource; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; 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 gregtech.api.enums.SoundResource; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + public class Behaviour_Screwdriver extends Behaviour_None { + private final int mVanillaCosts; private final int mEUCosts; @@ -20,18 +22,8 @@ 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 4dfc685103..75b4d9e431 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java @@ -1,37 +1,30 @@ package gregtech.common.items.behaviors; -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 gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_LanguageManager; +import ic2.api.crops.ICropTile; + 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; } 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 5b7fb8556f..62ceebd365 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java @@ -1,11 +1,7 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.ItemList; -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; @@ -14,23 +10,21 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import gregtech.api.enums.ItemList; +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; + 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"); + "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))) { 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 a102e07dcb..7c5780c42d 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java @@ -1,39 +1,32 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.SoundResource; -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 gregtech.api.enums.SoundResource; +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; + 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; } @@ -48,8 +41,8 @@ public class Behaviour_SoftHammer extends Behaviour_None { 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; } @@ -59,8 +52,8 @@ public class Behaviour_SoftHammer extends Behaviour_None { 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; } @@ -70,8 +63,8 @@ public class Behaviour_SoftHammer extends Behaviour_None { 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; } @@ -81,8 +74,8 @@ public class Behaviour_SoftHammer extends Behaviour_None { 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; } @@ -93,20 +86,18 @@ public class Behaviour_SoftHammer extends Behaviour_None { } return true; } - if ((aBlock == Blocks.piston) - || (aBlock == Blocks.sticky_piston) + 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) + if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) @@ -114,8 +105,8 @@ public class Behaviour_SoftHammer extends Behaviour_None { 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; } @@ -123,8 +114,8 @@ public class Behaviour_SoftHammer extends Behaviour_None { 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 c29591a560..a191d97209 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java @@ -1,9 +1,5 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.IItemBehaviour; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_Utility; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -11,7 +7,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.world.World; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; + public class Behaviour_Sonictron extends Behaviour_None { + public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Sonictron(); public static int getCurrentIndex(ItemStack aStack) { @@ -96,18 +98,8 @@ 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; } @@ -119,14 +111,18 @@ 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); + 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 2ea4eac2ad..a5a47ddb85 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 @@ -1,14 +1,9 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.ItemList; -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; @@ -19,7 +14,15 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.SoundResource; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; + public class Behaviour_Spray_Color extends Behaviour_None { + private final ItemStack mEmpty; private final ItemStack mUsed; private final ItemStack mFull; @@ -34,10 +37,10 @@ public class Behaviour_Spray_Color extends Behaviour_None { 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; @@ -51,18 +54,8 @@ public class Behaviour_Spray_Color 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) || (aStack.stackSize != 1)) { return false; } @@ -136,8 +129,7 @@ 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 + 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); diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Switch_Metadata.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Switch_Metadata.java index 69e5cb8a81..cd9deb570d 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Switch_Metadata.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Switch_Metadata.java @@ -1,10 +1,7 @@ package gregtech.common.items.behaviors; -import gregtech.api.items.GT_Generic_Block; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_Util; -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; @@ -12,7 +9,13 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import gregtech.api.items.GT_Generic_Block; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Util; +import gregtech.api.util.GT_Utility; + public class Behaviour_Switch_Metadata extends Behaviour_None { + public final int mSwitchIndex; public final boolean mCheckTarget, mShowModeSwitchTooltip; @@ -37,18 +40,8 @@ public class Behaviour_Switch_Metadata 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 aHitX, - float aHitY, - float aHitZ) { + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, + int aY, int aZ, int aSide, float aHitX, float aHitY, float aHitZ) { if (aStack != null && (aPlayer == null || aPlayer.isSneaking()) && !aWorld.isRemote) { if (mCheckTarget) { Block aBlock = aWorld.blockExists(aX, aY, aZ) ? aWorld.getBlock(aX, aY, aZ) : Blocks.air; 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 8ccbe915b9..64d2660c53 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java @@ -1,14 +1,8 @@ package gregtech.common.items.behaviors; -import gregtech.api.enums.SoundResource; -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_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; @@ -18,28 +12,27 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.enums.SoundResource; +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_ModHandler; +import gregtech.api.util.GT_Utility; +import ic2.api.tile.IWrenchable; + 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; } @@ -82,8 +75,7 @@ public class Behaviour_Wrench extends Behaviour_None { } return true; } - } catch (Throwable ignored) { - } + } 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))) { @@ -119,8 +111,7 @@ public class Behaviour_Wrench extends Behaviour_None { return true; } if (aMeta == aTargetSide) { - if ((aBlock == Blocks.pumpkin) - || (aBlock == Blocks.lit_pumpkin) + if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) @@ -141,37 +132,32 @@ public class Behaviour_Wrench extends Behaviour_None { return true; } } else { - if ((aBlock == Blocks.piston) - || (aBlock == Blocks.sticky_piston) + 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 ((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) + 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 ((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); } @@ -179,9 +165,8 @@ public class Behaviour_Wrench extends Behaviour_None { } } if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ)) - .contains(ForgeDirection.getOrientation(aTargetSide))) - && ((aPlayer.capabilities.isCreativeMode) - || (!GT_ModHandler.isElectricItem(aStack)) + .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) { 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 c923a54948..947442ad8e 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java @@ -1,10 +1,7 @@ package gregtech.common.items.behaviors; -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; @@ -12,21 +9,17 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +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; + 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) { + 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)); diff --git a/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java b/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java index b05e25e1c8..6e40e5860c 100644 --- a/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java +++ b/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java @@ -5,6 +5,7 @@ import net.minecraft.client.entity.EntityClientPlayerMP; 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. @@ -50,14 +51,14 @@ public class GT_ClientPollutionMap { int relX = chunkX - x0 + RADIUS; if (relX >= SIZE || relX < 0) // out of bounds - return; + return; int relZ = chunkZ - z0 + RADIUS; if (relZ >= SIZE || relZ < 0) // out of bounds - return; + return; pollution = pollution / 225; if (pollution > Short.MAX_VALUE) // Sanity - chunkMatrix[relX][relZ] = Short.MAX_VALUE; // Max pollution = 7,3mill + chunkMatrix[relX][relZ] = Short.MAX_VALUE; // Max pollution = 7,3mill else if (pollution < 0) chunkMatrix[relX][relZ] = 0; else chunkMatrix[relX][relZ] = (short) (pollution); } @@ -99,43 +100,39 @@ public class GT_ClientPollutionMap { int xDiff = chunkX - x0; int zDiff = chunkZ - z0; 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; - if (xOff < SIZE) { - chunkMatrix[x] = chunkMatrix[xOff].clone(); - } else { - chunkMatrix[x] = new short[SIZE]; - allEmpty[x] = true; - } + if (xDiff > 0) for (byte x = 0; x < SIZE; x++) { + int xOff = x + xDiff; + if (xOff < SIZE) { + chunkMatrix[x] = chunkMatrix[xOff].clone(); + } else { + chunkMatrix[x] = new short[SIZE]; + allEmpty[x] = true; } - else if (xDiff < 0) - for (byte x = SIZE - 1; x >= 0; x--) { - int xOff = x + xDiff; - if (xOff > 0) { - chunkMatrix[x] = chunkMatrix[xOff].clone(); - } else { - chunkMatrix[x] = new short[SIZE]; - allEmpty[x] = true; - } + } + else if (xDiff < 0) for (byte x = SIZE - 1; x >= 0; x--) { + int xOff = x + xDiff; + if (xOff > 0) { + chunkMatrix[x] = chunkMatrix[xOff].clone(); + } else { + chunkMatrix[x] = new short[SIZE]; + allEmpty[x] = true; } + } - if (zDiff > 0) - for (byte x = 0; x < SIZE; x++) { - if (allEmpty[x]) continue; - for (int z = 0; z < SIZE; z++) { - int zOff = z + zDiff; - chunkMatrix[x][z] = (zOff < SIZE) ? chunkMatrix[x][zOff] : 0; - } + if (zDiff > 0) for (byte x = 0; x < SIZE; x++) { + 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; - chunkMatrix[x][z] = (zOff > 0) ? 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; + chunkMatrix[x][z] = (zOff > 0) ? chunkMatrix[x][zOff] : 0; } + } x0 = chunkX; z0 = chunkZ; diff --git a/src/main/java/gregtech/common/misc/GT_Command.java b/src/main/java/gregtech/common/misc/GT_Command.java index 8c896253fa..c2af60523d 100644 --- a/src/main/java/gregtech/common/misc/GT_Command.java +++ b/src/main/java/gregtech/common/misc/GT_Command.java @@ -1,22 +1,25 @@ package gregtech.common.misc; -import com.gtnewhorizon.structurelib.StructureLib; -import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; -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 com.gtnewhorizon.structurelib.StructureLib; + +import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.IGlobalWirelessEnergy; +import gregtech.api.objects.GT_ChunkManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Pollution; + public final class GT_Command extends CommandBase implements IGlobalWirelessEnergy { @Override @@ -30,16 +33,18 @@ 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,73 +52,88 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner sender.addChatMessage(new ChatComponentText("\"toggle debugChunkloaders\" - toggles chunkloaders debug")); 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.")); + 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.")); 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( + "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_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)))) { + 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); + "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") - .filter(s -> test1.isEmpty() || s.startsWith(test1)) - .forEach(l::add); + "D1", + "D2", + "debugCleanroom", + "debugDriller", + "debugBlockPump", + "debugBlockMiner", + "debugWorldGen", + "debugEntityCramming", + "debugOrevein", + "debugSmallOres", + "debugStones", + "debugChunkloaders", + "debugMulti", + "debugWorldData").filter(s -> test1.isEmpty() || s.startsWith(test1)).forEach(l::add); } return l; } @@ -155,10 +175,11 @@ 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]); + int amount = (strings.length < 2) ? GT_Mod.gregtechproxy.mPollutionSmogLimit + : Integer.parseInt(strings[1]); GT_Pollution.addPollution( - sender.getEntityWorld().getChunkFromBlockCoords(coordinates.posX, coordinates.posZ), amount); + sender.getEntityWorld().getChunkFromBlockCoords(coordinates.posX, coordinates.posZ), + amount); break; case "global_energy_add": { String username = strings[1]; @@ -179,19 +200,26 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner + 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 + ".")); - else - sender.addChatMessage(new ChatComponentText( - "Failed to add " + EU_string_formatted + "EU to the global energy map of " - + formatted_username + ". Insufficient energy in network. ")); + 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 + + ".")); + else sender.addChatMessage( + new ChatComponentText( + "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.")); + new ChatComponentText( + formatted_username + " currently has " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(new BigInteger(getUserEU(uuid).toString())) + + EnumChatFormatting.RESET + + "EU in their network.")); break; } @@ -219,9 +247,14 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner 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; } @@ -240,11 +273,16 @@ 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.")); + sender.addChatMessage( + new ChatComponentText( + "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; } @@ -263,18 +301,24 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner 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; } @@ -292,9 +336,14 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner break; } - sender.addChatMessage(new ChatComponentText("User " + formatted_username + " has " - + EnumChatFormatting.RED + GT_Utility.formatNumbers(getUserEU(uuid)) + EnumChatFormatting.RESET - + "EU in their network.")); + sender.addChatMessage( + new ChatComponentText( + "User " + formatted_username + + " has " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(getUserEU(uuid)) + + EnumChatFormatting.RESET + + "EU in their network.")); break; } diff --git a/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java b/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java index 35a47fed87..9edee98725 100644 --- a/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java +++ b/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java @@ -2,25 +2,28 @@ package gregtech.common.misc; 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 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; + /** @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; @@ -140,9 +143,13 @@ 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); @@ -176,17 +183,19 @@ public class GT_DrillingLogicDelegate { } 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)'. */ + /** + * Returns NEGATIVE (eg -5) depth of current drilling Y world level. RELATIVELY TO MINER ENTITY! This means '(miner + * world Y) + depth = (actual world Y)'. + */ public int getTipDepth() { return tipDepth; } @@ -206,7 +215,10 @@ public class GT_DrillingLogicDelegate { } } - /** Creates and provides the Fake Player for owners. todo maybe will provide player owner uuid? im sure some servers not allow to fakers, in griefing reasons. */ + /** + * Creates and provides the Fake Player for owners. todo maybe will provide player owner uuid? im sure some servers + * not allow to fakers, in griefing reasons. + */ public FakePlayer getFakePlayer(IGregTechTileEntity te) { if (mFakePlayer == null) { mFakePlayer = GT_Utility.getFakePlayer(te); @@ -219,8 +231,8 @@ 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. */ diff --git a/src/main/java/gregtech/common/misc/GT_IDrillingLogicDelegateOwner.java b/src/main/java/gregtech/common/misc/GT_IDrillingLogicDelegateOwner.java index f290e8ac8c..9b10b6fcf0 100644 --- a/src/main/java/gregtech/common/misc/GT_IDrillingLogicDelegateOwner.java +++ b/src/main/java/gregtech/common/misc/GT_IDrillingLogicDelegateOwner.java @@ -1,9 +1,10 @@ package gregtech.common.misc; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; + /** @author Relvl on 27.01.2022 */ public interface GT_IDrillingLogicDelegateOwner extends IMetaTileEntity { diff --git a/src/main/java/gregtech/common/misc/GlobalEnergyWorldSavedData.java b/src/main/java/gregtech/common/misc/GlobalEnergyWorldSavedData.java index 621fb3beae..63cf6cfa60 100644 --- a/src/main/java/gregtech/common/misc/GlobalEnergyWorldSavedData.java +++ b/src/main/java/gregtech/common/misc/GlobalEnergyWorldSavedData.java @@ -2,16 +2,18 @@ package gregtech.common.misc; import static gregtech.common.misc.GlobalVariableStorage.*; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import java.io.*; import java.math.BigInteger; import java.util.HashMap; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraft.world.WorldSavedData; import net.minecraft.world.storage.MapStorage; import net.minecraftforge.event.world.WorldEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + public class GlobalEnergyWorldSavedData extends WorldSavedData { public static GlobalEnergyWorldSavedData INSTANCE; diff --git a/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java b/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java index 7ef0244b36..6c51663c47 100644 --- a/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java +++ b/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java @@ -1,9 +1,5 @@ package gregtech.common.net; -import com.google.common.io.ByteArrayDataInput; -import gregtech.api.net.GT_Packet_New; -import gregtech.common.items.GT_VolumetricFlask; -import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,8 +7,15 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import com.google.common.io.ByteArrayDataInput; + +import gregtech.api.net.GT_Packet_New; +import gregtech.common.items.GT_VolumetricFlask; +import io.netty.buffer.ByteBuf; + @Deprecated public final class MessageSetFlaskCapacity extends GT_Packet_New { + private int capacity, dimID, playerID; public MessageSetFlaskCapacity() { diff --git a/src/main/java/gregtech/common/net/MessageUpdateFluidDisplayItem.java b/src/main/java/gregtech/common/net/MessageUpdateFluidDisplayItem.java index 619f528502..8d3b60e0f0 100644 --- a/src/main/java/gregtech/common/net/MessageUpdateFluidDisplayItem.java +++ b/src/main/java/gregtech/common/net/MessageUpdateFluidDisplayItem.java @@ -1,16 +1,19 @@ package gregtech.common.net; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; + import com.google.common.io.ByteArrayDataInput; + import gregtech.api.interfaces.IHasFluidDisplayItem; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.net.GT_Packet_New; import io.netty.buffer.ByteBuf; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; public class MessageUpdateFluidDisplayItem extends GT_Packet_New { + private int mBlockX, mBlockY, mBlockZ, mDim; public MessageUpdateFluidDisplayItem() { diff --git a/src/main/java/gregtech/common/power/BasicMachineEUPower.java b/src/main/java/gregtech/common/power/BasicMachineEUPower.java index 9a858838a9..14f1d27a3f 100644 --- a/src/main/java/gregtech/common/power/BasicMachineEUPower.java +++ b/src/main/java/gregtech/common/power/BasicMachineEUPower.java @@ -3,6 +3,7 @@ package gregtech.common.power; import static gregtech.api.enums.GT_Values.V; public class BasicMachineEUPower extends EUPower { + protected static final String OC = " (OC)"; protected boolean wasOverclocked; @@ -36,9 +37,8 @@ public class BasicMachineEUPower extends EUPower { 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 + 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; diff --git a/src/main/java/gregtech/common/power/EUPower.java b/src/main/java/gregtech/common/power/EUPower.java index c074cc0b69..815ae0c190 100644 --- a/src/main/java/gregtech/common/power/EUPower.java +++ b/src/main/java/gregtech/common/power/EUPower.java @@ -4,6 +4,7 @@ import gregtech.api.enums.GT_Values; import gregtech.api.util.GT_Utility; public class EUPower extends Power { + protected final int amperage; protected int originalVoltage; diff --git a/src/main/java/gregtech/common/power/Power.java b/src/main/java/gregtech/common/power/Power.java index d4cd5c5342..13d1cc37c1 100644 --- a/src/main/java/gregtech/common/power/Power.java +++ b/src/main/java/gregtech/common/power/Power.java @@ -3,6 +3,7 @@ package gregtech.common.power; import gregtech.api.util.GT_Utility; public abstract class Power { + protected final byte tier; protected int recipeEuPerTick; protected int recipeDuration; diff --git a/src/main/java/gregtech/common/power/SteamPower.java b/src/main/java/gregtech/common/power/SteamPower.java index b6fd75850c..c79069e261 100644 --- a/src/main/java/gregtech/common/power/SteamPower.java +++ b/src/main/java/gregtech/common/power/SteamPower.java @@ -3,9 +3,10 @@ package gregtech.common.power; import gregtech.api.util.GT_Utility; public class SteamPower extends Power { + private final double euPerTickOverride; private final double durationOverride; - private final String[] STEAM_TIER_NAMES = {"Bronze", "Steel"}; + private final String[] STEAM_TIER_NAMES = { "Bronze", "Steel" }; public SteamPower(byte tier, double euPerTickMultiplier, double durationMultiplier) { super(tier); diff --git a/src/main/java/gregtech/common/power/UnspecifiedEUPower.java b/src/main/java/gregtech/common/power/UnspecifiedEUPower.java index 5ac85adfee..e411f03613 100644 --- a/src/main/java/gregtech/common/power/UnspecifiedEUPower.java +++ b/src/main/java/gregtech/common/power/UnspecifiedEUPower.java @@ -3,6 +3,7 @@ package gregtech.common.power; import gregtech.api.util.GT_Utility; public class UnspecifiedEUPower extends EUPower { + private final String VOLTAGE = GT_Utility.trans("271", "unspecified"); private final String AMPERAGE = GT_Utility.trans("271", "unspecified"); 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 41ccf9f98c..ad9b0798dc 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_BasicLogic extends GT_CircuitryBehavior { + public GT_Circuit_BasicLogic(int aIndex) { super(aIndex); } @@ -39,17 +40,16 @@ public class GT_Circuit_BasicLogic extends GT_CircuitryBehavior { aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 7) { aRedstoneCircuitBlock.setRedstone( - (byte) (15 - getStrongestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); + (byte) (15 - getStrongestRedstone(aRedstoneCircuitBlock)), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 9) { aRedstoneCircuitBlock.setRedstone( - (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) - ^ (getStrongestRedstone(aRedstoneCircuitBlock) - | getWeakestRedstone(aRedstoneCircuitBlock))), + (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) + (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) ^ getWeakestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 13) { 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 501f7b7785..f5d2fca824 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_BitAnd extends GT_CircuitryBehavior { + public GT_Circuit_BitAnd(int aIndex) { super(aIndex); } @@ -47,13 +48,8 @@ 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 + (byte) ((getStrongestRedstone(aRedstoneCircuitBlock) + & (aCircuitData[0] | aCircuitData[1] << 1 | aCircuitData[2] << 2 | aCircuitData[3] << 3)) != 0 ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java index 827e4a341e..67d8527606 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_CombinationLock extends GT_CircuitryBehavior { + public GT_Circuit_CombinationLock(int aIndex) { super(aIndex); } 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 c493e32e29..e162040f00 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_Equals extends GT_CircuitryBehavior { + public GT_Circuit_Equals(int aIndex) { super(aIndex); } @@ -33,10 +34,9 @@ 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)), + ((byte) (((aCircuitData[1] != 0) == (getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0])) + ? 0 + : 15)), aRedstoneCircuitBlock.getOutputFacing()); } 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 844817e4c3..7f6858b09f 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_Pulser extends GT_CircuitryBehavior { + public GT_Circuit_Pulser(int aIndex) { super(aIndex); } @@ -33,8 +34,7 @@ public class GT_Circuit_Pulser extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { - byte tRedstone = aCircuitData[1] == 0 - ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) + byte tRedstone = aCircuitData[1] == 0 ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) : getStrongestRedstone(aRedstoneCircuitBlock); if (aCircuitData[4] == 0) { aCircuitData[5] = tRedstone; @@ -49,10 +49,8 @@ public class GT_Circuit_Pulser extends GT_CircuitryBehavior { } } aRedstoneCircuitBlock.setRedstone( - (byte) - ((aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) - ? (byte) aCircuitData[1] - : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0), + (byte) ((aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) ? (byte) aCircuitData[1] + : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0), aRedstoneCircuitBlock.getOutputFacing()); } 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 e666d50e99..a8421d089b 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_Randomizer extends GT_CircuitryBehavior { + public GT_Circuit_Randomizer(int aIndex) { super(aIndex); } @@ -45,8 +46,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 2dd4f73bb5..7755630b26 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_RedstoneMeter extends GT_CircuitryBehavior { + public GT_Circuit_RedstoneMeter(int aIndex) { super(aIndex); } @@ -51,11 +52,8 @@ public class GT_Circuit_RedstoneMeter extends GT_CircuitryBehavior { 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), + (byte) (((tRedstone >= aCircuitData[0]) && (tRedstone <= aCircuitData[1]) ? 1 : 0) + != (aCircuitData[2] != 0 ? 1 : 0) ? (byte) aCircuitData[3] : 0), aRedstoneCircuitBlock.getOutputFacing()); } diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java index 61432610a9..b96762d73b 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_Repeater extends GT_CircuitryBehavior { + public GT_Circuit_Repeater(int aIndex) { super(aIndex); } 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 f207609940..c592d10e99 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; public class GT_Circuit_Timer extends GT_CircuitryBehavior { + public GT_Circuit_Timer(int aIndex) { super(aIndex); } diff --git a/src/main/java/gregtech/common/render/CosmicItemRendererGT.java b/src/main/java/gregtech/common/render/CosmicItemRendererGT.java index d8539a6f9a..cea0fd684f 100644 --- a/src/main/java/gregtech/common/render/CosmicItemRendererGT.java +++ b/src/main/java/gregtech/common/render/CosmicItemRendererGT.java @@ -1,12 +1,14 @@ package gregtech.common.render; -import fox.spiteful.avaritia.render.CosmicItemRenderer; import java.util.*; + import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.oredict.OreDictionary; +import fox.spiteful.avaritia.render.CosmicItemRenderer; + public class CosmicItemRendererGT extends CosmicItemRenderer { private static CosmicItemRendererGT sInstance = null; diff --git a/src/main/java/gregtech/common/render/GT_CapeRenderer.java b/src/main/java/gregtech/common/render/GT_CapeRenderer.java index 2d946efd04..1a6d44ca5b 100644 --- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java +++ b/src/main/java/gregtech/common/render/GT_CapeRenderer.java @@ -1,9 +1,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; @@ -12,21 +10,24 @@ import net.minecraft.potion.Potion; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderPlayerEvent; + import org.lwjgl.opengl.GL11; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; + 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/Steam.png"), - new ResourceLocation("gregtech:textures/Titanium.png"), - new ResourceLocation("gregtech:textures/Neutronium.png"), - new ResourceLocation("gregtech:textures/Stargate.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/Steam.png"), + new ResourceLocation("gregtech:textures/Titanium.png"), + new ResourceLocation("gregtech:textures/Neutronium.png"), + new ResourceLocation("gregtech:textures/Stargate.png") }; private final Collection<String> mCapeList; public GT_CapeRenderer(Collection<String> aCapeList) { @@ -84,14 +85,11 @@ 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 + 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 + 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 + 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; @@ -110,9 +108,9 @@ 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) + f7 += MathHelper.sin( + (aPlayer.prevDistanceWalkedModified + + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) * 32.0F * f10; diff --git a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java index 2f6c691253..f0df8277ee 100644 --- a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java +++ b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java @@ -1,14 +1,16 @@ package gregtech.common.render; -import gregtech.api.interfaces.IBlockContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.util.LightingHelper; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.interfaces.IBlockContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.util.LightingHelper; + public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, IBlockContainer { + private final Block mBlock; private final byte mSide, mMeta; @@ -34,8 +36,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I final IIcon aIcon = getIcon(ForgeDirection.EAST.ordinal()); aRenderer.field_152631_f = true; startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f); - new LightingHelper(aRenderer) - .setupLightingXPos(aBlock, aX, aY, aZ) + new LightingHelper(aRenderer).setupLightingXPos(aBlock, aX, aY, aZ) .setupColor(ForgeDirection.EAST.ordinal(), 0xffffff); aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); @@ -46,8 +47,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f); final IIcon aIcon = getIcon(ForgeDirection.WEST.ordinal()); - new LightingHelper(aRenderer) - .setupLightingXNeg(aBlock, aX, aY, aZ) + new LightingHelper(aRenderer).setupLightingXNeg(aBlock, aX, aY, aZ) .setupColor(ForgeDirection.WEST.ordinal(), 0xffffff); aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); @@ -57,8 +57,7 @@ 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) + new LightingHelper(aRenderer).setupLightingYPos(aBlock, aX, aY, aZ) .setupColor(ForgeDirection.UP.ordinal(), 0xffffff); aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); @@ -68,8 +67,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f); final IIcon aIcon = getIcon(ForgeDirection.DOWN.ordinal()); - new LightingHelper(aRenderer) - .setupLightingYNeg(aBlock, aX, aY, aZ) + new LightingHelper(aRenderer).setupLightingYNeg(aBlock, aX, aY, aZ) .setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff); aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); @@ -79,8 +77,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f); final IIcon aIcon = getIcon(ForgeDirection.SOUTH.ordinal()); - new LightingHelper(aRenderer) - .setupLightingZPos(aBlock, aX, aY, aZ) + new LightingHelper(aRenderer).setupLightingZPos(aBlock, aX, aY, aZ) .setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff); aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); @@ -91,8 +88,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f); final IIcon aIcon = getIcon(ForgeDirection.NORTH.ordinal()); aRenderer.field_152631_f = true; - new LightingHelper(aRenderer) - .setupLightingZNeg(aBlock, aX, aY, aZ) + new LightingHelper(aRenderer).setupLightingZNeg(aBlock, aX, aY, aZ) .setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff); aRenderer.renderFaceZNeg(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 5b9ed1bb29..c96c57398d 100644 --- a/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java +++ b/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java @@ -1,15 +1,17 @@ package gregtech.common.render; -import gregtech.api.interfaces.IBlockContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.util.GT_RenderingWorld; -import gregtech.api.util.LightingHelper; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.interfaces.IBlockContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.util.GT_RenderingWorld; +import gregtech.api.util.LightingHelper; + class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBlockContainer { + private final Block mBlock; private final byte mSide, mMeta; @@ -40,10 +42,9 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc final IIcon aIcon = getIcon(ForgeDirection.EAST.ordinal(), aX, aY, aZ, aRenderer); aRenderer.field_152631_f = true; 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)); + new LightingHelper(aRenderer).setupLightingXPos(aBlock, 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,10 +54,9 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f); 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)); + new LightingHelper(aRenderer).setupLightingXNeg(aBlock, aX, aY, aZ).setupColor( + ForgeDirection.WEST.ordinal(), + mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -65,8 +65,7 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc 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(), aX, aY, aZ, aRenderer); - new LightingHelper(aRenderer) - .setupLightingYPos(aBlock, aX, aY, aZ) + new LightingHelper(aRenderer).setupLightingYPos(aBlock, aX, aY, aZ) .setupColor(ForgeDirection.UP.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); @@ -76,10 +75,9 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f); 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)); + new LightingHelper(aRenderer).setupLightingYNeg(aBlock, aX, aY, aZ).setupColor( + ForgeDirection.DOWN.ordinal(), + mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -88,10 +86,9 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f); 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)); + new LightingHelper(aRenderer).setupLightingZPos(aBlock, aX, aY, aZ).setupColor( + ForgeDirection.SOUTH.ordinal(), + mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -101,10 +98,9 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f); final IIcon aIcon = getIcon(ForgeDirection.NORTH.ordinal(), aX, aY, aZ, aRenderer); aRenderer.field_152631_f = true; - new LightingHelper(aRenderer) - .setupLightingZNeg(aBlock, aX, aY, aZ) - .setupColor( - ForgeDirection.NORTH.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); + new LightingHelper(aRenderer).setupLightingZNeg(aBlock, 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 18fb47cffc..3523b0f4b6 100644 --- a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java +++ b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java @@ -1,10 +1,5 @@ package gregtech.common.render; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.ItemList; -import gregtech.common.items.GT_VolumetricFlask; -import ic2.core.util.DrawUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; @@ -14,10 +9,18 @@ import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.fluids.FluidStack; + import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; +import gregtech.common.items.GT_VolumetricFlask; +import ic2.core.util.DrawUtil; + @SideOnly(Side.CLIENT) public final class GT_FlaskRenderer implements IItemRenderer { + public GT_FlaskRenderer() { MinecraftForgeClient.registerItemRenderer(ItemList.VOLUMETRIC_FLASK.getItem(), this); } diff --git a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java index caec5e1581..8862f41861 100644 --- a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java +++ b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java @@ -1,11 +1,5 @@ package gregtech.common.render; -import appeng.util.ReadableNumberConverter; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.common.items.GT_FluidDisplayItem; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.OpenGlHelper; @@ -14,8 +8,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; + import org.lwjgl.opengl.GL11; +import appeng.util.ReadableNumberConverter; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.common.items.GT_FluidDisplayItem; + @SideOnly(Side.CLIENT) public class GT_FluidDisplayStackRenderer implements IItemRenderer { @@ -85,7 +87,11 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { GL11.glScalef(smallTextScale, smallTextScale, 1.0f); fontRender.drawString( - amountString, 0, (int) (16 / smallTextScale) - fontRender.FONT_HEIGHT + 1, 0xFFFFFF, true); + amountString, + 0, + (int) (16 / smallTextScale) - fontRender.FONT_HEIGHT + 1, + 0xFFFFFF, + true); GL11.glPopMatrix(); GL11.glDisable(GL11.GL_ALPHA_TEST); } diff --git a/src/main/java/gregtech/common/render/GT_IconFlipped.java b/src/main/java/gregtech/common/render/GT_IconFlipped.java index 7cd44a7e70..8258e74ffa 100644 --- a/src/main/java/gregtech/common/render/GT_IconFlipped.java +++ b/src/main/java/gregtech/common/render/GT_IconFlipped.java @@ -1,11 +1,13 @@ package gregtech.common.render; +import net.minecraft.util.IIcon; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.util.IIcon; @SideOnly(Side.CLIENT) public class GT_IconFlipped implements IIcon { + private final IIcon baseIcon; private final boolean flipU; private final boolean flipV; 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 52e99f4539..1f7e72387a 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 @@ -1,10 +1,5 @@ package gregtech.common.render; -import gregtech.api.enums.Materials; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.IToolStats; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_Utility; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; @@ -13,9 +8,17 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; + import org.lwjgl.opengl.GL11; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_Utility; + public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { + public GT_MetaGenerated_Tool_Renderer() { for (GT_MetaGenerated_Tool tItem : GT_MetaGenerated_Tool.sInstances.values()) { if (tItem != null) { @@ -36,8 +39,8 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { } @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; } @@ -157,9 +160,8 @@ 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(); @@ -207,10 +209,8 @@ 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; diff --git a/src/main/java/gregtech/common/render/GT_MultiTexture.java b/src/main/java/gregtech/common/render/GT_MultiTexture.java index df5251f784..d3cff271cb 100644 --- a/src/main/java/gregtech/common/render/GT_MultiTexture.java +++ b/src/main/java/gregtech/common/render/GT_MultiTexture.java @@ -1,15 +1,21 @@ package gregtech.common.render; -import gregtech.GT_Mod; -import gregtech.api.interfaces.ITexture; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; +import gregtech.GT_Mod; +import gregtech.api.interfaces.ITexture; + /** - * <p>Lets Multiple ITextures Render overlay over each other.<</p> - * <p>I should have done this much earlier...</p> + * <p> + * Lets Multiple ITextures Render overlay over each other.< + * </p> + * <p> + * I should have done this much earlier... + * </p> */ public class GT_MultiTexture extends GT_TextureBase implements ITexture { + protected final ITexture[] mTextures; public static GT_MultiTexture get(ITexture... aTextures) { diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java index 99689a535d..ea8d5d1310 100644 --- a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java +++ b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java @@ -1,14 +1,5 @@ package gregtech.common.render; -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 cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.GT_Mod; -import gregtech.common.entities.GT_EntityFXPollution; -import gregtech.common.misc.GT_ClientPollutionMap; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; @@ -21,10 +12,22 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.World; import net.minecraftforge.client.event.EntityViewRenderEvent; import net.minecraftforge.event.world.WorldEvent; + import org.lwjgl.opengl.GL11; +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 cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.GT_Mod; +import gregtech.common.entities.GT_EntityFXPollution; +import gregtech.common.misc.GT_ClientPollutionMap; + @SideOnly(Side.CLIENT) public class GT_PollutionRenderer { + private static GT_ClientPollutionMap pollutionMap; private static int playerPollution = 0; @@ -40,11 +43,11 @@ public class GT_PollutionRenderer { // 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}; - private static final short[] grassColor = {230, 180, 40}; - private static final short[] leavesColor = {160, 80, 15}; - private static final short[] liquidColor = {160, 200, 10}; - private static final short[] foliageColor = {160, 80, 15}; + private static final float[] fogColor = { 0.3f, 0.25f, 0.1f }; + private static final short[] grassColor = { 230, 180, 40 }; + private static final short[] leavesColor = { 160, 80, 15 }; + 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. @@ -128,7 +131,8 @@ public class GT_PollutionRenderer { if (!GT_Mod.gregtechproxy.mRenderPollutionFog) return; if ((!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) - || (fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO)) return; + || (fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO)) + return; if (event.fogMode == 0) { double v = 1 - fogIntensityLastTick / FOG_START_EXP_RATIO; @@ -146,10 +150,10 @@ public class GT_PollutionRenderer { if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) return; - if (event.entity.isPotionActive(Potion.blindness) - || (fogIntensityLastTick < FOG_START_EXP_RATIO) + if (event.entity.isPotionActive(Potion.blindness) || (fogIntensityLastTick < FOG_START_EXP_RATIO) || event.block.getMaterial() == Material.water - || event.block.getMaterial() == Material.lava) return; + || 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; @@ -185,15 +189,13 @@ public class GT_PollutionRenderer { } else if (DEBUG) { drawPollution("Intensity: " + (fogIntensityLastTick * 10000), 0); drawPollution( - "Pollution: " - + pollutionMap.getPollution( - Minecraft.getMinecraft().thePlayer.lastTickPosX, - Minecraft.getMinecraft().thePlayer.lastTickPosZ), + "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), + "Density: " + ((float) (Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F) / 5 + 0.01F) + * 10000), 40); } } diff --git a/src/main/java/gregtech/common/render/GT_RenderUtil.java b/src/main/java/gregtech/common/render/GT_RenderUtil.java index c4def72fd1..be0e0ac0b6 100644 --- a/src/main/java/gregtech/common/render/GT_RenderUtil.java +++ b/src/main/java/gregtech/common/render/GT_RenderUtil.java @@ -1,13 +1,15 @@ package gregtech.common.render; -import gregtech.api.items.GT_MetaGenerated_Item; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; + import org.lwjgl.opengl.GL11; +import gregtech.api.items.GT_MetaGenerated_Item; + public class GT_RenderUtil { public static void colorGTItem(ItemStack aStack) { @@ -21,8 +23,8 @@ public class GT_RenderUtil { } } - public static void renderBlockIcon( - RenderBlocks aRenderer, Block aBlock, double aX, double aY, double aZ, IIcon aIcon, byte aSide) { + public static void renderBlockIcon(RenderBlocks aRenderer, Block aBlock, double aX, double aY, double aZ, + IIcon aIcon, byte aSide) { switch (aSide) { case 0: aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); @@ -49,16 +51,8 @@ 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 3c12c9589d..5346a101d1 100644 --- a/src/main/java/gregtech/common/render/GT_RenderedTexture.java +++ b/src/main/java/gregtech/common/render/GT_RenderedTexture.java @@ -2,11 +2,22 @@ package gregtech.common.render; import static gregtech.api.util.LightingHelper.MAX_BRIGHTNESS; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import com.gtnewhorizon.structurelib.alignment.enumerable.Flip; import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; + import gregtech.GT_Mod; import gregtech.api.interfaces.IColorModulationContainer; import gregtech.api.interfaces.IIconContainer; @@ -14,30 +25,17 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.LightingHelper; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class GT_RenderedTexture extends GT_TextureBase implements ITexture, IColorModulationContainer { + protected final IIconContainer mIconContainer; private final short[] mRGBa; private final boolean glow; 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; @@ -214,8 +212,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: @@ -240,7 +238,9 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol z, useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped ? new GT_IconFlipped( - icon, aFlip.isHorizontallyFlipped() ^ !stdOrient, aFlip.isVerticallyFliped()) + icon, + aFlip.isHorizontallyFlipped() ^ !stdOrient, + aFlip.isVerticallyFliped()) : new GT_IconFlipped(icon, !stdOrient, false)); aRenderer.uvRotateBottom = 0; } @@ -248,8 +248,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol /** * 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: @@ -279,10 +279,10 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } /** - * Renders the given texture to the north (z-negative) face of the block. Args: block, x, y, z, texture + * 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) { @@ -314,10 +314,10 @@ 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 + * 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: @@ -347,10 +347,10 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } /** - * Renders the given texture to the west (x-negative) face of the block. Args: block, x, y, z, texture + * 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: @@ -380,10 +380,10 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } /** - * Renders the given texture to the east (x-positive) face of the block. Args: block, x, y, z, texture + * 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) { @@ -427,8 +427,7 @@ 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 5831c76bf4..454982b48c 100644 --- a/src/main/java/gregtech/common/render/GT_Renderer_Block.java +++ b/src/main/java/gregtech/common/render/GT_Renderer_Block.java @@ -21,6 +21,19 @@ 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 net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EffectRenderer; +import net.minecraft.client.particle.EntityDiggingFX; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +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 cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; @@ -36,19 +49,9 @@ import gregtech.api.objects.XSTR; import gregtech.common.blocks.GT_Block_Machines; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EffectRenderer; -import net.minecraft.client.particle.EntityDiggingFX; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -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; public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { + public static final float blockMin = 0.0F; public static final float blockMax = 1.0F; private static final float coverThickness = blockMax / 8.0F; @@ -63,34 +66,44 @@ 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); @@ -103,14 +116,8 @@ 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); @@ -471,8 +478,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; @@ -489,11 +496,18 @@ 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) @@ -504,7 +518,8 @@ 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( + effectRenderer.addEffect( + (new EntityDiggingFX( world, bX, bY, @@ -513,8 +528,7 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { bY - y - 0.5, bZ - z - 0.5, block, - block.getDamageValue(world, x, y, z))) - .applyColourMultiplier(x, y, z)); + block.getDamageValue(world, x, y, z))).applyColourMultiplier(x, y, z)); } } } @@ -610,24 +624,65 @@ 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); + 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); + 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); + 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); + 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); + 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) + 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))) { - renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer); - } + renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer); + } aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); } @@ -756,7 +811,12 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { 0, 0, tMetaTileEntity.getTexture( - iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + iGregTechTileEntity, + (byte) DOWN.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), true); renderPositiveYFacing( null, @@ -766,7 +826,12 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { 0, 0, tMetaTileEntity.getTexture( - iGregTechTileEntity, (byte) UP.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + iGregTechTileEntity, + (byte) UP.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), true); renderNegativeZFacing( null, @@ -776,7 +841,12 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { 0, 0, tMetaTileEntity.getTexture( - iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + iGregTechTileEntity, + (byte) NORTH.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), true); renderPositiveZFacing( null, @@ -786,7 +856,12 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { 0, 0, tMetaTileEntity.getTexture( - iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + iGregTechTileEntity, + (byte) SOUTH.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), true); renderNegativeXFacing( null, @@ -796,7 +871,12 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { 0, 0, tMetaTileEntity.getTexture( - iGregTechTileEntity, (byte) WEST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + iGregTechTileEntity, + (byte) WEST.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), true); renderPositiveXFacing( null, @@ -806,24 +886,22 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { 0, 0, tMetaTileEntity.getTexture( - iGregTechTileEntity, (byte) EAST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + 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) { @@ -833,19 +911,12 @@ 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) { @@ -855,19 +926,12 @@ 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) { @@ -877,19 +941,12 @@ 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) { @@ -899,19 +956,12 @@ 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) { @@ -921,19 +971,12 @@ 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) { @@ -944,8 +987,8 @@ 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) { @@ -959,13 +1002,11 @@ 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)) { diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java b/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java index 7feb8ce1b8..028573fdaf 100644 --- a/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java +++ b/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java @@ -1,11 +1,13 @@ package gregtech.common.render; -import cpw.mods.fml.client.registry.RenderingRegistry; import net.minecraft.client.renderer.entity.RenderArrow; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import cpw.mods.fml.client.registry.RenderingRegistry; + public class GT_Renderer_Entity_Arrow extends RenderArrow { + private final ResourceLocation mTexture; public GT_Renderer_Entity_Arrow(Class aArrowClass, String aTextureName) { diff --git a/src/main/java/gregtech/common/render/GT_SidedTexture.java b/src/main/java/gregtech/common/render/GT_SidedTexture.java index 4fbc28374a..912e339208 100644 --- a/src/main/java/gregtech/common/render/GT_SidedTexture.java +++ b/src/main/java/gregtech/common/render/GT_SidedTexture.java @@ -1,40 +1,30 @@ package gregtech.common.render; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; + import gregtech.api.interfaces.IColorModulationContainer; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; public class GT_SidedTexture extends GT_TextureBase implements ITexture, IColorModulationContainer { + protected final ITexture[] mTextures; /** * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!! * <p/> - * Just set this variable to another different Array instead. - * Otherwise some colored things will get Problems. + * Just set this variable to another different Array instead. Otherwise some colored things will get Problems. */ 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[] { - TextureFactory.of(aIcon0, aRGBa, aAllowAlpha), - TextureFactory.of(aIcon1, aRGBa, aAllowAlpha), - TextureFactory.of(aIcon2, aRGBa, aAllowAlpha), - TextureFactory.of(aIcon3, aRGBa, aAllowAlpha), - TextureFactory.of(aIcon4, aRGBa, aAllowAlpha), - TextureFactory.of(aIcon5, aRGBa, aAllowAlpha) - }; + mTextures = new ITexture[] { TextureFactory.of(aIcon0, aRGBa, aAllowAlpha), + TextureFactory.of(aIcon1, aRGBa, aAllowAlpha), TextureFactory.of(aIcon2, aRGBa, aAllowAlpha), + TextureFactory.of(aIcon3, aRGBa, aAllowAlpha), TextureFactory.of(aIcon4, aRGBa, aAllowAlpha), + TextureFactory.of(aIcon5, aRGBa, aAllowAlpha) }; mRGBa = aRGBa; } diff --git a/src/main/java/gregtech/common/render/GT_TextureBase.java b/src/main/java/gregtech/common/render/GT_TextureBase.java index bb39410a8e..20188e2e01 100644 --- a/src/main/java/gregtech/common/render/GT_TextureBase.java +++ b/src/main/java/gregtech/common/render/GT_TextureBase.java @@ -1,11 +1,13 @@ package gregtech.common.render; -import gregtech.api.interfaces.ITexture; -import gregtech.api.util.GT_UtilityClient; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; +import gregtech.api.interfaces.ITexture; +import gregtech.api.util.GT_UtilityClient; + public abstract class GT_TextureBase implements ITexture { + protected boolean isDrawing = false; @Override diff --git a/src/main/java/gregtech/common/render/GT_TextureBuilder.java b/src/main/java/gregtech/common/render/GT_TextureBuilder.java index 0971933add..d3941bea24 100644 --- a/src/main/java/gregtech/common/render/GT_TextureBuilder.java +++ b/src/main/java/gregtech/common/render/GT_TextureBuilder.java @@ -1,19 +1,22 @@ package gregtech.common.render; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraftforge.common.util.ForgeDirection; + import gregtech.GT_Mod; import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.ITextureBuilder; -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", "ClassWithTooManyFields"}) +@SuppressWarnings({ "unused", "ClassWithTooManyFields" }) public class GT_TextureBuilder implements ITextureBuilder { + private final List<IIconContainer> iconContainerList; private final List<ITexture> textureLayers; private Block fromBlock; @@ -134,8 +137,8 @@ public class GT_TextureBuilder implements ITextureBuilder { } 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 a29ea6b6f9..0f3a472e53 100644 --- a/src/main/java/gregtech/common/render/IRenderedBlock.java +++ b/src/main/java/gregtech/common/render/IRenderedBlock.java @@ -1,15 +1,17 @@ package gregtech.common.render; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.ItemStack; import net.minecraft.world.IBlockAccess; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; + public interface IRenderedBlock { + /** @return the Textures to be rendered */ @SideOnly(Side.CLIENT) ITexture[] getTexture(Block aBlock, byte aSide, int aRenderPass, boolean[] aShouldSideBeRendered); @@ -50,6 +52,7 @@ public interface IRenderedBlock { IRenderedBlock passRenderingToObject(IBlockAccess aWorld, int aX, int aY, int aZ); class ErrorRenderer implements IRenderedBlockSideCheck, IRenderedBlock { + public static final ErrorRenderer INSTANCE = new ErrorRenderer(); public ITexture[] mErrorTexture = Textures.BlockIcons.ERROR_RENDERING; diff --git a/src/main/java/gregtech/common/render/IRenderedBlockSideCheck.java b/src/main/java/gregtech/common/render/IRenderedBlockSideCheck.java index ef0c469f04..1d109216de 100644 --- a/src/main/java/gregtech/common/render/IRenderedBlockSideCheck.java +++ b/src/main/java/gregtech/common/render/IRenderedBlockSideCheck.java @@ -1,11 +1,13 @@ package gregtech.common.render; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public interface IRenderedBlockSideCheck { + /** returning false stops all the other Rendering from happening on that Side. */ @SideOnly(Side.CLIENT) boolean renderFullBlockSide(Block aBlock, RenderBlocks aRenderer, byte aSide); diff --git a/src/main/java/gregtech/common/render/items/CosmicNeutroniumRenderer.java b/src/main/java/gregtech/common/render/items/CosmicNeutroniumRenderer.java index 5a9cda6559..5a67abf85a 100644 --- a/src/main/java/gregtech/common/render/items/CosmicNeutroniumRenderer.java +++ b/src/main/java/gregtech/common/render/items/CosmicNeutroniumRenderer.java @@ -2,18 +2,21 @@ package gregtech.common.render.items; import static gregtech.common.render.GT_RenderUtil.colorGTItem; -import com.gtnewhorizons.modularui.api.math.Pos2d; -import gregtech.api.enums.Textures; -import gregtech.common.render.GT_RenderUtil; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import com.gtnewhorizons.modularui.api.math.Pos2d; + +import gregtech.api.enums.Textures; +import gregtech.common.render.GT_RenderUtil; + public class CosmicNeutroniumRenderer extends GT_GeneratedMaterial_Renderer { // spotless:off @@ -101,7 +104,7 @@ public class CosmicNeutroniumRenderer extends GT_GeneratedMaterial_Renderer { GL11.glPopMatrix(); } - // GL11.glEnable(GL11.GL_ALPHA_TEST); + // GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL11.GL_DEPTH_TEST); 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 26115592f3..7559580f96 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 @@ -3,13 +3,8 @@ 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; @@ -18,14 +13,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.fluids.FluidStack; + import org.lwjgl.opengl.GL11; +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; + public class GT_GeneratedItem_Renderer implements IItemRenderer { @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { - return type == ItemRenderType.EQUIPPED - || type == ItemRenderType.EQUIPPED_FIRST_PERSON + return type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON || type == ItemRenderType.INVENTORY || type == ItemRenderType.ENTITY; } @@ -56,8 +58,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 { @@ -107,8 +109,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; 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 b9419caa28..46d6a13469 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 @@ -1,10 +1,5 @@ package gregtech.common.render.items; -import codechicken.lib.render.TextureUtils; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Item; -import gregtech.api.util.GT_Utility; -import gregtech.common.render.GT_RenderUtil; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; import net.minecraft.item.ItemStack; @@ -12,14 +7,20 @@ import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; + import org.lwjgl.opengl.GL11; +import codechicken.lib.render.TextureUtils; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Item; +import gregtech.api.util.GT_Utility; +import gregtech.common.render.GT_RenderUtil; + public class GT_GeneratedMaterial_Renderer implements IItemRenderer { @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { - return type == ItemRenderType.EQUIPPED - || type == ItemRenderType.EQUIPPED_FIRST_PERSON + return type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON || type == ItemRenderType.INVENTORY || type == ItemRenderType.ENTITY; } @@ -30,13 +31,12 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { } /** - * Handle special fluid display rendering. Return false if does not need such kind of handling. - * Note: annotations should not be rendered here. Only render the fluid - * texture. - * Parameters are values passed from {@link IItemRenderer#renderItem(ItemRenderType, ItemStack, Object...)} - * verbatim. Do not modify the argument. + * Handle special fluid display rendering. Return false if does not need such kind of handling. Note: annotations + * should not be rendered here. Only render the fluid texture. Parameters are values passed from + * {@link IItemRenderer#renderItem(ItemRenderType, ItemStack, Object...)} verbatim. Do not modify the argument. * * While this is called, BLEND and ALPHA_TEST is on. It is expected that these remain enabled while exit. + * * @return true if did special fluid display rendering. false otherwise. */ public boolean renderFluidDisplayItem(ItemRenderType type, ItemStack aStack, Object... data) { 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 0133f21c8b..49b5521485 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 @@ -2,20 +2,22 @@ package gregtech.common.render.items; import static gregtech.api.util.GT_OreDictUnificator.getAssociation; -import gregtech.api.enums.Materials; -import gregtech.api.items.GT_MetaGenerated_Item; -import gregtech.api.util.GT_Utility; import java.util.Objects; + import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; + import org.lwjgl.opengl.GL11; +import gregtech.api.enums.Materials; +import gregtech.api.items.GT_MetaGenerated_Item; +import gregtech.api.util.GT_Utility; + 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() { diff --git a/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java b/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java index 12510dce30..25ab13bd25 100644 --- a/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java +++ b/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java @@ -1,15 +1,19 @@ package gregtech.common.render.items; -import gregtech.GT_Mod; -import gregtech.common.render.GT_RenderUtil; import java.awt.*; + import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; + import org.lwjgl.opengl.GL11; +import gregtech.GT_Mod; +import gregtech.common.render.GT_RenderUtil; + public class GaiaSpiritRenderer extends GT_GeneratedMaterial_Renderer { + @Override public void renderRegularItem(ItemRenderType type, ItemStack aStack, IIcon icon, boolean shouldModulateColor) { long animationTicks = GT_Mod.gregtechproxy.getAnimationTicks(); diff --git a/src/main/java/gregtech/common/render/items/InfinityRenderer.java b/src/main/java/gregtech/common/render/items/InfinityRenderer.java index 4f1695bec0..5733501d95 100644 --- a/src/main/java/gregtech/common/render/items/InfinityRenderer.java +++ b/src/main/java/gregtech/common/render/items/InfinityRenderer.java @@ -1,12 +1,7 @@ package gregtech.common.render.items; -import codechicken.lib.render.TextureUtils; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Item; -import gregtech.api.util.GT_Utility; -import gregtech.common.render.GT_RenderUtil; import java.util.Random; + import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.RenderHelper; @@ -16,10 +11,19 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.fluids.FluidStack; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import codechicken.lib.render.TextureUtils; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Item; +import gregtech.api.util.GT_Utility; +import gregtech.common.render.GT_RenderUtil; + public class InfinityRenderer extends GT_GeneratedMaterial_Renderer { + public Random rand = new Random(); @Override diff --git a/src/main/java/gregtech/common/render/items/TranscendentMetalRenderer.java b/src/main/java/gregtech/common/render/items/TranscendentMetalRenderer.java index 0865101826..a7ad2cd19c 100644 --- a/src/main/java/gregtech/common/render/items/TranscendentMetalRenderer.java +++ b/src/main/java/gregtech/common/render/items/TranscendentMetalRenderer.java @@ -1,44 +1,35 @@ package gregtech.common.render.items; -import gregtech.GT_Mod; -import gregtech.api.items.GT_MetaGenerated_Item; -import gregtech.common.render.GT_RenderUtil; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; + import org.lwjgl.opengl.GL11; +import gregtech.GT_Mod; +import gregtech.api.items.GT_MetaGenerated_Item; +import gregtech.common.render.GT_RenderUtil; + public class TranscendentMetalRenderer extends GT_GeneratedMaterial_Renderer { + // frameIndex should not have 3 or more frames with same value (unless it's meant to be still) // otherwise the primitive linear interpolation will render the animation in a pretty sluggish way - private final int[] frameIndex = new int[] { - 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 16, 17, 19, 21, 22, 24, 25, 27, 29, 30, 32, 33, 35, 36, - 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 49, 48, 47, 46, 45, 44, 43, 42, 40, 39, 38, 36, 35, 33, 32, - 30, 29, 27, 25, 24, 22, 21, 19, 17, 16, 14, 13, 12, 10, 9, 8, 7, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0 - }; - private final float[] frameRotation = new float[] { - 0, 7, 14, 21, 28, 36, 43, 50, 57, 64, - 72, 79, 86, 93, 100, 108, 115, 122, 129, 136, - 144, 151, 158, 165, 172, 180, 187, 194, 201, 208, - 216, 223, 230, 237, 244, 252, 259, 266, 273, 280, - 288, 295, 302, 309, 316, 324, 331, 338, 345, 352, - 360 - }; - private final float[] frameAlpha = new float[] { - 100 / 255f, 106 / 255f, 112 / 255f, 118 / 255f, 124 / 255f, 131 / 255f, 137 / 255f, 143 / 255f, 149 / 255f, - 155 / 255f, - 162 / 255f, 168 / 255f, 174 / 255f, 180 / 255f, 186 / 255f, 193 / 255f, 199 / 255f, 205 / 255f, 211 / 255f, - 217 / 255f, - 224 / 255f, 230 / 255f, 236 / 255f, 242 / 255f, 248 / 255f, 255 / 255f, 248 / 255f, 242 / 255f, 236 / 255f, - 230 / 255f, - 224 / 255f, 217 / 255f, 211 / 255f, 205 / 255f, 199 / 255f, 193 / 255f, 186 / 255f, 180 / 255f, 174 / 255f, - 168 / 255f, - 162 / 255f, 155 / 255f, 149 / 255f, 143 / 255f, 137 / 255f, 131 / 255f, 124 / 255f, 118 / 255f, 112 / 255f, - 106 / 255f, - 100 / 255f - }; + private final int[] frameIndex = new int[] { 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 16, 17, 19, 21, + 22, 24, 25, 27, 29, 30, 32, 33, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 49, 48, 47, 46, + 45, 44, 43, 42, 40, 39, 38, 36, 35, 33, 32, 30, 29, 27, 25, 24, 22, 21, 19, 17, 16, 14, 13, 12, 10, 9, 8, 7, + 5, 4, 3, 2, 1, 1, 0, 0, 0, 0 }; + private final float[] frameRotation = new float[] { 0, 7, 14, 21, 28, 36, 43, 50, 57, 64, 72, 79, 86, 93, 100, 108, + 115, 122, 129, 136, 144, 151, 158, 165, 172, 180, 187, 194, 201, 208, 216, 223, 230, 237, 244, 252, 259, + 266, 273, 280, 288, 295, 302, 309, 316, 324, 331, 338, 345, 352, 360 }; + private final float[] frameAlpha = new float[] { 100 / 255f, 106 / 255f, 112 / 255f, 118 / 255f, 124 / 255f, + 131 / 255f, 137 / 255f, 143 / 255f, 149 / 255f, 155 / 255f, 162 / 255f, 168 / 255f, 174 / 255f, 180 / 255f, + 186 / 255f, 193 / 255f, 199 / 255f, 205 / 255f, 211 / 255f, 217 / 255f, 224 / 255f, 230 / 255f, 236 / 255f, + 242 / 255f, 248 / 255f, 255 / 255f, 248 / 255f, 242 / 255f, 236 / 255f, 230 / 255f, 224 / 255f, 217 / 255f, + 211 / 255f, 205 / 255f, 199 / 255f, 193 / 255f, 186 / 255f, 180 / 255f, 174 / 255f, 168 / 255f, 162 / 255f, + 155 / 255f, 149 / 255f, 143 / 255f, 137 / 255f, 131 / 255f, 124 / 255f, 118 / 255f, 112 / 255f, 106 / 255f, + 100 / 255f }; private static float linearInterpolation(float[] controlPoints, int frameA, int frameB, float partial) { float a = controlPoints[frameA], b = controlPoints[frameB]; diff --git a/src/main/java/gregtech/common/render/items/UniversiumRenderer.java b/src/main/java/gregtech/common/render/items/UniversiumRenderer.java index baaf951ddc..d7b1aced36 100644 --- a/src/main/java/gregtech/common/render/items/UniversiumRenderer.java +++ b/src/main/java/gregtech/common/render/items/UniversiumRenderer.java @@ -1,10 +1,5 @@ package gregtech.common.render.items; -import codechicken.lib.render.TextureUtils; -import gregtech.api.enums.ItemList; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Item; -import gregtech.common.render.GT_RenderUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.RenderHelper; @@ -17,9 +12,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraftforge.client.IItemRenderer; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; + import singulariteam.eternalsingularity.render.CosmicRenderStuffs; +import codechicken.lib.render.TextureUtils; +import gregtech.api.enums.ItemList; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Item; +import gregtech.common.render.GT_RenderUtil; public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { @@ -38,7 +40,10 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { @Override public boolean renderFluidDisplayItem(ItemRenderType type, ItemStack aStack, Object... data) { magicRenderMethod( - type, ItemList.Emitter_UEV.get(1), aStack.getItem().getIconFromDamage(aStack.getItemDamage()), data); + type, + ItemList.Emitter_UEV.get(1), + aStack.getItem().getIconFromDamage(aStack.getItemDamage()), + data); return true; } @@ -207,7 +212,14 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { // RENDER ITEM IN HAND ItemRenderer.renderItemIn2D( - Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale); + Tessellator.instance, + f1, + f2, + f, + f3, + icon.getIconWidth(), + icon.getIconHeight(), + scale); } GL11.glDisable(GL11.GL_ALPHA_TEST); 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 7bcbe33b86..52cc1b1b96 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 @@ -6,6 +6,7 @@ import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_CHESTBUFFER_GLOW import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; + import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -16,52 +17,55 @@ import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer implements IAddUIWidgets { - 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) { + 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); + 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 @@ -117,10 +121,9 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer impl addEmitRedstoneButton(builder); addInvertRedstoneButton(builder); addStockingModeButton(builder); - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(69, true)) - .setPos(80, 60) - .setSize(69, 22)); + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(69, true)).setPos(80, 60) + .setSize(69, 22)); addMainUI(builder); } 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 c1be592cf4..70e2673421 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 @@ -3,11 +3,15 @@ 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 net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.ButtonWidget; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotGroup; + import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -16,35 +20,41 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer implements IAddUIWidgets { + 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); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override @@ -106,62 +116,48 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer implement addEmitEnergyButton(builder); addEmitRedstoneButton(builder); addInvertRedstoneButton(builder); - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - bInvertFilter = !bInvertFilter; - if (bInvertFilter) { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("124", "Invert Filter")); - } else { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), - GT_Utility.trans("125", "Don't invert Filter")); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER) - .setPos(61, 62) - .setSize(18, 18)) - .widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - bIgnoreNBT = !bIgnoreNBT; - if (bIgnoreNBT) { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("126", "Ignore NBT")); - } else { - GT_Utility.sendChatToPlayer( - widget.getContext().getPlayer(), GT_Utility.trans("127", "NBT has to match")); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NBT) - .setPos(79, 62) + builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> { + bInvertFilter = !bInvertFilter; + if (bInvertFilter) { + GT_Utility.sendChatToPlayer(widget.getContext().getPlayer(), GT_Utility.trans("124", "Invert Filter")); + } else { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("125", "Don't invert Filter")); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER).setPos(61, 62) + .setSize(18, 18)).widget(new ButtonWidget().setOnClick((clickData, widget) -> { + bIgnoreNBT = !bIgnoreNBT; + if (bIgnoreNBT) { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("126", "Ignore NBT")); + } else { + GT_Utility.sendChatToPlayer( + widget.getContext().getPlayer(), + GT_Utility.trans("127", "NBT has to match")); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NBT).setPos(79, 62) .setSize(18, 18)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_24_WHITE.apply(9, false)) - .setPos(6, 19) - .setSize(9, 24)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_24_BLUE.apply(24, true)) - .setPos(71, 19) - .setSize(24, 24)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_24_RED.apply(19, true)) - .setPos(152, 19) - .setSize(19, 24)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3) - .setPos(16, 4) - .setSize(54, 54)) - .widget(SlotGroup.ofItemHandler(inventoryHandler, 3) - .startFromSlot(9) - .endAtSlot(17) - .phantom(true) - .applyForWidget(widget -> widget.disableShiftInsert().setBackground(GT_UITextures.TRANSPARENT)) - .build() - .setPos(16, 4)) - .widget(SlotGroup.ofItemHandler(inventoryHandler, 3) - .startFromSlot(0) - .endAtSlot(8) - .build() - .setPos(97, 4)); + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_WHITE.apply(9, false)) + .setPos(6, 19).setSize(9, 24)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_BLUE.apply(24, true)) + .setPos(71, 19).setSize(24, 24)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_RED.apply(19, true)) + .setPos(152, 19).setSize(19, 24)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(16, 4) + .setSize(54, 54)) + .widget( + SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(9).endAtSlot(17).phantom(true) + .applyForWidget( + widget -> widget.disableShiftInsert().setBackground(GT_UITextures.TRANSPARENT)) + .build().setPos(16, 4)) + .widget( + SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8).build() + .setPos(97, 4)); } } 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 bf2fa41b0d..e601847a72 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 @@ -3,9 +3,15 @@ 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 net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; + import gregtech.api.enums.Textures; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -15,53 +21,54 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer implements IAddUIWidgets { + 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" - }); - } - - public GT_MetaTileEntity_ItemDistributor( - int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) { + 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) { 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); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override 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 @@ -70,13 +77,8 @@ 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 { @@ -89,8 +91,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; } @@ -185,10 +187,9 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer addEmitEnergyButton(builder); addEmitRedstoneButton(builder); addInvertRedstoneButton(builder); - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(87, true)) - .setPos(62, 60) - .setSize(87, 22)); + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(87, true)).setPos(62, 60) + .setSize(87, 22)); addInventorySlots(builder); } } 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 14a6af709a..7502ae73de 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 @@ -3,7 +3,14 @@ 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 java.util.Collections; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import com.gtnewhorizons.modularui.api.drawable.Text; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -12,29 +19,28 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_SpecialFilt import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.common.blocks.GT_Item_Machines; -import java.util.Collections; -import java.util.List; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; 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,17 +65,18 @@ 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); + 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 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 5abb6d804b..af4426932a 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 @@ -3,6 +3,12 @@ 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 java.util.Collections; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; @@ -10,6 +16,7 @@ import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotGroup; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -18,48 +25,48 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; -import java.util.Collections; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implements IAddUIWidgets { - public int[] mTargetSlots = {0, 0, 0, 0, 0, 0, 0, 0, 0}; + + 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" - }); - } - - public GT_MetaTileEntity_Regulator( - String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + 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) { 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); + 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 @@ -105,19 +112,16 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem 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; + 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; @@ -128,8 +132,7 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) - && aIndex >= 0 + return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && aIndex >= 0 && aIndex <= 8 && GT_Utility.areStacksEqual(aStack, this.mInventory[(aIndex + 9)]); } @@ -167,50 +170,40 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { addEmitEnergyButton(builder); builder.widget(createChargerSlot(43, 62)); - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(84, true)) - .setPos(65, 60) + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(84, true)).setPos(65, 60) .setSize(84, 22)) - .widget(SlotGroup.ofItemHandler(inventoryHandler, 3) - .startFromSlot(0) - .endAtSlot(8) - .build() - .setPos(7, 5)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3) - .setPos(62, 5) - .setSize(54, 54)) - .widget(SlotGroup.ofItemHandler(inventoryHandler, 3) - .phantom(true) - .startFromSlot(9) - .endAtSlot(17) - .applyForWidget( - widget -> widget.setControlsAmount(true).setBackground(GT_UITextures.TRANSPARENT)) - .build() - .setPos(62, 5)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3) - .setPos(117, 5) - .setSize(54, 54)); + .widget(SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8).build().setPos(7, 5)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(62, 5) + .setSize(54, 54)) + .widget( + SlotGroup.ofItemHandler(inventoryHandler, 3).phantom(true).startFromSlot(9).endAtSlot(17) + .applyForWidget( + widget -> widget.setControlsAmount(true) + .setBackground(GT_UITextures.TRANSPARENT)) + .build().setPos(62, 5)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(117, 5) + .setSize(54, 54)); int xBase = 117, yBase = 5; for (int i = 0; i < mTargetSlots.length; i++) { final int index = i; int xPos = xBase + (i % 3) * 18, yPos = yBase + (i / 3) * 18; - builder.widget( - new SlotWidget(BaseSlot.empty()) { - @Override - protected void phantomClick(ClickData clickData, ItemStack cursorStack) { - mTargetSlots[index] = Math.min( - 99, - Math.max( - 0, - mTargetSlots[index] - + (clickData.mouseButton == 0 ? -1 : 1) - * (clickData.shift ? 16 : 1))); - } - }.setBackground(GT_UITextures.TRANSPARENT).setPos(xPos, yPos)) - .widget(TextWidget.dynamicString(() -> String.valueOf(mTargetSlots[index])) + builder.widget(new SlotWidget(BaseSlot.empty()) { + + @Override + protected void phantomClick(ClickData clickData, ItemStack cursorStack) { + mTargetSlots[index] = Math.min( + 99, + Math.max( + 0, + mTargetSlots[index] + + (clickData.mouseButton == 0 ? -1 : 1) * (clickData.shift ? 16 : 1))); + } + }.setBackground(GT_UITextures.TRANSPARENT).setPos(xPos, yPos)).widget( + TextWidget.dynamicString(() -> String.valueOf(mTargetSlots[index])) .setDefaultColor(COLOR_TEXT_WHITE.get()) .setPos(xPos + 2 + (i % 3 == 0 ? 1 : 0), yPos + 3 + (i / 3 == 0 ? 1 : 0))); } 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 a91a082c4e..cefd3152c1 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 @@ -3,54 +3,61 @@ 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 java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.item.ItemStack; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; + import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -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); + 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 @@ -86,9 +93,7 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer @Override protected void addMainUI(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SUPER_BUFFER) - .setPos(61, 4) - .setSize(54, 54)); + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SUPER_BUFFER).setPos(61, 4).setSize(54, 54)); } } 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 49cdc6617c..64b5a43ad8 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 @@ -4,7 +4,16 @@ 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 java.util.Arrays; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; + import com.google.common.collect.ImmutableList; + import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -14,14 +23,9 @@ import gregtech.api.objects.ItemData; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import java.util.Arrays; -import java.util.List; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilter { + public int mRotationIndex = 0; public OrePrefixes mPrefix = OrePrefixes.ore; @@ -41,37 +45,40 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte OrePrefixes.oreMarble); 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); + 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()); } @Override @@ -121,8 +128,8 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte } this.mInventory[SPECIAL_SLOT_INDEX] = GT_Utility.copyAmount( 1L, - this.mPrefix.mPrefixedItems.get( - this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size())); + 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()); 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 9eb861ad06..3d2f69c26d 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 @@ -2,6 +2,14 @@ package gregtech.common.tileentities.boilers; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.api.screen.ModularWindow; @@ -9,6 +17,7 @@ import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.ProgressBar; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -30,16 +39,10 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import gregtech.common.GT_Pollution; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTank implements IGetTitleColor, IAddUIWidgets { + public static final byte SOUND_EVENT_LET_OFF_EXCESS_STEAM = 1; public int mTemperature = 20; public int mProcessingEnergy = 0; @@ -48,13 +51,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); } @@ -67,17 +70,12 @@ 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; } @@ -214,8 +212,7 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa } try { aNBT.setTag("mSteam", this.mSteam.writeToNBT(new NBTTagCompound())); - } catch (Throwable ignored) { - } + } catch (Throwable ignored) {} } @Override @@ -275,8 +272,7 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa } private void calculateHeatUp(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if ((this.mTemperature < getMaxTemperature()) - && (this.mProcessingEnergy > 0) + if ((this.mTemperature < getMaxTemperature()) && (this.mProcessingEnergy > 0) && (aTick % getHeatUpRate() == 0L)) { this.mProcessingEnergy -= getEnergyConsumption(); this.mTemperature += getHeatUpAmount(); @@ -325,11 +321,10 @@ 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(), @@ -370,13 +365,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()); } } @@ -420,15 +415,13 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa } protected IDrawable[] getFuelSlotBackground() { - return new IDrawable[] { - getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_COAL_STEAM.get(getSteamVariant()) - }; + return new IDrawable[] { getGUITextureSet().getItemSlot(), + GT_UITextures.OVERLAY_SLOT_COAL_STEAM.get(getSteamVariant()) }; } protected IDrawable[] getAshSlotBackground() { - return new IDrawable[] { - getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()) - }; + return new IDrawable[] { getGUITextureSet().getItemSlot(), + GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()) }; } @Override @@ -438,44 +431,41 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new SlotWidget(inventoryHandler, 0) - .setPos(43, 25) + builder.widget( + new SlotWidget(inventoryHandler, 0).setPos(43, 25) .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn())) - .widget(new SlotWidget(inventoryHandler, 1) - .setPos(43, 61) - .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotOut())) - .widget(createFuelSlot()) - .widget(createAshSlot()) - .widget(new ProgressBar() - .setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity()) - .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_STEAM, 10) - .setDirection(ProgressBar.Direction.UP) - .setPos(70, 25) - .setSize(10, 54)) - .widget(new ProgressBar() - .setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity()) - .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10) - .setDirection(ProgressBar.Direction.UP) - .setPos(83, 25) - .setSize(10, 54)) - .widget(new ProgressBar() - .setProgress(() -> (float) mTemperature / maxProgresstime()) - .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10) - .setDirection(ProgressBar.Direction.UP) - .setPos(96, 25) - .setSize(10, 54)) - .widget(new ProgressBar() - // cap minimum so that one can easily see there's fuel remaining - .setProgress( - () -> mProcessingEnergy > 0 ? Math.max((float) mProcessingEnergy / 1000, 1f / 5) : 0) - .setTexture(getProgressbarFuel(), 14) - .setDirection(ProgressBar.Direction.UP) - .setPos(116, 45) - .setSize(14, 14)) - .widget(new DrawableWidget() - .setDrawable(getOverlaySlotCanister()) - .setPos(43, 43) - .setSize(18, 18)); + .widget( + new SlotWidget(inventoryHandler, 1).setPos( + 43, + 61).setBackground( + getGUITextureSet().getItemSlot(), + getOverlaySlotOut())) + .widget(createFuelSlot()).widget( + createAshSlot()) + .widget( + new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity()) + .setTexture( + getProgressbarEmpty(), + GT_UITextures.PROGRESSBAR_BOILER_STEAM, + 10) + .setDirection(ProgressBar.Direction.UP).setPos(70, 25).setSize(10, 54)) + .widget( + new ProgressBar().setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity()) + .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10) + .setDirection(ProgressBar.Direction.UP).setPos(83, 25).setSize(10, 54)) + .widget( + new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime()) + .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10) + .setDirection(ProgressBar.Direction.UP).setPos(96, 25).setSize(10, 54)) + .widget( + new ProgressBar() + // cap minimum so that one can easily see there's fuel remaining + .setProgress( + () -> mProcessingEnergy > 0 ? Math.max((float) mProcessingEnergy / 1000, 1f / 5) + : 0) + .setTexture(getProgressbarFuel(), 14).setDirection(ProgressBar.Direction.UP) + .setPos(116, 45).setSize(14, 14)) + .widget(new DrawableWidget().setDrawable(getOverlaySlotCanister()).setPos(43, 43).setSize(18, 18)); } protected SlotWidget createFuelSlot() { 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 ef343d24f2..e88a35c617 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 @@ -10,6 +10,10 @@ 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 net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraftforge.common.util.ForgeDirection; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; @@ -26,17 +30,17 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import gregtech.common.GT_Pollution; -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntityFurnace; -import net.minecraftforge.common.util.ForgeDirection; 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) { @@ -54,27 +58,13 @@ 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)}, - 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() - }; + 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() }; for (int i = 0; i < 17; i++) { rTextures[0][i] = texBottom; rTextures[1][i] = texTop; @@ -107,8 +97,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { final byte frontFacing = aBaseMetaTileEntity.getFrontFacing(); - if (frontFacing > 1 - && aBaseMetaTileEntity.getCoverIDAtSide(frontFacing) == 0 + if (frontFacing > 1 && aBaseMetaTileEntity.getCoverIDAtSide(frontFacing) == 0 && !aBaseMetaTileEntity.getOpacityAtSide(frontFacing)) { final double oX = aBaseMetaTileEntity.getOffsetX(frontFacing, 1) + 8D / 16D; @@ -136,10 +125,8 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { 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(); } @@ -149,8 +136,7 @@ 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) + if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L) && this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { GT_Pollution.addPollution(getBaseMetaTileEntity(), getPollution()); @@ -186,7 +172,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { 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.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) @@ -202,9 +188,8 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { 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.Coal) + || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal) ? 3 : GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) ? 8 : 2) == 0) { aBaseMetaTileEntity.addStackToSlot( @@ -212,99 +197,93 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { 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, + || 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)) + || 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 + (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)); - } - // 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 - 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)); - } + 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)); + } + // 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 + 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)); + } } @Override 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 14a2833549..6a1ad39195 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 @@ -9,6 +9,8 @@ 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 net.minecraftforge.fluids.FluidStack; + import gregtech.GT_Mod; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -19,7 +21,6 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { @@ -29,14 +30,18 @@ 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) { @@ -50,24 +55,14 @@ 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)}, - 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() - }; + 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() }; for (byte i = 0; i < 17; i++) { rTextures[0][i] = texBottom; rTextures[1][i] = texTop; @@ -124,12 +119,12 @@ 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))) { - this.mProcessingEnergy += 1000 * ENERGY_PER_LAVA; - aBaseMetaTileEntity.decrStackSize(2, 1); - // Clay lava buckets break, so you don't get it back. - } + } 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. + } } @Override 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 978e70e5ab..746f0602d6 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 @@ -5,8 +5,22 @@ import static gregtech.api.enums.ConfigCategories.machineconfig; import static mcp.mobius.waila.api.SpecialChars.GOLD; import static mcp.mobius.waila.api.SpecialChars.RESET; +import java.util.List; + +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import gregtech.api.enums.Dyes; import gregtech.api.enums.SteamVariant; import gregtech.api.enums.Textures.BlockIcons; @@ -18,18 +32,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; 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.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; 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", @@ -55,8 +60,8 @@ 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; } @@ -93,10 +98,9 @@ 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())) - .split("\\R"); + localizedDescFormat, + GT_Utility.formatNumbers(getMaxOutputPerSecond()), + GT_Utility.formatNumbers(getMinOutputPerSecond())).split("\\R"); } public int getMinOutputPerSecond() { @@ -109,29 +113,21 @@ 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; } @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]; @@ -187,12 +183,12 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { if (mRunTimeTicks > mConfig.getMaxRuntimeTicks()) { return mConfig.getMinOutputPerSecond(); } else if (mRunTimeTicks > mConfig.getCalcificationTicks()) { - /* When reaching calcification ticks; discount the proportion of run-time spent on calcification - * from the maximum output per second, and return this or the minimum output per second + /* + * When reaching calcification ticks; discount the proportion of run-time spent on calcification from the + * maximum output per second, and return this or the minimum output per second */ return mConfig.getMaxOutputPerSecond() - - mConfig.getMaxOutputPerSecond() - * (mRunTimeTicks - mConfig.getCalcificationTicks()) + - mConfig.getMaxOutputPerSecond() * (mRunTimeTicks - mConfig.getCalcificationTicks()) / mConfig.getCalcificationTicks(); } else { return mConfig.getMaxOutputPerSecond(); @@ -257,19 +253,32 @@ 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())) - .split("\\R"); + "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"); } public int getHeatCapacityPercent() { @@ -287,12 +296,12 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { @Override protected IDrawable[] getFuelSlotBackground() { - return new IDrawable[] {GT_UITextures.TRANSPARENT}; + return new IDrawable[] { GT_UITextures.TRANSPARENT }; } @Override protected IDrawable[] getAshSlotBackground() { - return new IDrawable[] {GT_UITextures.TRANSPARENT}; + return new IDrawable[] { GT_UITextures.TRANSPARENT }; } @Override @@ -308,38 +317,36 @@ 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())); } protected static class Config { + private final int calcificationTicks; private final int minOutputPerSecond; private final int maxOutputPerSecond; private final int coolDownTicks; private final int maxRuntimeTicks; - public Config( - String aCategory, - int aDefaultCalcificationTicks, - int aDefaultMinOutputPerSecond, - int aDefaultMaxOutputPerSecond, - int aDefaultCoolDownTicks) { + public Config(String aCategory, int aDefaultCalcificationTicks, int aDefaultMinOutputPerSecond, + int aDefaultMaxOutputPerSecond, int aDefaultCoolDownTicks) { calcificationTicks = get( aCategory, "CalcificationTicks", @@ -348,24 +355,22 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { "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."); + 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'); 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 997ca33df5..45e22c29fb 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 @@ -11,22 +11,23 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; 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); } @@ -42,17 +43,14 @@ 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; } @@ -70,6 +68,10 @@ 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); + 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 0ae425f792..719fd13317 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 @@ -19,12 +19,13 @@ import gregtech.api.render.TextureFactory; 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) { @@ -38,27 +39,13 @@ 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)}, - 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() - }; + 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() }; for (int i = 0; i < 17; i++) { rTextures[0][i] = texBottom; rTextures[1][i] = texTop; diff --git a/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java b/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java index 663b7ed326..fbc2e4af14 100644 --- a/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java +++ b/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java @@ -3,6 +3,20 @@ package gregtech.common.tileentities.debug; import static gregtech.GT_Mod.GT_FML_LOGGER; import static net.minecraft.util.StatCollector.translateToLocal; +import java.util.HashMap; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; + +import org.lwjgl.opengl.GL11; + import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import com.gtnewhorizon.structurelib.structure.StructureUtility; import com.gtnewhorizon.structurelib.util.Vec3Impl; @@ -14,6 +28,7 @@ import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.MultiChildWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -28,34 +43,24 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import gregtech.api.render.TextureFactory; -import java.util.HashMap; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; -import org.lwjgl.opengl.GL11; public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity_TieredMachineBlock implements IAddGregtechLogo, IAddUIWidgets { - private static final HashMap<GT_MetaTileEntity_AdvDebugStructureWriter, BoundHighlighter> bondingBoxes = - new HashMap<>(1); + + private static final HashMap<GT_MetaTileEntity_AdvDebugStructureWriter, BoundHighlighter> bondingBoxes = new HashMap<>( + 1); private final BoundHighlighter boundingBox = new BoundHighlighter(); private final short[] numbers = new short[6]; private boolean transpose = false; private boolean showHighlightBox = true; - private String[] result = new String[] {"Undefined"}; + private String[] result = new String[] { "Undefined" }; public GT_MetaTileEntity_AdvDebugStructureWriter(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 0, ""); } - public GT_MetaTileEntity_AdvDebugStructureWriter( - String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_AdvDebugStructureWriter(String aName, int aTier, String aDescription, + ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); } @@ -65,25 +70,13 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity } @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 != aFacing - ? TextureFactory.of(TextureFactory.builder() - .addIcon(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) - .glow() - .build()) - : TextureFactory.of(TextureFactory.builder() - .addIcon(Textures.BlockIcons.STRUCTURE_MARK) - .glow() - .build()) - }; + 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 != aFacing ? TextureFactory.of( + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE).glow().build()) + : TextureFactory.of( + TextureFactory.builder().addIcon(Textures.BlockIcons.STRUCTURE_MARK).glow().build()) }; } @Override @@ -133,8 +126,8 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { - ExtendedFacing writerFacing = - ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())); + ExtendedFacing writerFacing = ExtendedFacing + .of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())); double[] abc = new double[3]; double[] xyz = new double[3]; boundingBox.dim = aBaseMetaTileEntity.getWorld().provider.dimensionId; @@ -215,11 +208,10 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity @Override public String[] getDescription() { - return new String[] { - translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip"), // Scans Blocks Around - translateToLocal( - "GT5U.machines.advdebugstructurewriter.tooltip.1"), // Prints Multiblock NonTE structure check code - translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip.2") // ABC axes aligned to machine front + return new String[] { translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip"), // Scans Blocks Around + translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip.1"), // Prints Multiblock NonTE + // structure check code + translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip.2") // ABC axes aligned to machine front }; } @@ -240,76 +232,73 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setSize(90, 112) - .setPos(43, 4)) - .widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - if (getBaseMetaTileEntity().isServerSide()) { - printStructure(widget.getContext().getPlayer()); - } - }) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PRINT) - .setSize(18, 18) + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 112).setPos(43, 4)) + .widget(new ButtonWidget().setOnClick((clickData, widget) -> { + if (getBaseMetaTileEntity().isServerSide()) { + printStructure(widget.getContext().getPlayer()); + } + }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PRINT).setSize(18, 18) .setPos(11, 128) .addTooltip(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.print.tooltip"))) - .widget(new CycleButtonWidget() - .setToggle(() -> transpose, aBoolean -> transpose = aBoolean) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TRANSPOSE) - .setSize(18, 18) - .setPos(32, 128) - .addTooltip(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.transpose.tooltip"))) - .widget(new CycleButtonWidget() - .setToggle(() -> showHighlightBox, aBoolean -> showHighlightBox = aBoolean) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BOUNDING_BOX) - .setSize(18, 18) - .setPos(53, 128) - .addTooltip(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.highlight.tooltip"))) - .widget(new MultiChildWidget() - .addChild(new TextWidget(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.origin")) - .setDefaultColor(0xf0f0ff) - .setPos(0, 0)) - .addChild(TextWidget.dynamicString(() -> "A: " + numbers[0]) - .setDefaultColor(0xf0f0ff) - .setPos(0, 10)) - .addChild(TextWidget.dynamicString(() -> "B: " + numbers[1]) - .setDefaultColor(0xf0f0ff) - .setPos(0, 18)) - .addChild(TextWidget.dynamicString(() -> "C: " + numbers[2]) - .setDefaultColor(0xf0f0ff) - .setPos(0, 26)) - .addChild(new TextWidget(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.size")) - .setDefaultColor(0xf0f0ff) - .setPos(0, 52)) - .addChild(TextWidget.dynamicString(() -> "A: " + numbers[3]) - .setDefaultColor(0xf0f0ff) - .setPos(0, 62)) - .addChild(TextWidget.dynamicString(() -> "B: " + numbers[4]) - .setDefaultColor(0xf0f0ff) - .setPos(0, 70)) - .addChild(TextWidget.dynamicString(() -> "C: " + numbers[5]) - .setDefaultColor(0xf0f0ff) - .setPos(0, 78)) - .setPos(46, 8)); + .widget( + new CycleButtonWidget().setToggle(() -> transpose, aBoolean -> transpose = aBoolean) + .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TRANSPOSE).setSize(18, 18) + .setPos(32, 128).addTooltip( + translateToLocal( + "GT5U.machines.advdebugstructurewriter.gui.transpose.tooltip"))) + .widget( + new CycleButtonWidget() + .setToggle(() -> showHighlightBox, aBoolean -> showHighlightBox = aBoolean) + .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BOUNDING_BOX).setSize(18, 18) + .setPos(53, 128).addTooltip( + translateToLocal( + "GT5U.machines.advdebugstructurewriter.gui.highlight.tooltip"))) + .widget( + new MultiChildWidget().addChild( + new TextWidget(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.origin")) + .setDefaultColor(0xf0f0ff).setPos(0, 0)) + .addChild( + TextWidget.dynamicString(() -> "A: " + numbers[0]).setDefaultColor(0xf0f0ff) + .setPos(0, 10)) + .addChild( + TextWidget.dynamicString(() -> "B: " + numbers[1]).setDefaultColor(0xf0f0ff) + .setPos(0, 18)) + .addChild( + TextWidget.dynamicString(() -> "C: " + numbers[2]).setDefaultColor(0xf0f0ff) + .setPos(0, 26)) + .addChild( + new TextWidget( + translateToLocal("GT5U.machines.advdebugstructurewriter.gui.size")) + .setDefaultColor(0xf0f0ff).setPos(0, 52)) + .addChild( + TextWidget.dynamicString(() -> "A: " + numbers[3]).setDefaultColor(0xf0f0ff) + .setPos(0, 62)) + .addChild( + TextWidget.dynamicString(() -> "B: " + numbers[4]).setDefaultColor(0xf0f0ff) + .setPos(0, 70)) + .addChild( + TextWidget.dynamicString(() -> "C: " + numbers[5]).setDefaultColor(0xf0f0ff) + .setPos(0, 78)) + .setPos(46, 8)); addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7); addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, -16, -1, 25); addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_SMALL, 16, 1, 133); addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, 512, 64, 151); } - private void addChangeNumberButtons( - ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, int addNumber, int xPos) { - int[] yPos = new int[] {4, 22, 40, 62, 80, 98}; + private void addChangeNumberButtons(ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, + int addNumber, int xPos) { + int[] yPos = new int[] { 4, 22, 40, 62, 80, 98 }; for (int i = 0; i < yPos.length; i++) { final int index = i; // needed for lambda - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> numbers[index] += clickData.shift ? addNumberShift : addNumber) - .setBackground(GT_UITextures.BUTTON_STANDARD, overlay) - .setSize(18, 18) - .setPos(xPos, yPos[index])); + builder.widget( + new ButtonWidget().setOnClick( + (clickData, widget) -> numbers[index] += clickData.shift ? addNumberShift : addNumber) + .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18) + .setPos(xPos, yPos[index])); } } @@ -320,10 +309,8 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity @Override public void addGregTechLogo(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(113, 96)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 96)); } @Override @@ -332,6 +319,7 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity } public static class ForgeEventHandler { + public ForgeEventHandler() { MinecraftForge.EVENT_BUS.register(this); } @@ -347,6 +335,7 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity } private static class BoundHighlighter { + public Vec3Impl pos1; public Vec3Impl pos2; public boolean showHighlightBox; 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 1b53de5b42..d2304cc948 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 @@ -3,6 +3,10 @@ package gregtech.common.tileentities.generators; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -20,22 +24,22 @@ 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 net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; 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(); } @@ -98,8 +102,13 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe 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()); + "Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName() + + " Coords: " + + aBaseMetaTileEntity.getXCoord() + + " " + + aBaseMetaTileEntity.getYCoord() + + " " + + aBaseMetaTileEntity.getZCoord()); aBaseMetaTileEntity.setToFire(); } super.onPostTick(aBaseMetaTileEntity, aTick); @@ -120,152 +129,98 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe if (aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 && !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; - - new ParticleEventBuilder() - .setMotion(0D, 0D, 0D) - .setPosition(x, y, z) - .setWorld(getBaseMetaTileEntity().getWorld()) - .setIdentifier(ParticleFX.SMOKE) - .run(); + 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(); } } } @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 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 b085d82bab..90b076abaa 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 @@ -18,25 +18,31 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Deprecated 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" }); this.mEfficiency = 100 - aTier * 5; onConfigLoad(); } public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier, int mEfficiency) { - 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" }); this.mEfficiency = mEfficiency; onConfigLoad(); } @@ -55,8 +61,8 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat onConfigLoad(); } - public GT_MetaTileEntity_GasTurbine( - String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int mEfficiency) { + public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, + int mEfficiency) { super(aName, aTier, aDescription, aTextures); this.mEfficiency = mEfficiency; onConfigLoad(); @@ -70,7 +76,11 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_GasTurbine( - this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mEfficiency); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mEfficiency); } @Override @@ -84,8 +94,8 @@ 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, this.mEfficiency); + this.mEfficiency = GregTech_API.sMachineFile + .get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, this.mEfficiency); } @Override @@ -95,134 +105,84 @@ 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 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 dbb8931848..2436beba77 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 @@ -2,6 +2,13 @@ package gregtech.common.tileentities.generators; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; @@ -9,54 +16,35 @@ 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 net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; 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[] { - 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() - }; + 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() }; } @Override @@ -67,7 +55,11 @@ 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); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override @@ -90,10 +82,7 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) { if (isRodValid - && aBaseMetaTileEntity - .getBlock(aX, i, aZ) - .getUnlocalizedName() - .equals("blockFenceIron")) { + && aBaseMetaTileEntity.getBlock(aX, i, aZ).getUnlocalizedName().equals("blockFenceIron")) { aRodValue++; } else { isRodValid = false; @@ -105,8 +94,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)); } } 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 2e1bfd655f..6bc904d384 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 @@ -20,6 +20,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_BasicGenerator { + public int mEfficiency; public GT_MetaTileEntity_MagicEnergyConverter(int aID, String aName, String aNameRegional, int aTier) { @@ -27,14 +28,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(); } @@ -47,7 +48,10 @@ 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override @@ -74,112 +78,64 @@ 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 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 210483cbe8..c92cf8b699 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 @@ -12,24 +12,6 @@ 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; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ParticleFX; -import gregtech.api.enums.TC_Aspects; -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_Config; -import gregtech.api.util.GT_LanguageManager; -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; @@ -38,6 +20,7 @@ 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; @@ -54,13 +37,35 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; import net.minecraftforge.common.util.ForgeDirection; + import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.AspectSourceHelper; import thaumcraft.api.aspects.IAspectContainer; import thaumcraft.api.visnet.VisNetHandler; +import com.google.common.base.Enums; + +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ParticleFX; +import gregtech.api.enums.TC_Aspects; +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_Config; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; + interface MagicalEnergyBBListener { + void onMagicalEnergyBBUpdate(); } @@ -68,10 +73,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B 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; @@ -92,8 +97,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); } @@ -112,13 +117,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B sEnergyFromVis = aConfig.get(machineconfig, "MagicEnergyAbsorber.EnergyPerVis", 20); sEnergyPerEssentia = aConfig.get(machineconfig, "MagicEnergyAbsorber.EnergyPerEssentia", 320); for (Aspect tAspect : Aspect.aspects.values()) { - //noinspection UnstableApiUsage + // noinspection UnstableApiUsage sAspectsEnergy.put( tAspect, Enums.getIfPresent(TC_Aspects.class, tAspect.getTag().toUpperCase(Locale.ENGLISH)) - .or(TC_Aspects.AER) - .mValue - * sEnergyPerEssentia); + .or(TC_Aspects.AER).mValue * sEnergyPerEssentia); } } } @@ -131,8 +134,10 @@ 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; } @@ -203,15 +208,26 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B 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( + 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):"); @@ -220,8 +236,13 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B 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( + "- 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() + "%"); @@ -230,108 +251,63 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B @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_DRAGONEGG)}; + return new ITexture[] { super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_DRAGONEGG) }; } @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_DRAGONEGG), - TextureFactory.builder() - .addIcon(MACHINE_CASING_DRAGONEGG_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_DRAGONEGG), + TextureFactory.builder().addIcon(MACHINE_CASING_DRAGONEGG_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 @@ -373,8 +349,9 @@ 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()); } } @@ -398,8 +375,7 @@ 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; @@ -415,10 +391,7 @@ 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(); } } } @@ -498,8 +471,7 @@ 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() + if ((getBaseMetaTileEntity().getStoredEU() + tEU) < getBaseMetaTileEntity().getEUCapacity() && getBaseMetaTileEntity().addStackToSlot(getOutputSlot(), tOutputStack)) { decrStackSize(getInputSlot(), 1); } else { @@ -516,8 +488,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B private long absorbFromEgg() { if (!hasEgg()) return 0; if (!sAllowMultipleEggs) { - if (sActiveSiphon != null - && sActiveSiphon != this + if (sActiveSiphon != null && sActiveSiphon != this && sActiveSiphon.getBaseMetaTileEntity() != null && !sActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity() && sActiveSiphon.isChunkLoaded() @@ -575,20 +546,18 @@ 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 for (int i = mAvailableEssentiaAspects.size() - 1; i >= 0 && tEUtoGen > 0; i--) { 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())) { + if (tAspectEU <= tEUtoGen && AspectSourceHelper.drainEssentia( + (TileEntity) getBaseMetaTileEntity(), + aspect, + ForgeDirection.UNKNOWN, + mMagicalEnergyBB.getRange())) { tEUtoGen -= tAspectEU; tEU += tAspectEU; } @@ -634,6 +603,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B * Handles Bounding Box ranged operations for Magic sources */ static class MagicalEnergyBB { + private final GT_MetaTileEntity_MagicalEnergyAbsorber mAbsorber; private final MagicalEnergyBBListener mListener; private final int mDefaultTier; @@ -709,8 +679,8 @@ 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() { @@ -788,8 +758,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B } /** - * Change the Bounding Box tier relatively to offset - * with wrapping at tier limits + * Change the Bounding Box tier relatively to offset with wrapping at tier limits * * @param aOffset relative tier change */ 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 6ca6da874f..5fe5107dc4 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 @@ -15,8 +15,8 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe 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(); @@ -34,8 +34,7 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe @Override public boolean isOutputFacing(byte aSide) { - return (aSide > 1) - && (aSide != getBaseMetaTileEntity().getFrontFacing()) + return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); } @@ -91,133 +90,79 @@ 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 4e0b428fa4..6fbdf73189 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 @@ -35,90 +35,59 @@ 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 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 bec1b90ad1..bf0e913ce7 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 @@ -2,6 +2,8 @@ package gregtech.common.tileentities.generators; import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.interfaces.ITexture; @@ -11,15 +13,18 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenera import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; -import net.minecraftforge.fluids.FluidStack; 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(); } @@ -65,8 +70,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 @@ -87,134 +92,84 @@ 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 b3da47ae89..4a5cb72be9 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,8 +9,9 @@ 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); } @@ -18,8 +19,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); } @@ -32,15 +33,12 @@ 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 0589f8f236..85e3218f9e 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,44 +9,43 @@ 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); + 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 d8d8cfed63..2ec1d32e36 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 @@ -9,8 +9,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_N 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 GT_MetaTileEntity_BasicHull_Steel(int aID, String aName, String aNameRegional, int aTier, + String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -31,17 +32,14 @@ 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)) - }; + 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 2a0827e278..e31e793f03 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,43 +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); + 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 f8bc564ab4..cac1ef936e 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 @@ -3,6 +3,12 @@ package gregtech.common.tileentities.machines; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_HATCH; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_HATCH_ACTIVE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; + import appeng.api.config.Actionable; import appeng.api.config.PowerMultiplier; import appeng.api.implementations.IPowerChannelState; @@ -17,11 +23,13 @@ import appeng.me.GridAccessException; import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; import appeng.util.item.AEItemStack; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotGroup; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import cpw.mods.fml.common.Optional; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; @@ -36,15 +44,11 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.modularui.widget.AESlotWidget; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.common.util.ForgeDirection; @Optional.Interface(iface = "appeng.api.implementations.IPowerChannelState", modid = "appliedenergistics2") public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch_InputBus implements IConfigurationCircuitSupport, IAddGregtechLogo, IAddUIWidgets, IPowerChannelState { + private static final int SLOT_COUNT = 16; private BaseActionSource requestSource = null; private AENetworkProxy gridProxy = null; @@ -53,14 +57,19 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch 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" - }); + 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" }); 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; } @@ -72,12 +81,12 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_ME_INPUT_HATCH_ACTIVE)}; + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_INPUT_HATCH_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_ME_INPUT_HATCH)}; + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_INPUT_HATCH) }; } @Override @@ -98,12 +107,14 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch if (gridProxy == null) { if (getBaseMetaTileEntity() instanceof IGridProxyable) { gridProxy = new AENetworkProxy( - (IGridProxyable) getBaseMetaTileEntity(), "proxy", ItemList.Hatch_Output_Bus_ME.get(1), true); + (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())); + if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner( + getBaseMetaTileEntity().getWorld() + .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); } } return this.gridProxy; @@ -165,12 +176,10 @@ 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 - }; + "The bus is " + + ((getProxy() != null && getProxy().isActive()) ? EnumChatFormatting.GREEN + "online" + : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + + EnumChatFormatting.RESET }; } else return new String[] {}; } @@ -238,8 +247,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch 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 @@ -279,12 +287,12 @@ 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; shadowInventory[i] = null; @@ -312,8 +320,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) {} } } return null; @@ -327,12 +334,11 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { final SlotWidget[] aeSlotWidgets = new SlotWidget[16]; - builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 4) - .startFromSlot(0) - .endAtSlot(15) - .phantom(true) + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(0).endAtSlot(15).phantom(true) .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_ARROW_ME) .widgetCreator(slot -> new SlotWidget(slot) { + @Override protected void phantomClick(ClickData clickData, ItemStack cursorStack) { if (clickData.mouseButton != 0) return; @@ -345,9 +351,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch } if (getBaseMetaTileEntity().isServerSide()) { final ItemStack newInfo = updateInformationSlot(aSlotIndex, cursorStack); - aeSlotWidgets[getMcSlot().getSlotIndex()] - .getMcSlot() - .putStack(newInfo); + aeSlotWidgets[getMcSlot().getSlotIndex()].getMcSlot().putStack(newInfo); } } @@ -357,29 +361,22 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch } return false; } - }) - .build() - .setPos(7, 9)) - .widget(SlotGroup.ofItemHandler(inventoryHandler, 4) - .startFromSlot(16) - .endAtSlot(31) - .phantom(true) - .background(GT_UITextures.SLOT_DARK_GRAY) - .widgetCreator(slot -> - aeSlotWidgets[slot.getSlotIndex() - 16] = new AESlotWidget(slot).disableInteraction()) - .build() - .setPos(97, 9)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_ARROW_DOUBLE) - .setPos(82, 40) - .setSize(12, 12)); + }).build().setPos(7, 9)) + .widget( + SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(16).endAtSlot(31).phantom(true) + .background(GT_UITextures.SLOT_DARK_GRAY) + .widgetCreator( + slot -> aeSlotWidgets[slot.getSlotIndex() - 16] = new AESlotWidget(slot) + .disableInteraction()) + .build().setPos(97, 9)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_DOUBLE).setPos(82, 40) + .setSize(12, 12)); } @Override public void addGregTechLogo(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(80, 63)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(80, 63)); } } 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 e52ff2796b..6099473660 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 @@ -3,6 +3,18 @@ package gregtech.common.tileentities.machines; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_HATCH; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_HATCH_ACTIVE; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.common.util.ForgeDirection; + import appeng.api.AEApi; import appeng.api.implementations.IPowerChannelState; import appeng.api.networking.GridFlags; @@ -30,24 +42,14 @@ 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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; @Optional.Interface(iface = "appeng.api.implementations.IPowerChannelState", modid = "appliedenergistics2") public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatch_OutputBus implements IPowerChannelState { + 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; @@ -59,14 +61,12 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc aName, aNameRegional, 1, - new String[] { - "Item Output for Multiblocks", "Stores directly into ME", - }, + new String[] { "Item Output for Multiblocks", "Stores directly into ME", }, 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); } @@ -77,12 +77,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 @@ -101,7 +101,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc /** * Attempt to store items in connected ME network. Returns how many items did not fit (if the network was down e.g.) * - * @param stack input stack + * @param stack input stack * @return amount of items left over */ @Optional.Method(modid = "appliedenergistics2") @@ -132,8 +132,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide).isGUIClickable()) return; infiniteCache = !infiniteCache; - GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocal("GT5U.hatch.infiniteCache." + infiniteCache)); + GT_Utility + .sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.infiniteCache." + infiniteCache)); } @Override @@ -142,12 +142,14 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc if (gridProxy == null) { if (getBaseMetaTileEntity() instanceof IGridProxyable) { gridProxy = new AENetworkProxy( - (IGridProxyable) getBaseMetaTileEntity(), "proxy", ItemList.Hatch_Output_Bus_ME.get(1), true); + (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())); + if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner( + getBaseMetaTileEntity().getWorld() + .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); } } return this.gridProxy; @@ -243,8 +245,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc 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)); if (s != null) { s.setStackSize(tag.getLong("size")); itemCache.add(s); @@ -271,11 +273,9 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc public String[] getInfoData() { 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 { @@ -283,8 +283,11 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc 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/GT_MetaTileEntity_Hatch_Output_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java index 6fbcbe4681..e60dec5c51 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java @@ -3,6 +3,18 @@ package gregtech.common.tileentities.machines; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_FLUID_HATCH; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_FLUID_HATCH_ACTIVE; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import appeng.api.AEApi; import appeng.api.config.Actionable; import appeng.api.config.PowerMultiplier; @@ -35,23 +47,13 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; 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.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; @Optional.Interface(iface = "appeng.api.implementations.IPowerChannelState", modid = "appliedenergistics2") public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_Output implements IPowerChannelState { + private BaseActionSource requestSource = null; private AENetworkProxy gridProxy = null; - IItemList<IAEFluidStack> fluidCache = - GregTech_API.mAE2 ? AEApi.instance().storage().createFluidList() : null; + IItemList<IAEFluidStack> fluidCache = GregTech_API.mAE2 ? AEApi.instance().storage().createFluidList() : null; long lastOutputTick = 0; long tickCounter = 0; boolean lastOutputFailed = false; @@ -63,9 +65,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O aName, aNameRegional, 1, - new String[] { - "Fluid Output for Multiblocks", "Stores directly into ME", - }, + new String[] { "Fluid Output for Multiblocks", "Stores directly into ME", }, 0); } @@ -80,12 +80,12 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH)}; + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH_ACTIVE)}; + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH_ACTIVE) }; } @Override @@ -108,7 +108,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O /** * Attempt to store fluid in connected ME network. Returns how much fluid is accepted (if the network was down e.g.) * - * @param aFluid input fluid + * @param aFluid input fluid * @return amount of fluid filled */ @Optional.Method(modid = "appliedenergistics2") @@ -154,7 +154,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide).isGUIClickable()) return; infiniteCache = !infiniteCache; GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocal("GT5U.hatch.infiniteCacheFluid." + infiniteCache)); + aPlayer, + StatCollector.translateToLocal("GT5U.hatch.infiniteCacheFluid." + infiniteCache)); } @Override @@ -163,12 +164,14 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O if (gridProxy == null) { if (getBaseMetaTileEntity() instanceof IGridProxyable) { gridProxy = new AENetworkProxy( - (IGridProxyable) getBaseMetaTileEntity(), "proxy", ItemList.Hatch_Output_ME.get(1), true); + (IGridProxyable) getBaseMetaTileEntity(), + "proxy", + ItemList.Hatch_Output_ME.get(1), + true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); - if (getBaseMetaTileEntity().getWorld() != null) - gridProxy.setOwner(getBaseMetaTileEntity() - .getWorld() - .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); + if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner( + getBaseMetaTileEntity().getWorld() + .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); } } return this.gridProxy; @@ -254,8 +257,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O for (int i = 0; i < l.tagCount(); ++i) { NBTTagCompound tag = l.getCompoundTagAt(i); NBTTagCompound tagFluidStack = tag.getCompoundTag("fluidStack"); - final IAEFluidStack s = - AEApi.instance().storage().createFluidStack(GT_Utility.loadFluid(tagFluidStack)); + final IAEFluidStack s = AEApi.instance().storage() + .createFluidStack(GT_Utility.loadFluid(tagFluidStack)); if (s != null) { s.setStackSize(tag.getLong("size")); fluidCache.add(s); @@ -282,11 +285,9 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O public String[] getInfoData() { if (!GregTech_API.mAE2) return new String[] {}; List<String> ss = new ArrayList<>(); - ss.add("The hatch is " - + ((getProxy() != null && getProxy().isActive()) - ? EnumChatFormatting.GREEN + "online" - : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) - + EnumChatFormatting.RESET); + ss.add( + "The hatch is " + ((getProxy() != null && getProxy().isActive()) ? EnumChatFormatting.GREEN + "online" + : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + EnumChatFormatting.RESET); if (fluidCache.isEmpty()) { ss.add("The bus has no cached fluids"); } else { @@ -294,8 +295,12 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O ss.add(String.format("The hatch contains %d cached fluids: ", fluidCache.size())); int counter = 0; for (IAEFluidStack s : fluidCache) { - ss.add(s.getFluidStack().getLocalizedName() + ": " + EnumChatFormatting.GOLD - + nc.toWideReadableForm(s.getStackSize()) + " mB" + EnumChatFormatting.RESET); + ss.add( + s.getFluidStack().getLocalizedName() + ": " + + EnumChatFormatting.GOLD + + nc.toWideReadableForm(s.getStackSize()) + + " mB" + + EnumChatFormatting.RESET); if (++counter > 100) break; } } @@ -303,11 +308,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O } @Optional.Method(modid = "appliedenergistics2") - public static IAEFluidStack fluidAEInsert( - final IEnergySource energy, - final IMEInventory<IAEFluidStack> cell, - final IAEFluidStack input, - final BaseActionSource src) { + public static IAEFluidStack fluidAEInsert(final IEnergySource energy, final IMEInventory<IAEFluidStack> cell, + final IAEFluidStack input, final BaseActionSource src) { final IAEFluidStack possible = cell.injectItems(input.copy(), Actionable.SIMULATE, src); long stored = input.getStackSize(); 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 ee2ddcdfed..34589d2c1c 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 @@ -3,6 +3,21 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; +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; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -17,29 +32,17 @@ 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; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_BasicMachine { + boolean ready = false; int radius; int step; int cX; int cZ; - public GT_MetaTileEntity_AdvSeismicProspector( - int aID, String aName, String aNameRegional, int aTier, int aRadius, int aStep) { + public GT_MetaTileEntity_AdvSeismicProspector(int aID, String aName, String aNameRegional, int aTier, int aRadius, + int aStep) { super( aID, aName, @@ -53,76 +56,43 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba "", // NEI name 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())); 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; @@ -146,42 +116,40 @@ 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 + } else if (ready && mMaxProgresstime == 0 && aStack != null && aStack.stackSize == 1 && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { - this.ready = false; - - // prospecting ores - HashMap<String, Integer> tOres = new HashMap<>(36); - - prospectOres(tOres); - - // prospecting oils - 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); - } + this.ready = false; + + // prospecting ores + HashMap<String, Integer> tOres = new HashMap<>(36); + + prospectOres(tOres); + + // prospecting oils + 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); + } } return true; @@ -205,10 +173,9 @@ 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; @@ -220,12 +187,10 @@ 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) { @@ -264,10 +229,11 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba if (tBlock instanceof GT_Block_Ores_Abstract) { 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]; + 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]; if ((tMaterial != null) && (tMaterial != Materials._NULL)) return tMaterial.mDefaultLocalName; } 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 e718fe0a2d..f94b8404fa 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 @@ -2,6 +2,8 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.ItemList; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -11,9 +13,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine { + ItemStack aInputCache; ItemStack aOutputCache; int aTypeCache = 0; @@ -32,73 +34,49 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine "", 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -107,11 +85,11 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine } private boolean hasValidCache(ItemStack mItem, int mType, boolean mClearOnFailure) { - if (aInputCache != null - && aOutputCache != null + 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; @@ -135,8 +113,7 @@ 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)) + 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); @@ -156,8 +133,7 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine } if ((ItemList.Schematic_2by2.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 4)) { boolean tIsCached = hasValidCache(tSlot0, 2, true); - this.mOutputItems[0] = tIsCached - ? aOutputCache.copy() + this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, null, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { @@ -174,10 +150,17 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine } if ((ItemList.Schematic_3by3.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 9)) { boolean tIsCached = hasValidCache(tSlot0, 3, true); - this.mOutputItems[0] = tIsCached - ? aOutputCache.copy() + this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput( - tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0); + tSlot0, + tSlot0, + tSlot0, + tSlot0, + tSlot0, + tSlot0, + tSlot0, + tSlot0, + tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 9; @@ -196,24 +179,22 @@ 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)) + 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) { + 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) @@ -222,10 +203,8 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine && 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 f6223a4a0d..28caaef181 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 @@ -13,18 +13,18 @@ import gregtech.api.util.GT_Utility; 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); } @@ -65,18 +65,17 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf if (mMetaTileEntity.dechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { for (int i = mMetaTileEntity.dechargerSlotStartIndex(), - k = mMetaTileEntity.dechargerSlotCount() + i; - i < k; - i++) { + 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())), + GT_Utility.safeInt( + Math.min( + V[mTier] * 15, + mBaseMetaTileEntity.getEUCapacity() + - mBaseMetaTileEntity.getStoredEU())), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, @@ -88,9 +87,7 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf } if (mMetaTileEntity.rechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() > 0) { for (int i = mMetaTileEntity.rechargerSlotStartIndex(), - k = mMetaTileEntity.rechargerSlotCount() + i; - i < k; - i++) { + k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { if (mBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { mBaseMetaTileEntity.decreaseStoredEU( GT_ModHandler.chargeElectricItem( 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 3dc9fd7b63..2cab223249 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,7 +1,12 @@ package gregtech.common.tileentities.machines.basic; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -11,9 +16,6 @@ import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.render.TextureFactory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine implements IAddUIWidgets { @@ -29,43 +31,43 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine 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_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_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_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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @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)) && ItemList.Cell_Empty.isStackEqual(aStack); } @@ -78,36 +80,34 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine @Override 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); - NBTTagCompound aNBT = tStack.getTagCompound(); - if (aNBT != null) { - 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; + for (ItemStack tStack : mInventory) 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(); + 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; + } } } - } - tHeat++; - if (aNBT != null) { - aNBT.setInteger("Heat", tHeat); - aNBT.setLong("HeatTime", tWorldTime); - } - if (tHeat > GT_MetaGenerated_Tool.getPrimaryMaterial(tStack).mMeltingPoint) { - mInventory[0] = null; + tHeat++; + 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 ff46aada64..bc6f50fde6 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 @@ -3,7 +3,19 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.GT_Values.MOD_ID_RC; import static gregtech.api.enums.Textures.BlockIcons.*; +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 net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + import com.google.common.collect.ArrayListMultimap; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -25,15 +37,6 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.extensions.ArrayExt; import ic2.api.item.IC2Items; -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 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,9 +48,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi aTier, 1, new String[] { - "Disassembles Machines up to " + GT_Values.TIER_COLORS[aTier] + GT_Values.VOLTAGE_NAMES[aTier], - "Can also disassemble most assembler recipes!" - }, + "Disassembles Machines up to " + GT_Values.TIER_COLORS[aTier] + GT_Values.VOLTAGE_NAMES[aTier], + "Can also disassemble most assembler recipes!" }, 1, 9, "Disassembler.png", @@ -56,101 +58,65 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi // 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } - private static final ItemStack[][] alwaysReplace = { - { + 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) - } - }; + new ItemStack(Blocks.trapped_chest, 1, OreDictionary.WILDCARD_VALUE) }, + { + // ItemStack to replace + new ItemStack(Blocks.chest) } }; - private static final Object[][] OreDictionaryOverride = { - { + 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) - } - }; + "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() { return outputHardOverrides; @@ -215,10 +181,10 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi if (GT_Utility.isStackInvalid(is)) return DID_NOT_FIND_RECIPE; - if (is.getItem() instanceof GT_MetaGenerated_Tool - || isCircuit(is) + 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; @@ -270,8 +236,7 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } - return setOutputsAndTime(recipe.inputs, recipe.stackSize) - ? FOUND_AND_SUCCESSFULLY_USED_RECIPE + return setOutputsAndTime(recipe.inputs, recipe.stackSize) ? FOUND_AND_SUCCESSFULLY_USED_RECIPE : FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } @@ -283,8 +248,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } private int checkRecipeMap() { - GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.findRecipe( - this.getBaseMetaTileEntity(), true, this.maxEUInput(), null, this.getAllInputs()); + 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) { @@ -323,8 +288,7 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi 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()); + if (recipes.size() > 1) recipesColl = recipes.stream().skip(1).map(x -> x.recipe).collect(Collectors.toList()); handleRecipeTransformation(inputs, output, recipesColl); @@ -335,8 +299,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi 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) @@ -349,15 +313,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) { @@ -405,9 +369,7 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } private static ItemStack handleWildcard(ItemStack stack) { - if (stack != null - && stack.getItemDamage() == OreDictionary.WILDCARD_VALUE - && !stack.getItem().isDamageable()) { + if (stack != null && stack.getItemDamage() == OreDictionary.WILDCARD_VALUE && !stack.getItem().isDamageable()) { stack.setItemDamage(0); } return stack; @@ -420,8 +382,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi 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) { @@ -440,17 +402,12 @@ 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 + if (dataAgainst == null || dataAgainst.mMaterial == null || dataAgainst.mMaterial.mMaterial == null || dataAgainst.mPrefix == null || dataAgainst.mPrefix != data.mPrefix) { @@ -473,8 +430,8 @@ 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); @@ -488,7 +445,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi 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); + || 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); } @@ -523,6 +481,7 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } static class DissassembleReference { + final int stackSize; ItemStack[] inputs; final GT_Recipe recipe; @@ -560,9 +519,7 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi 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()); + })).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; @@ -575,21 +532,15 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } private static double getCheaperInputs(GT_MetaTileEntity_Disassembler.DissassembleReference x) { - double fluidInputValueRaw = Arrays.stream(x.recipe.mFluidInputs) - .flatMapToInt(f -> IntStream.of(f.amount)) + 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() + 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)) + 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() + double outputValue = Arrays.stream(x.recipe.mOutputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum() + (fluidOutputValueRaw / 144D); return outputValue / inputValue; } @@ -599,8 +550,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } @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.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 516d2dda66..a75876b82d 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 @@ -8,6 +8,27 @@ import static gregtech.api.metatileentity.BaseTileEntity.STALLED_STUTTERING_TOOL import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.*; +import java.util.stream.Collectors; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; + import com.google.common.collect.ImmutableSet; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; @@ -27,6 +48,7 @@ import com.gtnewhorizons.modularui.common.widget.SlotGroup; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.mojang.authlib.GameProfile; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import forestry.api.apiculture.*; @@ -52,25 +74,6 @@ import gregtech.api.util.GT_ApiaryModifier; import gregtech.api.util.GT_ApiaryUpgrade; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.lang.reflect.Field; -import java.util.*; -import java.util.stream.Collectors; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicMachine implements IBeeHousing, IBeeHousingInventory, IErrorLogic, IBeeModifier, IBeeListener, IAddUIWidgets { @@ -97,80 +100,56 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM aNameRegional, aTier, 4, - new String[] {"BEES GOES BRRRR", EnumChatFormatting.GRAY + AuthorKuba}, + new String[] { "BEES GOES BRRRR", EnumChatFormatting.GRAY + AuthorKuba }, 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -252,13 +231,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM final HashMap<GT_Utility.ItemId, ItemStack> pollen = new HashMap<>(); if (isRetrievingPollen && floweringMod > 0f) { - final int icycles = - (int) cycles + (getWorld().rand.nextFloat() < (cycles - (float) ((int) cycles)) ? 1 : 0); + final int icycles = (int) cycles + + (getWorld().rand.nextFloat() < (cycles - (float) ((int) cycles)) ? 1 : 0); for (int z = 0; z < icycles; z++) { final IIndividual p = bee.retrievePollen(this); if (p != null) { - final ItemStack s = - p.getGenome().getSpeciesRoot().getMemberStack(p, EnumGermlingType.POLLEN.ordinal()); + final ItemStack s = p.getGenome().getSpeciesRoot() + .getMemberStack(p, EnumGermlingType.POLLEN.ordinal()); if (s != null) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(s); pollen.computeIfAbsent(id, k -> { @@ -285,19 +264,16 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM final HashMap<GT_Utility.ItemId, Float> drops = new HashMap<>(); final 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()) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); drops.merge( id, - Bee.getFinalChance(entry.getValue(), speed, prodMod, 8f) - * (float) entry.getKey().stackSize + Bee.getFinalChance(entry.getValue(), speed, prodMod, 8f) * (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()) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); drops.merge( id, @@ -308,8 +284,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM dropstacks.computeIfAbsent(id, k -> entry.getKey()); } if (primary.isJubilant(genome, this) && secondary.isJubilant(genome, this)) - for (Map.Entry<ItemStack, Float> entry : - primary.getSpecialtyChances().entrySet()) { + for (Map.Entry<ItemStack, Float> entry : primary.getSpecialtyChances().entrySet()) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); drops.merge( id, @@ -361,24 +336,20 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM for (Map.Entry<GT_Utility.ItemId, Float> entry : drops.entrySet()) { final ItemStack s = dropstacks.get(entry.getKey()).copy(); s.stackSize = entry.getValue().intValue() - + (getWorld().rand.nextFloat() - < (entry.getValue() - - (float) 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; - } + 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; + } } - 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 @@ -475,15 +446,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM } if (effect instanceof IAlleleBeeAcceleratableEffect) { effectData[0] = effect.validateStorage(effectData[0]); - effectData[0] = ((IAlleleBeeAcceleratableEffect) effect) - .doEffectAccelerated( - genome, - effectData[0], - this, - usedBeeLife - / (effect instanceof AlleleEffectThrottled - ? (float) AlleleBeeEffectThrottledField.getInt(effect) - : 1f)); + effectData[0] = ((IAlleleBeeAcceleratableEffect) effect).doEffectAccelerated( + genome, + effectData[0], + this, + usedBeeLife / (effect instanceof AlleleEffectThrottled + ? (float) AlleleBeeEffectThrottledField.getInt(effect) + : 1f)); } if (!effect.isCombinable()) return; @@ -493,15 +462,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (secondary instanceof IAlleleBeeAcceleratableEffect) { effectData[1] = secondary.validateStorage(effectData[1]); - effectData[1] = ((IAlleleBeeAcceleratableEffect) secondary) - .doEffectAccelerated( - genome, - effectData[0], - this, - usedBeeLife - / (secondary instanceof AlleleEffectThrottled - ? (float) AlleleBeeEffectThrottledField.getInt(secondary) - : 1f)); + effectData[1] = ((IAlleleBeeAcceleratableEffect) secondary).doEffectAccelerated( + genome, + effectData[0], + this, + usedBeeLife / (secondary instanceof AlleleEffectThrottled + ? (float) AlleleBeeEffectThrottledField.getInt(secondary) + : 1f)); } } catch (Exception ex) { ex.printStackTrace(); @@ -512,9 +479,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isClientSide()) { 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. + /* + * 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(); } @@ -537,8 +505,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (!aBaseMetaTileEntity.isActive()) { if (aBaseMetaTileEntity.isAllowedToWork() - && (aBaseMetaTileEntity.hasInventoryBeenModified() - || aTick % 600 == 0 + && (aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) { final int check = checkRecipe(); @@ -572,13 +539,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (usedQueen != null) { if (usedQueenBee == null) usedQueenBee = beeRoot.getMember(usedQueen); doEffect(); - if (!retrievingPollenInThisOperation - && floweringMod > 0f + 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 (retrievedpollen != null && (usedQueenBee.pollinateRandom(this, retrievedpollen) + || this.mProgresstime % (pollinationDelay * 5) == 0)) + retrievedpollen = null; } } @@ -593,21 +559,20 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (usedQueenBee != null) doAcceleratedEffects(); updateModifiers(); for (int i = 0; i < mOutputItems.length; i++) - 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 (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 (aBaseMetaTileEntity + .addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) + break; + } Arrays.fill(mOutputItems, null); mEUt = 0; mProgresstime = 0; @@ -616,8 +581,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM aBaseMetaTileEntity.setActive(false); if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing) { - final TileEntity tTileEntity2 = - aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); + final TileEntity tTileEntity2 = aBaseMetaTileEntity + .getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); final long tStoredEnergy = aBaseMetaTileEntity.getUniversalEnergyStored(); int tMaxStacks = (int) (tStoredEnergy / 64L); if (tMaxStacks > mOutputItems.length) tMaxStacks = mOutputItems.length; @@ -644,8 +609,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM } public void cancelProcess() { - if (this.getBaseMetaTileEntity().isActive() - && this.getBaseMetaTileEntity().isServerSide() + if (this.getBaseMetaTileEntity().isActive() && this.getBaseMetaTileEntity().isServerSide() && usedQueen != null && beeRoot.isMember(usedQueen, EnumBeeType.QUEEN.ordinal())) { Arrays.fill(mOutputItems, null); @@ -663,9 +627,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM 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()); + 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 (!GT_ApiaryUpgrade.isUpgrade(aStack)) return false; @@ -741,10 +704,9 @@ 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; } @@ -868,12 +830,16 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM || getWorld().getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ) != flowerBlockMeta) if (!FlowerManager.flowerRegistry.isAcceptedFlower( - flowerType, getWorld(), flowercoords.posX, flowercoords.posY, flowercoords.posZ)) + flowerType, + getWorld(), + flowercoords.posX, + flowercoords.posY, + flowercoords.posZ)) flowercoords = null; 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) { @@ -1044,6 +1010,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM // endregion static final IBeekeepingLogic dummylogic = new IBeekeepingLogic() { + @Override public boolean canWork() { return true; @@ -1093,103 +1060,86 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new SlotWidget(new ApiarySlot(inventoryHandler, queen)) + builder.widget( + new SlotWidget(new ApiarySlot(inventoryHandler, queen)) .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_BEE_QUEEN) .setPos(36, 21)) - .widget(new SlotWidget(new ApiarySlot(inventoryHandler, drone)) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_BEE_DRONE) - .setPos(36, 41)) - .widget(SlotGroup.ofItemHandler(inventoryHandler, 2) - .startFromSlot(7) - .endAtSlot(10) - .slotCreator(i -> new ApiarySlot(inventoryHandler, i)) - .applyForWidget(widget -> widget.setGTTooltip(() -> mTooltipCache.getData(UPGRADE_TOOLTIP)) - .setTooltipShowUpDelay(TOOLTIP_DELAY)) - .build() - .setPos(61, 23)); + .widget( + new SlotWidget(new ApiarySlot(inventoryHandler, drone)) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_BEE_DRONE) + .setPos(36, 41)) + .widget( + SlotGroup.ofItemHandler(inventoryHandler, 2).startFromSlot(7).endAtSlot(10) + .slotCreator(i -> new ApiarySlot(inventoryHandler, i)) + .applyForWidget( + widget -> widget.setGTTooltip(() -> mTooltipCache.getData(UPGRADE_TOOLTIP)) + .setTooltipShowUpDelay(TOOLTIP_DELAY)) + .build().setPos(61, 23)); super.addUIWidgets(builder, buildContext); - builder.widget(new ProgressBar() - .setProgress(() -> (float) getProgresstime() / Math.max(maxProgresstime(), 1)) - .setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20) - .setPos(70, 3) - .setSize(20, 18)) - .widget(new ButtonWidget() - .setOnClick((clickData, widget) -> cancelProcess()) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CROSS) - .setGTTooltip(() -> mTooltipCache.getData(CANCEL_PROCESS_TOOLTIP)) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(7, 26) - .setSize(18, 18)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_INFORMATION) - .setGTTooltip(() -> { - final String energyreq = GT_Utility.formatNumbers( - (int) ((float) GT_MetaTileEntity_IndustrialApiary.baseEUtUsage - * getEnergyModifier() - * getAcceleration()) - + getAdditionalEnergyUsage()); - final String Temp = StatCollector.translateToLocal( - getTemperature().getName()); - final String Hum = - StatCollector.translateToLocal(getHumidity().getName()); - if (getUsedQueen() != null - && BeeManager.beeRoot.isMember(getUsedQueen(), EnumBeeType.QUEEN.ordinal())) { - final IBee bee = BeeManager.beeRoot.getMember(getUsedQueen()); - if (bee.isAnalyzed()) { - final IBeeGenome genome = bee.getGenome(); - final IBeeModifier mod = BeeManager.beeRoot - .getBeekeepingMode(getWorld()) - .getBeeModifier(); - final float tmod = - getTerritoryModifier(null, 1f) * mod.getTerritoryModifier(null, 1f); - final int[] t = Arrays.stream(genome.getTerritory()) - .map(i -> (int) ((float) i * tmod)) - .toArray(); - return mTooltipCache.getUncachedTooltipData( - INFO_WITH_BEE_TOOLTIP, - energyreq, - Temp, - Hum, - genome.getSpeed(), - getProductionModifier(null, 1f) * mod.getProductionModifier(null, 1f), - Math.round(getFloweringModifier(null, 1f) - * genome.getFlowering() + builder.widget( + new ProgressBar().setProgress(() -> (float) getProgresstime() / Math.max(maxProgresstime(), 1)) + .setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20).setPos(70, 3).setSize(20, 18)) + .widget( + new ButtonWidget().setOnClick((clickData, widget) -> cancelProcess()) + .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CROSS) + .setGTTooltip(() -> mTooltipCache.getData(CANCEL_PROCESS_TOOLTIP)) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(7, 26).setSize(18, 18)) + .widget(new DrawableWidget().setDrawable(GT_UITextures.PICTURE_INFORMATION).setGTTooltip(() -> { + final String energyreq = GT_Utility.formatNumbers( + (int) ((float) GT_MetaTileEntity_IndustrialApiary.baseEUtUsage * getEnergyModifier() + * getAcceleration()) + getAdditionalEnergyUsage()); + final String Temp = StatCollector.translateToLocal(getTemperature().getName()); + final String Hum = StatCollector.translateToLocal(getHumidity().getName()); + if (getUsedQueen() != null + && BeeManager.beeRoot.isMember(getUsedQueen(), EnumBeeType.QUEEN.ordinal())) { + final IBee bee = BeeManager.beeRoot.getMember(getUsedQueen()); + if (bee.isAnalyzed()) { + final IBeeGenome genome = bee.getGenome(); + final IBeeModifier mod = BeeManager.beeRoot.getBeekeepingMode(getWorld()).getBeeModifier(); + final float tmod = getTerritoryModifier(null, 1f) * mod.getTerritoryModifier(null, 1f); + final int[] t = Arrays.stream(genome.getTerritory()).map(i -> (int) ((float) i * tmod)) + .toArray(); + return mTooltipCache.getUncachedTooltipData( + INFO_WITH_BEE_TOOLTIP, + energyreq, + Temp, + Hum, + genome.getSpeed(), + getProductionModifier(null, 1f) * mod.getProductionModifier(null, 1f), + Math.round( + getFloweringModifier(null, 1f) * genome.getFlowering() * mod.getFloweringModifier(null, 1f)), - Math.round(getLifespanModifier(null, null, 1f) - * genome.getLifespan() + Math.round( + getLifespanModifier(null, null, 1f) * genome.getLifespan() * mod.getLifespanModifier(null, null, 1f)), - t[0], - t[1], - t[2]); - } - } - return mTooltipCache.getUncachedTooltipData(INFO_TOOLTIP, energyreq, Temp, Hum); - }) - .attachSyncer( - new FakeSyncWidget.ItemStackSyncer(() -> usedQueen, val -> usedQueen = val), - builder, - (widget, val) -> widget.notifyTooltipChange()) - .setPos(163, 5) - .setSize(7, 18)) - .widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - if (clickData.mouseButton == 0) { - if (mLockedSpeed) return; - if (!clickData.shift) { - mSpeed++; - if (mSpeed > getMaxSpeed()) mSpeed = 0; - } else { - mSpeed--; - if (mSpeed < 0) mSpeed = getMaxSpeed(); - } - } else if (clickData.mouseButton == 1) { - mLockedSpeed = !mLockedSpeed; - if (mLockedSpeed) mSpeed = getMaxSpeed(); - } - }) - .setGTTooltip(() -> mTooltipCache.getUncachedTooltipData( + t[0], + t[1], + t[2]); + } + } + return mTooltipCache.getUncachedTooltipData(INFO_TOOLTIP, energyreq, Temp, Hum); + }).attachSyncer( + new FakeSyncWidget.ItemStackSyncer(() -> usedQueen, val -> usedQueen = val), + builder, + (widget, val) -> widget.notifyTooltipChange()).setPos(163, 5).setSize(7, 18)) + .widget(new ButtonWidget().setOnClick((clickData, widget) -> { + if (clickData.mouseButton == 0) { + if (mLockedSpeed) return; + if (!clickData.shift) { + mSpeed++; + if (mSpeed > getMaxSpeed()) mSpeed = 0; + } else { + mSpeed--; + if (mSpeed < 0) mSpeed = getMaxSpeed(); + } + } else if (clickData.mouseButton == 1) { + mLockedSpeed = !mLockedSpeed; + if (mLockedSpeed) mSpeed = getMaxSpeed(); + } + }).setGTTooltip( + () -> mTooltipCache.getUncachedTooltipData( mLockedSpeed ? SPEED_LOCKED_TOOLTIP : SPEED_TOOLTIP, getAcceleration(), GT_Utility.formatNumbers(getAdditionalEnergyUsage()))) @@ -1201,18 +1151,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM new FakeSyncWidget.BooleanSyncer(() -> mLockedSpeed, val -> mLockedSpeed = val), builder, (widget, val) -> widget.notifyTooltipChange()) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setBackground(GT_UITextures.PICTURE_SQUARE_LIGHT_GRAY) - .setPos(25, 62) - .setSize(18, 18)) - .widget(new TextWidget("x") - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(30, 63)) - .widget(TextWidget.dynamicString(() -> String.valueOf(1 << mSpeed)) - // mSpeed is already synced - .setSynced(false) - .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(26, 72)); + .setTooltipShowUpDelay(TOOLTIP_DELAY).setBackground(GT_UITextures.PICTURE_SQUARE_LIGHT_GRAY) + .setPos(25, 62).setSize(18, 18)) + .widget(new TextWidget("x").setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(30, 63)).widget( + TextWidget.dynamicString(() -> String.valueOf(1 << mSpeed)) + // mSpeed is already synced + .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(26, 72)); } @Override @@ -1233,37 +1177,31 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override protected SlotWidget createChargerSlot(int x, int y, String tooltipKey, Object[] tooltipArgs) { - return (SlotWidget) - super.createChargerSlot(x, y, tooltipKey, tooltipArgs).setPos(79, 62); + return (SlotWidget) super.createChargerSlot(x, y, tooltipKey, tooltipArgs).setPos(79, 62); } @Override protected DrawableWidget createErrorStatusArea(ModularWindow.Builder builder, IDrawable picture) { - return (DrawableWidget) super.createErrorStatusArea(builder, picture) - .setPos(100, 62) - .attachSyncer( - new FakeSyncWidget.ListSyncer<>( - () -> Arrays.asList(mErrorStates.toArray(new IErrorState[0])), - val -> { - mErrorStates.clear(); - mErrorStates.addAll(new HashSet<>(val)); - }, - (buffer, val) -> buffer.writeShort(val.getID()), - buffer -> ForestryAPI.errorStateRegistry.getErrorState(buffer.readShort())), - builder, - (widget, val) -> widget.notifyTooltipChange()); + return (DrawableWidget) super.createErrorStatusArea(builder, picture).setPos(100, 62).attachSyncer( + new FakeSyncWidget.ListSyncer<>(() -> Arrays.asList(mErrorStates.toArray(new IErrorState[0])), val -> { + mErrorStates.clear(); + mErrorStates.addAll(new HashSet<>(val)); + }, + (buffer, val) -> buffer.writeShort(val.getID()), + buffer -> ForestryAPI.errorStateRegistry.getErrorState(buffer.readShort())), + builder, + (widget, val) -> widget.notifyTooltipChange()); } @Override protected List<String> getErrorDescriptions() { if (!mErrorStates.isEmpty()) { - return mErrorStates.stream() - .map(state -> - EnumChatFormatting.RED + StatCollector.translateToLocal("for." + state.getDescription())) + return mErrorStates.stream().map( + state -> EnumChatFormatting.RED + StatCollector.translateToLocal("for." + state.getDescription())) .collect(Collectors.toList()); } else if (mStuttering) { - return mTooltipCache.getData(STALLED_STUTTERING_TOOLTIP, StatCollector.translateToLocal(POWER_SOURCE_POWER)) - .text; + return mTooltipCache + .getData(STALLED_STUTTERING_TOOLTIP, StatCollector.translateToLocal(POWER_SOURCE_POWER)).text; } else { return Collections.emptyList(); } @@ -1306,8 +1244,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM } } - private static final UIInfo<?, ?> IndustrialApiaryUI = - GT_UIInfos.GTTileEntityUIFactory.apply(GT_ModularUIContainer_IndustrialApiary::new); + private static final UIInfo<?, ?> IndustrialApiaryUI = GT_UIInfos.GTTileEntityUIFactory + .apply(GT_ModularUIContainer_IndustrialApiary::new); private static class GT_ModularUIContainer_IndustrialApiary extends ModularUIContainer { 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 b68d3bc436..d1c03e1527 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 @@ -3,6 +3,10 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.Arrays; + +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -17,10 +21,9 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.power.BasicMachineEUPower; import gregtech.common.power.Power; -import java.util.Arrays; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMachine { + public static int sUUAperUUM = 1; public static int sUUASpeedBonus = 4; public static int sDurationMultiplier = 3215; @@ -41,68 +44,39 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac "", 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); } @@ -110,7 +84,12 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Massfabricator( - this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -126,8 +105,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); @@ -159,11 +138,10 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac 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; } @@ -188,6 +166,7 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac } protected class MassfabricatorPower extends BasicMachineEUPower { + protected MassfabricatorPower(byte tier, int amperage) { super(tier, amperage); } @@ -204,7 +183,7 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac 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 { @@ -218,9 +197,8 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac while (tempEUt <= V[mTier - 1]) { 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 + if (recipeDuration == 0) 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; 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 14a213b156..32a0ad8537 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 @@ -7,6 +7,16 @@ 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 java.util.function.Consumer; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; @@ -14,6 +24,7 @@ import com.gtnewhorizons.modularui.common.widget.ButtonWidget; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Materials; @@ -31,14 +42,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Utility; -import java.util.function.Consumer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEntity_BasicTank implements IAddGregtechLogo, IAddUIWidgets { @@ -60,21 +63,23 @@ 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" - }); - } - - public GT_MetaTileEntity_MicrowaveEnergyTransmitter( - String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + 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) { 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); } @@ -89,51 +94,36 @@ 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); + 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) - }; - } - - @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[] { - MACHINE_CASINGS[mTier][aColorIndex + 1], + 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[] { 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 @@ -158,8 +148,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); @@ -193,19 +183,13 @@ 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 @@ -218,8 +202,7 @@ 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); @@ -258,8 +241,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt } 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); if (getBaseMetaTileEntity().isUniversalEnergyStored(energyUse)) { @@ -278,13 +261,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 @@ -424,27 +407,26 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setSize(90, 72) - .setPos(43, 4)) - .widget(TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(46, 8)) - .widget(TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(46, 16)) - .widget(TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(46, 24)) - .widget(TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(46, 32)) - .widget(TextWidget.dynamicString( - () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> hasDimensionalTeleportCapability()) - .setPos(46, 40)) + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 72).setPos(43, 4)) + .widget( + TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 8)) + .widget( + TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 16)) + .widget( + TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 24)) + .widget( + TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 32)) + .widget( + TextWidget + .dynamicString( + () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No")) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> hasDimensionalTeleportCapability()).setPos(46, 40)) .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val)); addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7); @@ -453,33 +435,38 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, 512, 64, 151); addChangeNumberButton( - builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, val -> mTargetD += val, -16, -8, 7, 58); + builder, + GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, + val -> mTargetD += val, + -16, + -8, + 7, + 58); addChangeNumberButton( - builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, val -> mTargetD += val, -4, -1, 25, 58); + builder, + GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, + val -> mTargetD += val, + -4, + -1, + 25, + 58); addChangeNumberButton(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_SMALL, val -> mTargetD += val, 4, 1, 133, 58); addChangeNumberButton(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, val -> mTargetD += val, 16, 8, 151, 58); } - private void addChangeNumberButtons( - ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, int addNumber, int xPos) { + private void addChangeNumberButtons(ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, + int addNumber, int xPos) { addChangeNumberButton(builder, overlay, val -> mTargetX += val, addNumberShift, addNumber, xPos, 4); addChangeNumberButton(builder, overlay, val -> mTargetY += val, addNumberShift, addNumber, xPos, 22); addChangeNumberButton(builder, overlay, val -> mTargetZ += val, addNumberShift, addNumber, xPos, 40); } - private void addChangeNumberButton( - ModularWindow.Builder builder, - IDrawable overlay, - Consumer<Integer> setter, - int addNumberShift, - int addNumber, - int xPos, - int yPos) { - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber)) - .setBackground(GT_UITextures.BUTTON_STANDARD, overlay) - .setSize(18, 18) - .setPos(xPos, yPos)); + private void addChangeNumberButton(ModularWindow.Builder builder, IDrawable overlay, Consumer<Integer> setter, + int addNumberShift, int addNumber, int xPos, int yPos) { + builder.widget( + new ButtonWidget() + .setOnClick((clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber)) + .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18).setPos(xPos, yPos)); } @Override @@ -489,9 +476,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt @Override public void addGregTechLogo(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(113, 56)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 56)); } } 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 1c1ed70c20..7e4d5f8165 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 @@ -3,6 +3,19 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.GT_Values.debugBlockMiner; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.ChunkPosition; +import net.minecraftforge.common.util.FakePlayer; + import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.api.math.Pos2d; @@ -10,6 +23,7 @@ import com.gtnewhorizons.modularui.api.math.Size; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.ProgressBar; + import gregtech.api.enums.Textures; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; @@ -24,24 +38,14 @@ import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; 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; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.ChunkPosition; -import net.minecraftforge.common.util.FakePlayer; @SuppressWarnings("ObjectEquality") public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine implements GT_IDrillingLogicDelegateOwner, IAddUIWidgets { - 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; @@ -60,91 +64,71 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine 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) - }, + 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(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()), + .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(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()), + .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.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()), + .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(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())); + .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]; @@ -162,8 +146,8 @@ public class GT_MetaTileEntity_Miner 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) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) // && aStack.getItem() == GT_DrillingLogicDelegate.MINING_PIPE_STACK.getItem(); } @@ -241,8 +225,10 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine 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; } @@ -272,13 +258,12 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine 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()); @@ -390,19 +375,18 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine @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")) - }; + 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")) }; } @Override @@ -415,7 +399,10 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine return mSpeed; } - /** @deprecated This method are obsolete, and may be removed in further updates. Please use 'this.getPipe().descent()' access! */ + /** + * @deprecated This method are obsolete, and may be removed in further updates. Please use + * 'this.getPipe().descent()' access! + */ @Deprecated public boolean moveOneDown(IGregTechTileEntity tileEntity) { boolean descends = pipe.descent(tileEntity); @@ -425,7 +412,10 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine return descends; } - /** @deprecated This method are obsolete, and may be removed in further updates. Please use 'this.getPipe().getFakePlayer(te)' access! */ + /** + * @deprecated This method are obsolete, and may be removed in further updates. Please use + * 'this.getPipe().getFakePlayer(te)' access! + */ @Deprecated protected FakePlayer getFakePlayer(IGregTechTileEntity aBaseTile) { return pipe.getFakePlayer(aBaseTile); @@ -441,12 +431,18 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine } private static final FallbackableUITexture progressBarTexture = new FallbackableUITexture( - UITexture.fullImage("gregtech", "gui/progressbar/miner"), GT_UITextures.PROGRESSBAR_CANNER); + UITexture.fullImage("gregtech", "gui/progressbar/miner"), + GT_UITextures.PROGRESSBAR_CANNER); @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { super.addUIWidgets(builder, buildContext); - builder.widget(createProgressBar( - progressBarTexture.get(), 20, ProgressBar.Direction.RIGHT, new Pos2d(78, 24), new Size(20, 18))); + builder.widget( + createProgressBar( + progressBarTexture.get(), + 20, + ProgressBar.Direction.RIGHT, + new Pos2d(78, 24), + new Size(20, 18))); } } 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 65f62f240a..054ca1694a 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 @@ -7,16 +7,18 @@ 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 java.util.Arrays; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; + 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; public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_TieredMachineBlock { @@ -29,60 +31,50 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered aNameRegional, aTier, 0, - "Repels nasty Creatures. Range: " + (4 + (12 * aTier)) + " unpowered / " + (16 + (48 * aTier)) - + " powered. Costs " + (1L << (aTier * 2)) + " EU/t"); + "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) { + 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); + 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[] { - MACHINE_CASINGS[mTier][aColorIndex + 1], + 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); } @@ -97,23 +89,16 @@ 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)); } 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 2a7e28f10b..f905717c5a 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 @@ -2,6 +2,11 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; @@ -12,12 +17,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachine { + public GT_MetaTileEntity_PotionBrewer(int aID, String aName, String aNameRegional, int aTier) { super( aID, @@ -32,73 +34,49 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi "", 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -156,7 +134,8 @@ 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))) { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), + getInputAt(0))) { if (!tModifier.startsWith("strong")) { return setOutput( "potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : "." + tModifier)); @@ -167,7 +146,8 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi return setOutput("potion.thick"); } if (GT_Utility.areStacksEqual( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), getInputAt(0))) { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + getInputAt(0))) { if (!tModifier.startsWith("long")) { return setOutput( "potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : "." + tModifier)); @@ -178,7 +158,8 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi return setOutput("potion.mundane"); } if (GT_Utility.areStacksEqual( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), getInputAt(0))) { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), + getInputAt(0))) { if (!tInputName.endsWith(".splash")) { return setOutput("potion." + tInputName + ".splash"); } @@ -205,8 +186,8 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi } @Override - public boolean allowPutStackValidated( - IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + public boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && getRecipeList().containsInput(aStack); } 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 6771ba0fcc..7da1ec5e43 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 @@ -1,5 +1,9 @@ package gregtech.common.tileentities.machines.basic; +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; + import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -8,10 +12,9 @@ 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 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, @@ -26,8 +29,8 @@ public class GT_MetaTileEntity_Printer extends GT_MetaTileEntity_BasicMachine { 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); } @@ -35,28 +38,27 @@ 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) + } 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 - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - getInputAt(0).stackSize -= 1; - return 2; + 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 + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + getInputAt(0).stackSize -= 1; + return 2; + } + } } } - } - } this.mMaxProgresstime = 0; return 0; } 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 26eed71b41..012f6e547f 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 @@ -3,22 +3,12 @@ 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.modularui.GT_UIInfos; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.BaseTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -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.init.Blocks; @@ -33,11 +23,24 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidHandler; +import gregtech.api.enums.Textures; +import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.BaseTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + 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))); @@ -60,17 +63,22 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { private boolean mDisallowRetract = true; 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 the bottom pump to retract the pipe!", - "Use Soldering Iron to auto retract the pipe when hitting a rock", - }); + 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 the bottom pump to retract the pipe!", + "Use Soldering Iron to auto retract the pipe when hitting a rock", }); radiusConfig = getMaxDistanceForTier(mTier); } @@ -93,8 +101,13 @@ 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( @@ -102,8 +115,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { this.mPrimaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mPrimaryPumpedBlock)); aNBT.setString( "mPumpedBlock2", - this.mSecondaryPumpedBlock == null - ? "" + this.mSecondaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mSecondaryPumpedBlock)); aNBT.setBoolean("wasPumping", wasPumping); aNBT.setInteger("radiusConfig", radiusConfig); @@ -122,8 +134,12 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { this.mDisallowRetract = aNBT.getBoolean("mDisallowRetract"); 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); } } @@ -151,15 +167,17 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } GT_Utility.sendChatToPlayer( aPlayer, - StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + (radiusConfig * 2 + 1) + "x" + StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + + (radiusConfig * 2 + 1) + + "x" + (radiusConfig * 2 + 1)); // TODO Add translation support clearQueue(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) { if (super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ)) return true; mDisallowRetract = !mDisallowRetract; GT_Utility.sendChatToPlayer( @@ -216,13 +234,10 @@ 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; @@ -239,8 +254,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { 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) { @@ -265,17 +279,19 @@ 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); @@ -294,20 +310,22 @@ 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 + 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 passed + // 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 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(); @@ -329,7 +347,7 @@ 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 + // 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); @@ -338,10 +356,8 @@ 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 + 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())))) { @@ -355,8 +371,7 @@ 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() + getBaseMetaTileEntity().getWorld() .setBlock(tXCoord, tHeadY + 1, tZCoord, MINING_PIPE_TIP_BLOCK); } if (this.mInventory[0] == null) { @@ -407,8 +422,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } private boolean moveOneDown() { - if ((this.mInventory[0] == null) - || (this.mInventory[0].stackSize < 1) + if ((this.mInventory[0] == null) || (this.mInventory[0].stackSize < 1) || (!GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE))) { // No mining pipes if (debugBlockPump) { @@ -428,10 +442,8 @@ 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"); @@ -440,7 +452,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } // Try to set the block below us to a tip if (!GT_Utility.setBlockByFakePlayer( - getFakePlayer(getBaseMetaTileEntity()), x, yHead - 1, z, MINING_PIPE_TIP_BLOCK, 0, false)) { + 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"); } @@ -461,8 +479,7 @@ 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(), + int y = getBaseMetaTileEntity().getYCoord() - 1, x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord(); while (y > 0) { @@ -550,8 +567,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } } - private boolean queueFluid( - int aX, int aY, int aZ, ArrayDeque<ChunkPosition> fluidsFound, Set<ChunkPosition> checked) { + 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 @@ -598,13 +615,11 @@ 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) { @@ -615,8 +630,8 @@ 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 @@ -630,26 +645,24 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { 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) + } 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); - } - this.mFluid.amount += 1000; + if (!isWaterOrLava) { + // Only set Block to Air for non lava/water fluids + this.getBaseMetaTileEntity().getWorld().setBlockToAir(aX, aY, aZ); + } + this.mFluid.amount += 1000; - } else { - if (debugBlockPump) { - GT_Log.out.println("PUMP: Couldn't consume " + aBlock); - } - // We didn't do anything - return false; - } + } else { + if (debugBlockPump) { + GT_Log.out.println("PUMP: Couldn't consume " + aBlock); + } + // We didn't do anything + return false; + } getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.getEuUsagePerAction(), true); getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, Blocks.air, 0, 2); @@ -665,24 +678,29 @@ 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; } @@ -777,19 +795,11 @@ 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 @@ -799,12 +809,10 @@ 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; @@ -819,11 +827,14 @@ 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") - }; + 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") }; } @Override 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 57536d0e9d..6add532358 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 @@ -2,6 +2,12 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.HashMap; +import java.util.NoSuchElementException; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.Element; import gregtech.api.enums.ItemList; @@ -16,12 +22,9 @@ 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.HashMap; -import java.util.NoSuchElementException; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; 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; @@ -49,73 +52,49 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine "", 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } public static long cubicFluidMultiplier(long amount) { @@ -129,9 +108,7 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine 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); + 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)) { @@ -178,8 +155,8 @@ public class GT_MetaTileEntity_Replicator 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) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && ItemList.Cell_Empty.isStackEqual(aStack); } @@ -193,8 +170,7 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine public int getCapacity() { if ((sHeaviestElementMass == 0) && (GregTech_API.sPostloadFinished)) { sHeaviestElementMass = Materials.getMaterialsMap().values().stream() - .mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass())) - .max() + .mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass())).max() .orElseThrow(NoSuchElementException::new); // Make the Number nicer =) sHeaviestElementMass = 1000 * (sHeaviestElementMass / 1000 + 1); 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 6c0f6cb051..584164fa94 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 @@ -2,6 +2,9 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; @@ -12,10 +15,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachine { + public GT_MetaTileEntity_RockBreaker(int aID, String aName, String aNameRegional, int aTier) { super( aID, @@ -30,73 +32,49 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin "", 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -105,8 +83,8 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin } @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) && getRecipeList().containsInput(aStack); } @@ -130,12 +108,13 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin || (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); - } + 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))) { + getInputAt(0), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) { tOutput = new ItemStack(Blocks.obsidian, 1); if (canOutput(tOutput)) { getInputAt(0).stackSize -= 1; 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 7780e56eee..20b42e7bb4 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 @@ -4,6 +4,13 @@ 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 java.util.Objects; + +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IIndividual; import gregtech.GT_Mod; @@ -24,11 +31,6 @@ 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; public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { @@ -46,73 +48,49 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { "", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_SCANNER_ACTIVE_GLOW) - .glow() - .build()), + 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.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.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.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.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.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.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())); + 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -182,8 +160,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { return 2; } ItemData tData = GT_OreDictUnificator.getAssociation(aStack); - if ((tData != null) - && ((tData.mPrefix == OrePrefixes.dust) || (tData.mPrefix == OrePrefixes.cell)) + 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) @@ -230,8 +207,11 @@ 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 if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) @@ -240,56 +220,47 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { } if ((aStack.getItem().getUnlocalizedName().contains("Schematic") - || 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)) + 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 (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); + sTier = aStack.getUnlocalizedName().split("(?<=\\D)(?=\\d)")[1].substring(0, 1); else sTier = "1"; } @@ -298,8 +269,11 @@ 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 @@ -379,8 +353,8 @@ public class GT_MetaTileEntity_Scanner 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) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && getRecipeList().containsInput(aStack); } 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 ff54291188..4e8af7d283 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 @@ -2,6 +2,17 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -17,15 +28,6 @@ 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; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_BasicMachine { @@ -45,73 +47,49 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic "", 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); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -119,18 +97,14 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic if (aBaseMetaTileEntity.isServerSide()) { ItemStack aStack = aPlayer.getCurrentEquippedItem(); ItemData stackData = GT_OreDictUnificator.getItemData(aStack); - if (!ready - && (aStack != null) + 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 + || (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.getItemDamage() == ItemList.Block_Powderbarrel.get(1).getItemDamage() && aStack.stackSize >= 8))) { if ((!aPlayer.capabilities.isCreativeMode) && (aStack.stackSize != 111)) { if (aStack.getItem() == Item.getItemFromBlock(Blocks.tnt)) { @@ -140,89 +114,84 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic } 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; - } + && 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 + } 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(); - - 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) { - Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(f, -i, g); - if ((tBlock instanceof GT_Block_Ores_Abstract)) { - TileEntity tTileEntity = getBaseMetaTileEntity() - .getWorld() - .getTileEntity( + 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(); + + 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) { + 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); - 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 ((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); + } + } } } - } - } - } else { - int tMetaID = getBaseMetaTileEntity() - .getWorld() - .getBlockMetadata( + } 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"))) { - if (!tStringList.contains(tAssotiation.mMaterial.mMaterial.mDefaultLocalName)) { - tStringList.add(tAssotiation.mMaterial.mMaterial.mDefaultLocalName); + 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); + } + } } } } } + if (tStringList.size() < 1) { + tStringList.add("No Ores found."); + } + FluidStack tFluid = GT_UndergroundOil.undergroundOilReadInformation(getBaseMetaTileEntity()); + String[] tStringArray = new String[tStringList.size()]; + { + for (int i = 0; i < tStringArray.length; i++) { + 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); } - } - if (tStringList.size() < 1) { - tStringList.add("No Ores found."); - } - FluidStack tFluid = GT_UndergroundOil.undergroundOilReadInformation(getBaseMetaTileEntity()); - String[] tStringArray = new String[tStringList.size()]; - { - for (int i = 0; i < tStringArray.length; i++) { - 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); - } } return true; 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 0d09c59832..2b1f0fa349 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 @@ -9,28 +9,9 @@ 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 com.gtnewhorizons.modularui.api.drawable.IDrawable; -import com.gtnewhorizons.modularui.api.screen.ModularWindow; -import com.gtnewhorizons.modularui.api.screen.UIBuildContext; -import com.gtnewhorizons.modularui.common.widget.ButtonWidget; -import com.gtnewhorizons.modularui.common.widget.DrawableWidget; -import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; -import com.gtnewhorizons.modularui.common.widget.TextWidget; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.gui.modularui.GT_UITextures; -import gregtech.api.gui.modularui.GUITextureSet; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.modularui.IAddGregtechLogo; -import gregtech.api.interfaces.modularui.IAddUIWidgets; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Config; -import gregtech.api.util.GT_Utility; import java.util.List; import java.util.function.Consumer; + import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityHanging; @@ -60,6 +41,28 @@ import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; +import com.gtnewhorizons.modularui.api.drawable.IDrawable; +import com.gtnewhorizons.modularui.api.screen.ModularWindow; +import com.gtnewhorizons.modularui.api.screen.UIBuildContext; +import com.gtnewhorizons.modularui.common.widget.ButtonWidget; +import com.gtnewhorizons.modularui.common.widget.DrawableWidget; +import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; +import com.gtnewhorizons.modularui.common.widget.TextWidget; + +import gregtech.api.enums.ConfigCategories; +import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GUITextureSet; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.modularui.IAddGregtechLogo; +import gregtech.api.interfaces.modularui.IAddUIWidgets; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Config; +import gregtech.api.util.GT_Utility; + public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank implements IAddGregtechLogo, IAddUIWidgets { @@ -75,11 +78,14 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank // 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) { @@ -95,8 +101,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank if ((aEntity instanceof EntityFX)) { return -1.0F; } - } catch (Throwable e) { - } + } catch (Throwable e) {} if ((aEntity instanceof EntityFishHook)) { return -1.0F; } @@ -191,54 +196,30 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank @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) - }; - } - - @Override - 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], + 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[] { + 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[] { - 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 @@ -263,10 +244,10 @@ 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; } @@ -274,8 +255,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { if (getBaseMetaTileEntity().isServerSide()) { - if ((this.mTargetX == 0) - && (this.mTargetY == 0) + if ((this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == Integer.MIN_VALUE)) { this.mTargetX = aBaseMetaTileEntity.getXCoord(); @@ -288,36 +268,33 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank } // 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)) { - // if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == Blocks.dragon_egg) { - // return true; - // } - // } - // } - // } - // return false; + // 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) == Blocks.dragon_egg) { + // return true; + // } + // } + // } + // } + // return false; // } public boolean hasDimensionalTeleportCapability() { - return this.mDebug - || - // ( + return this.mDebug || + // ( sInterDimensionalTeleportAllowed // && - // ( - // this.hasEgg || - // mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000 - // ) + // ( + // 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 @@ -329,18 +306,17 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank super.onPostTick(aBaseMetaTileEntity, aTick); if (getBaseMetaTileEntity().isServerSide()) { // if (getBaseMetaTileEntity().getTimer() % 100L == 50L) { - // this.hasEgg = checkForEgg(); + // 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) { - // mFluid.amount--; - // if (mFluid.amount < 1) { - // mFluid = null; - // } + // mFluid.amount--; + // if (mFluid.amount < 1) { + // mFluid = null; + // } // } int tDistance = distanceCalculation(); if (mInventory[0] != null) { @@ -356,13 +332,20 @@ 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, + 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 + (long) (Math.pow(tDistance, 1.5) * tDistance * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize)) * sFPowerMultiplyer), @@ -370,66 +353,32 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank } } } - 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)) { + // 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) * + // mFluid.amount = mFluid.amount - ((int) Math.min(10, (Math.pow(tDistance, 1.5) * // weightCalculation(tEntity) / 8192))); - // if (mFluid.amount < 1) { - // mFluid = null; - // } + // if (mFluid.amount < 1) { + // mFluid = null; + // } // } if (tEntity.ridingEntity != null) { tEntity.mountEntity(null); @@ -446,14 +395,15 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank 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); + this.mTargetX + 0.5D, + this.mTargetY + 0.5D, + this.mTargetZ + 0.5D); } } } @@ -470,11 +420,14 @@ 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)))); + && (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 @@ -614,27 +567,26 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setSize(90, 72) - .setPos(43, 4)) - .widget(TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(46, 8)) - .widget(TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(46, 16)) - .widget(TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(46, 24)) - .widget(TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(46, 32)) - .widget(TextWidget.dynamicString( - () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> hasDimensionalTeleportCapability()) - .setPos(46, 40)) + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 72).setPos(43, 4)) + .widget( + TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 8)) + .widget( + TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 16)) + .widget( + TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 24)) + .widget( + TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 32)) + .widget( + TextWidget + .dynamicString( + () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No")) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> hasDimensionalTeleportCapability()).setPos(46, 40)) .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val)); addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7); @@ -643,33 +595,38 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, 512, 64, 151); addChangeNumberButton( - builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, val -> mTargetD += val, -16, -8, 7, 58); + builder, + GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, + val -> mTargetD += val, + -16, + -8, + 7, + 58); addChangeNumberButton( - builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, val -> mTargetD += val, -4, -1, 25, 58); + builder, + GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, + val -> mTargetD += val, + -4, + -1, + 25, + 58); addChangeNumberButton(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_SMALL, val -> mTargetD += val, 4, 1, 133, 58); addChangeNumberButton(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, val -> mTargetD += val, 16, 8, 151, 58); } - private void addChangeNumberButtons( - ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, int addNumber, int xPos) { + private void addChangeNumberButtons(ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, + int addNumber, int xPos) { addChangeNumberButton(builder, overlay, val -> mTargetX += val, addNumberShift, addNumber, xPos, 4); addChangeNumberButton(builder, overlay, val -> mTargetY += val, addNumberShift, addNumber, xPos, 22); addChangeNumberButton(builder, overlay, val -> mTargetZ += val, addNumberShift, addNumber, xPos, 40); } - private void addChangeNumberButton( - ModularWindow.Builder builder, - IDrawable overlay, - Consumer<Integer> setter, - int addNumberShift, - int addNumber, - int xPos, - int yPos) { - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber)) - .setBackground(GT_UITextures.BUTTON_STANDARD, overlay) - .setSize(18, 18) - .setPos(xPos, yPos)); + private void addChangeNumberButton(ModularWindow.Builder builder, IDrawable overlay, Consumer<Integer> setter, + int addNumberShift, int addNumber, int xPos, int yPos) { + builder.widget( + new ButtonWidget() + .setOnClick((clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber)) + .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18).setPos(xPos, yPos)); } @Override @@ -679,9 +636,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank @Override public void addGregTechLogo(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(113, 56)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 56)); } } 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 f6bc532469..cae467c4a0 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 @@ -6,18 +6,16 @@ * * This file is part of GregTech. * - * GregTech is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * GregTech is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later + * version. * - * GregTech is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. + * GregTech is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. * - * You should have received a copy of the GNU Lesser General Public License - * along with GregTech. If not, see <http://www.gnu.org/licenses/>. + * 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; @@ -28,14 +26,6 @@ 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; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -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; @@ -43,8 +33,10 @@ 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; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -55,7 +47,17 @@ import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +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; + public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_MetaTileEntity_BasicHull_NonElectric { + public static int minimalDistancePoints = 64; protected GT_MetaTileEntity_LongDistancePipelineBase mTarget = null; // these two are updated by machine block update thread, so must be volatile @@ -63,13 +65,13 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta protected volatile 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); } @@ -89,7 +91,9 @@ 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")); + aNBT.getInteger("target.x"), + aNBT.getInteger("target.y"), + aNBT.getInteger("target.z")); if (getDistanceToSelf(mTargetPos) < minimalDistancePoints) mTargetPos = null; } } @@ -125,15 +129,15 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta // We don't have a target position, scan the pipes scanPipes(); } else if (mTarget == null || mTarget.isDead()) { - // We don't have a target, or it's dead. Try checking the target position + // We don't have a target, or it's dead. Try checking the target position mTarget = null; if (world.blockExists(mTargetPos.posX, mTargetPos.posY, mTargetPos.posZ)) { // 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) + && ((tMeta = ((BaseMetaTileEntity) te) + .getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase) && isSameClass((GT_MetaTileEntity_LongDistancePipelineBase) tMeta)) { // It's the right type! mTarget = (GT_MetaTileEntity_LongDistancePipelineBase) tMeta; @@ -147,8 +151,7 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta if (mTooCloseSender != null && (mTooCloseSender.isDead() || mTooCloseSender.mTarget != null)) mTooCloseSender = null; if (mTarget == null || mTarget == this) return false; - if (mTarget.mSender == null - || mTarget.mSender.isDead() + if (mTarget.mSender == null || mTarget.mSender.isDead() || mTarget.mSender.mTarget == null || mTarget.mSender.mTarget.isDead()) { mTarget.mSender = this; @@ -159,17 +162,23 @@ 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; @@ -201,8 +210,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta HashSet<ChunkCoordinates> tVisited = new HashSet<>(Collections.singletonList(getCoords())), tWires = new HashSet<>(); - Queue<ChunkCoordinates> tQueue = - new LinkedList<>(Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); + Queue<ChunkCoordinates> tQueue = new LinkedList<>( + Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); while (!tQueue.isEmpty()) { final ChunkCoordinates aCoords = tQueue.poll(); @@ -231,15 +240,13 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta } 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( + 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 @@ -276,7 +283,9 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta 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() { @@ -302,8 +311,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta } @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(); @@ -326,8 +335,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta } @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 849ce40101..ce020560cb 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 @@ -6,18 +6,16 @@ * * This file is part of GregTech. * - * GregTech is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * GregTech is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later + * version. * - * GregTech is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. + * GregTech is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. * - * You should have received a copy of the GNU Lesser General Public License - * along with GregTech. If not, see <http://www.gnu.org/licenses/>. + * 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; @@ -27,26 +25,28 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_FRON 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; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Utility; + public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEntity_LongDistancePipelineBase { - static final FluidTankInfo[] emptyTank = {new FluidTankInfo(null, Integer.MAX_VALUE)}; + + static final FluidTankInfo[] emptyTank = { new FluidTankInfo(null, Integer.MAX_VALUE) }; public GT_MetaTileEntity_LongDistancePipelineFluid(int aID, String aName, String aNameRegional, int aTier) { 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); } @@ -109,29 +109,14 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti } @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], 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) - }; - else - return new ITexture[] { - MACHINE_CASINGS[mTier][aColorIndex + 1], + 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) }; + else if (aSide == GT_Utility.getOppositeSide(aFacing)) 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() - }; + 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 0559290df6..d62e87c707 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 @@ -6,18 +6,16 @@ * * This file is part of GregTech. * - * GregTech is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * GregTech is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later + * version. * - * GregTech is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. + * GregTech is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. * - * You should have received a copy of the GNU Lesser General Public License - * along with GregTech. If not, see <http://www.gnu.org/licenses/>. + * 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; @@ -27,24 +25,26 @@ 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 net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; 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); } @@ -145,7 +145,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit return false; } - // // Relay Sided Inventories + // // Relay Sided Inventories // @Override @@ -188,29 +188,14 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } @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], 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) - }; - else - return new ITexture[] { - MACHINE_CASINGS[mTier][aColorIndex + 1], + 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) }; + else if (aSide == GT_Utility.getOppositeSide(aFacing)) 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() - }; + 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 3dde1feb83..51c7c2eb13 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 @@ -1,9 +1,10 @@ package gregtech.common.tileentities.machines.multi; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.HeatingCoilLevel; 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> { 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 e5b7110659..6f09aa6ede 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 @@ -10,10 +10,19 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -34,84 +43,66 @@ import gregtech.api.util.*; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; 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.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -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("IC2", "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true), - // warded glass - ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false))) - .addElement( - 'e', - ofChain( - Energy.newAny(16, 1, ForgeDirection.UP, ForgeDirection.NORTH, ForgeDirection.SOUTH), - ofBlock(GregTech_API.sBlockCasings2, 0))) - .addElement( - 'd', - buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class) - .atLeast(DataHatchElement.DataAccess) - .dot(2) - .casingIndex(42) - .allowOnly(ForgeDirection.NORTH) - .buildAndChain(GregTech_API.sBlockCasings3, 10)) - .addElement( - 'b', - buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class) - .atLeast(InputHatch, InputHatch, InputHatch, InputHatch, Maintenance) - .casingIndex(16) - .dot(3) - .allowOnly(ForgeDirection.DOWN) - .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, ForgeDirection.DOWN), + 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("IC2", "blockAlloyGlass", 0, true), + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true), + // warded glass + ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false))) + .addElement( + 'e', + ofChain( + Energy.newAny(16, 1, ForgeDirection.UP, ForgeDirection.NORTH, ForgeDirection.SOUTH), + ofBlock(GregTech_API.sBlockCasings2, 0))) + .addElement( + 'd', + buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class).atLeast(DataHatchElement.DataAccess).dot(2) + .casingIndex(42).allowOnly(ForgeDirection.NORTH) + .buildAndChain(GregTech_API.sBlockCasings3, 10)) + .addElement( + 'b', + buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class) + .atLeast(InputHatch, InputHatch, InputHatch, InputHatch, Maintenance).casingIndex(16).dot(3) + .allowOnly(ForgeDirection.DOWN).buildAndChain( + ofBlock(GregTech_API.sBlockCasings2, 0), ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4))) - .addElement('i', InputBus.newAny(16, 5, ForgeDirection.DOWN)) - .addElement('o', OutputBus.newAny(16, 4, ForgeDirection.DOWN)) - .build(); + .addElement( + 'I', + ofChain( + // all blocks nearby use solid steel casing, so let's use the texture of that + InputBus.newAny(16, 5, ForgeDirection.DOWN), + ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4))) + .addElement('i', InputBus.newAny(16, 5, ForgeDirection.DOWN)) + .addElement('o', OutputBus.newAny(16, 4, ForgeDirection.DOWN)).build(); public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -129,12 +120,9 @@ public class GT_MetaTileEntity_AssemblyLine @Override 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) // ? + 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") @@ -143,10 +131,8 @@ public class GT_MetaTileEntity_AssemblyLine .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) + .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) @@ -155,41 +141,18 @@ public class GT_MetaTileEntity_AssemblyLine } @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_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() - }; + if (aActive) 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[] { BlockIcons.casingTexturePages[0][16], + 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 @@ -220,10 +183,9 @@ public class GT_MetaTileEntity_AssemblyLine int[] tFluidSlot = null; boolean foundRecipe = false; - nextDataStick: - for (ItemStack tDataStick : tDataStickList) { - GT_AssemblyLineUtils.LookupResult tLookupResult = - GT_AssemblyLineUtils.findAssemblyLineRecipeFromDataStick(tDataStick, false); + nextDataStick: for (ItemStack tDataStick : tDataStickList) { + GT_AssemblyLineUtils.LookupResult tLookupResult = GT_AssemblyLineUtils + .findAssemblyLineRecipeFromDataStick(tDataStick, false); if (tLookupResult.getType() == GT_AssemblyLineUtils.LookupResultType.INVALID_STICK) continue; @@ -281,8 +243,8 @@ public class GT_MetaTileEntity_AssemblyLine continue nextDataStick; } else { 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); if (!tMultiHatch.hasFluid(tRecipe.mFluidInputs[i]) || tMultiHatch.getFluidAmount(tRecipe.mFluidInputs[i]) < tRecipe.mFluidInputs[i].amount) { @@ -318,7 +280,7 @@ public class GT_MetaTileEntity_AssemblyLine if (GT_Values.D1) { GT_FML_LOGGER.info("Find available recipe"); } - mOutputItems = new ItemStack[] {tRecipe.mOutput}; + mOutputItems = new ItemStack[] { tRecipe.mOutput }; foundRecipe = true; break; } @@ -338,8 +300,8 @@ public class GT_MetaTileEntity_AssemblyLine 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]); @@ -494,6 +456,7 @@ public class GT_MetaTileEntity_AssemblyLine } private enum DataHatchElement implements IHatchElement<GT_MetaTileEntity_AssemblyLine> { + DataAccess; @Override 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 7536735634..5babf4405d 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 @@ -1,5 +1,10 @@ package gregtech.common.tileentities.machines.multi; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + +import org.lwjgl.input.Keyboard; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.SteamVariant; @@ -11,23 +16,16 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import org.lwjgl.input.Keyboard; 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_SIDE = { TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS) }; private static final ITexture[] FACING_FRONT = { - TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE) - }; + 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() }; private GT_Multiblock_Tooltip_Builder tooltipBuilder; public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) { @@ -59,32 +57,22 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri protected GT_Multiblock_Tooltip_Builder getTooltip() { if (tooltipBuilder == null) { tooltipBuilder = new GT_Multiblock_Tooltip_Builder(); - tooltipBuilder - .addMachineType("Blast Furnace") - .addInfo("Controller Block for the Bricked Blast Furnace") + tooltipBuilder.addMachineType("Blast Furnace").addInfo("Controller Block for the Bricked Blast Furnace") .addInfo("Usable for Steel and general Pyrometallurgy") .addInfo("Has a useful interface, unlike other gregtech multis") - .addPollutionAmount(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond) - .addSeparator() - .beginStructureBlock(3, 4, 3, true) - .addController("Front center") + .addPollutionAmount(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond).addSeparator() + .beginStructureBlock(3, 4, 3, true).addController("Front center") .addOtherStructurePart("Firebricks", "Everything except the controller") .addStructureInfo("The top block is also empty") .addStructureInfo("You can share the walls of GT multis, so") - .addStructureInfo("each additional one costs less, up to 4") - .toolTipFinisher("Gregtech"); + .addStructureInfo("each additional one costs less, up to 4").toolTipFinisher("Gregtech"); } return tooltipBuilder; } @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_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 734d11e4c8..8c22ab780f 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 @@ -5,25 +5,22 @@ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.SteamVariant; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; 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() - }; + + 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() }; public GT_MetaTileEntity_BronzeBlastFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -35,17 +32,12 @@ 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 8a2f969b18..4f1aec7f4a 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 @@ -7,6 +7,16 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.ChunkPosition; +import net.minecraftforge.oredict.OreDictionary; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; @@ -21,14 +31,6 @@ 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; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.world.ChunkPosition; -import net.minecraftforge.oredict.OreDictionary; public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMultiBlockBase implements ISecondaryDescribable { @@ -110,15 +112,13 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul 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); + getBaseMetaTileEntity().getWorld().setBlock( + getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX, + getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY, + getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ, + GregTech_API.sBlockReinforced, + 4, + 3); } running = false; return false; @@ -134,13 +134,12 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul 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)) + 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; @@ -151,7 +150,8 @@ 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; + && (!aList2.contains(new ChunkPosition(aX + 1, aY, aZ)))) + expandToChunkXPos = true; } else if (!(blockXPos == Blocks.dirt || blockXPos == Blocks.grass)) { return false; } @@ -159,7 +159,8 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul 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; + && (!aList2.contains(new ChunkPosition(aX - 1, aY, aZ)))) + expandToChunkXNeg = true; } else if (!(blockXNeg == Blocks.dirt || blockXNeg == Blocks.grass)) { return false; } @@ -167,17 +168,18 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul 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 + && (!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; - } + 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; + && (!aList2.contains(new ChunkPosition(aX, aY - 1, aZ)))) + expandToChunkYNeg = true; } else if (blockYNeg != Blocks.brick_block) { return false; } @@ -185,7 +187,8 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul 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; + && (!aList2.contains(new ChunkPosition(aX, aY, aZ + 1)))) + expandToChunkZPos = true; } else if (!(blockZPos == Blocks.dirt || blockZPos == Blocks.grass)) { return false; } @@ -193,7 +196,8 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul 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; + && (!aList2.contains(new ChunkPosition(aX, aY, aZ - 1)))) + expandToChunkZNeg = true; } else if (!(blockZNeg == Blocks.dirt || blockZNeg == Blocks.grass)) { return false; } @@ -250,50 +254,29 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Charcoal Pile Igniter") - .addInfo("Controller for the Charcoal Pit") - .addInfo("Converts Logs into Brittle Charcoal blocks") - .addInfo("Will automatically start when valid") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() + tt.addMachineType("Charcoal Pile Igniter").addInfo("Controller for the Charcoal Pit") + .addInfo("Converts Logs into Brittle Charcoal blocks").addInfo("Will automatically start when valid") + .addPollutionAmount(getPollutionPerSecond(null)).addSeparator() .beginVariableStructureBlock(3, 11, 3, 6, 3, 11, false) .addStructureInfo("Can be up to 11x6x11 in size, shape doesn't matter") .addOtherStructurePart("Bricks", "Bottom layer, under all wood logs") .addOtherStructurePart("Dirt/Grass", "All logs must be covered by these, the controller, or bricks") .addOtherStructurePart("Wood Logs", "Inside the previously mentioned blocks") - .addStructureInfo("No air between logs allowed") - .toolTipFinisher("Gregtech"); + .addStructureInfo("No air between logs allowed").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 == 1) { 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(), - }; + 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(), }; } - return new ITexture[] {casingTexturePages[0][10]}; + return new ITexture[] { casingTexturePages[0][10] }; } @Override @@ -308,15 +291,13 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul super.onPostTick(aBaseMetaTileEntity, aTimer); if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { - new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setMotion(0D, 0.3D, 0D) + new WorldSpawnedEventBuilder.ParticleEventBuilder().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()) - .setWorld(getBaseMetaTileEntity().getWorld()) - .run(); + .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 5e6651cdad..aa082afee0 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 @@ -4,8 +4,20 @@ import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; import static gregtech.api.enums.GT_Values.debugCleanroom; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.config.ConfigCategory; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.util.ForgeDirection; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.ISecondaryDescribable; @@ -19,18 +31,10 @@ 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.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.config.ConfigCategory; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.common.util.ForgeDirection; 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) { @@ -49,22 +53,17 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB @Override 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") + 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") + .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(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 @@ -72,14 +71,13 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB .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"); + .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 @@ -195,17 +193,17 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { mPlascreteCount++; } else { - final IGregTechTileEntity tTileEntity = - aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + final 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++; @@ -222,8 +220,9 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB mHullCount++; } 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; } @@ -236,9 +235,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB if (config.containsKey(key)) { otherBlocks.compute(key, (k, v) -> v == null ? 1 : v + 1); } else { - if (debugCleanroom) - GT_Log.out.println("Cleanroom: not allowed block " - + tBlock.getUnlocalizedName()); + if (debugCleanroom) GT_Log.out.println( + "Cleanroom: not allowed block " + tBlock.getUnlocalizedName()); return false; } } @@ -250,8 +248,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } } } - if (this.mMaintenanceHatches.size() != 1 - || this.mEnergyHatches.size() != 1 + if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount > 4 || mHullCount > 10) { return false; @@ -289,26 +286,25 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB private void setCallbacks(int x, int y, int z, IGregTechTileEntity aBaseMetaTileEntity) { for (int dX = -x + 1; dX <= x - 1; dX++) - for (int dZ = -z + 1; dZ <= z - 1; dZ++) - for (int dY = -1; dY >= y + 1; dY--) { - TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityOffset(dX, dY, dZ); + for (int dZ = -z + 1; dZ <= z - 1; dZ++) for (int dY = -1; dY >= y + 1; dY--) { + TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityOffset(dX, dY, dZ); - if (tTileEntity instanceof IGregTechTileEntity) { - IMetaTileEntity iMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); + if (tTileEntity instanceof IGregTechTileEntity) { + IMetaTileEntity iMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); - if (iMetaTileEntity instanceof IMachineCallback<?>) - checkAndSetCallback((IMachineCallback<?>) iMetaTileEntity); + if (iMetaTileEntity instanceof IMachineCallback<?>) + checkAndSetCallback((IMachineCallback<?>) iMetaTileEntity); - } else if (tTileEntity instanceof IMachineCallback<?>) - checkAndSetCallback((IMachineCallback<?>) tTileEntity); - } + } else if (tTileEntity instanceof IMachineCallback<?>) + checkAndSetCallback((IMachineCallback<?>) tTileEntity); + } } @SuppressWarnings("unchecked") private void checkAndSetCallback(IMachineCallback<?> iMachineCallback) { - if (debugCleanroom) - GT_Log.out.println("Cleanroom: IMachineCallback detected, checking for cleanroom: " - + (iMachineCallback.getType() == this.getClass())); + if (debugCleanroom) 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); } @@ -319,32 +315,18 @@ 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 @@ -381,21 +363,20 @@ 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); + } + } } private static class ConfigEntry { + int percentage; int allowedCount; int meta; @@ -434,20 +415,14 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB for (ConfigCategory cc : cfg.getCategory(category).getChildren()) { final 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())); + 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")) { - if (cc.containsKey("Meta")) - config.put( - name + ":" + cc.get("Meta").getInt(), - new ConfigEntry( - cc.get("Percentage").getInt(), - 0, - cc.get("Meta").getInt())); + 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)); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller1.java index af1468396b..e61cfc0feb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller1.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller1.java @@ -7,6 +7,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; public class GT_MetaTileEntity_ConcreteBackfiller1 extends GT_MetaTileEntity_ConcreteBackfillerBase { + public GT_MetaTileEntity_ConcreteBackfiller1(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java index 05646676e7..c175d73cb1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java @@ -7,6 +7,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; public class GT_MetaTileEntity_ConcreteBackfiller2 extends GT_MetaTileEntity_ConcreteBackfillerBase { + public GT_MetaTileEntity_ConcreteBackfiller2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } 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 de477af9e4..dd2f54455a 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 @@ -3,15 +3,18 @@ package gregtech.common.tileentities.machines.multi; import static gregtech.api.enums.GT_HatchElement.*; import static gregtech.api.enums.GT_Values.VN; +import java.util.List; + +import net.minecraft.item.ItemStack; + import com.google.common.collect.ImmutableList; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; -import java.util.List; -import net.minecraft.item.ItemStack; public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTileEntity_DrillerBase { @@ -29,24 +32,18 @@ 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) + 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") + .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) + .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"); + .addOutputBus("Mining Pipes, optional, any base casing", 1).toolTipFinisher("Gregtech"); return tt; } @@ -73,8 +70,8 @@ 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) { + 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) { @@ -107,9 +104,11 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi 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; + || 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; } 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 d6fd5deca4..83ffdd014f 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 @@ -14,10 +14,20 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; @@ -31,46 +41,34 @@ 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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidStack; -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; @@ -87,67 +85,37 @@ public class GT_MetaTileEntity_DieselEngine @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Combustion Generator") - .addInfo("Controller block for the Large Combustion Engine") + tt.addMachineType("Combustion Generator").addInfo("Controller block for the Large Combustion Engine") .addInfo("Supply Diesel Fuels and 1000L of Lubricant per hour to run") .addInfo("Supply 40L/s of Oxygen to boost output (optional)") .addInfo("Default: Produces 2048EU/t at 100% fuel efficiency") .addInfo("Boosted: Produces 6144EU/t at 150% fuel efficiency") .addInfo("You need to wait for it to reach 300% to output full power") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 4, false) - .addController("Front center") - .addCasingInfo("Stable Titanium Machine Casing", 16) + .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false) + .addController("Front center").addCasingInfo("Stable Titanium Machine Casing", 16) .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks") .addOtherStructurePart("Engine Intake Machine Casing", "8x, ring around controller") .addStructureInfo("Engine Intake Casings must not be obstructed in front (only air blocks)") - .addDynamoHatch("Back center", 2) - .addMaintenanceHatch("One of the casings next to a Gear Box", 1) + .addDynamoHatch("Back center", 2).addMaintenanceHatch("One of the casings next to a Gear Box", 1) .addMufflerHatch("Top middle back, above the rear Gear Box", 1) - .addInputHatch("Diesel Fuel, next to a Gear Box", 1) - .addInputHatch("Lubricant, next to a Gear Box", 1) - .addInputHatch("Oxygen, optional, next to a Gear Box", 1) - .toolTipFinisher("Gregtech"); + .addInputHatch("Diesel Fuel, next to a Gear Box", 1).addInputHatch("Lubricant, next to a Gear Box", 1) + .addInputHatch("Oxygen, optional, next to a Gear Box", 1).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[] { - 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[] { - casingTexturePages[0][50], - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_DIESEL_ENGINE) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW) - .extFacing() - .glow() - .build() - }; + 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[] { 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 @@ -161,8 +129,7 @@ public class GT_MetaTileEntity_DieselEngine } /** - * The nominal energy output - * This can be further multiplied by {@link #getMaxEfficiency(ItemStack)} when boosted + * The nominal energy output This can be further multiplied by {@link #getMaxEfficiency(ItemStack)} when boosted */ protected int getNominalOutput() { return 2048; @@ -173,9 +140,8 @@ public class GT_MetaTileEntity_DieselEngine } /** - * x times fuel will be consumed when boosted - * This will however NOT increase power output - * Go tweak {@link #getMaxEfficiency(ItemStack)} and {@link #getNominalOutput()} instead + * x times fuel will be consumed when boosted This will however NOT increase power output Go tweak + * {@link #getMaxEfficiency(ItemStack)} and {@link #getNominalOutput()} instead */ protected int getBoostFactor() { return 2; @@ -243,8 +209,7 @@ public class GT_MetaTileEntity_DieselEngine @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 1) - && !mMufflerHatches.isEmpty() + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 1) && !mMufflerHatches.isEmpty() && mMaintenanceHatches.size() == 1; } @@ -336,32 +301,51 @@ public class GT_MetaTileEntity_DieselEngine } } - 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 + + " %" }; } @Override 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 275c1c43a5..c6c98912e0 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 @@ -13,11 +13,19 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_ import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.enums.Textures.BlockIcons; @@ -31,15 +39,11 @@ 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.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; 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"; @@ -48,42 +52,29 @@ public class GT_MetaTileEntity_DistillationTower private static final IStructureDefinition<GT_MetaTileEntity_DistillationTower> STRUCTURE_DEFINITION; static { - IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch.withCount( - GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount) + 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"}, - })) + .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(), + .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) - .disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN) - .build(), + buildHatchAdder(GT_MetaTileEntity_DistillationTower.class).atLeast(layeredOutputHatch) + .casingIndex(CASING_INDEX).dot(2) + .disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN).build(), ofHatchAdder( GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList, CASING_INDEX, @@ -99,11 +90,8 @@ public class GT_MetaTileEntity_DistillationTower // hint element only used in top layer .addElement( 'L', - buildHatchAdder(GT_MetaTileEntity_DistillationTower.class) - .atLeast(layeredOutputHatch) - .casingIndex(CASING_INDEX) - .dot(2) - .disallowOnly(ForgeDirection.UP) + buildHatchAdder(GT_MetaTileEntity_DistillationTower.class).atLeast(layeredOutputHatch) + .casingIndex(CASING_INDEX).dot(2).disallowOnly(ForgeDirection.UP) .buildAndChain(GregTech_API.sBlockCasings4, 1)) .addElement( 'c', @@ -146,59 +134,32 @@ public class GT_MetaTileEntity_DistillationTower @Override 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") + 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") + .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) + .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[] { - 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[] { - BlockIcons.getCasingTextureForId(CASING_INDEX), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW) - .extFacing() - .glow() - .build() - }; + if (aActive) 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[] { BlockIcons.getCasingTextureForId(CASING_INDEX), + 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 @@ -256,7 +217,7 @@ public class GT_MetaTileEntity_DistillationTower getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], - new FluidStack[] {tFluid}, + new FluidStack[] { tFluid }, inputs); if (tRecipe != null) { if (tRecipe.isRecipeInputEqual(true, tFluids, inputs)) { @@ -269,7 +230,7 @@ public class GT_MetaTileEntity_DistillationTower 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; @@ -291,15 +252,14 @@ public class GT_MetaTileEntity_DistillationTower } protected int getCurrentLayerOutputHatchCount() { - return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0 - ? 0 + return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0 ? 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; + 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); @@ -333,8 +293,7 @@ public class GT_MetaTileEntity_DistillationTower 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) { @@ -394,11 +353,27 @@ public class GT_MetaTileEntity_DistillationTower for (int i = 1; i < tTotalHeight - 1; i++) { mHeight = i; built = survivialBuildPiece( - STRUCTURE_PIECE_LAYER_HINT, stackSize, 1, i, 0, elementBudget, env, false, true); + STRUCTURE_PIECE_LAYER_HINT, + stackSize, + 1, + i, + 0, + elementBudget, + env, + false, + true); if (built >= 0) return built; } mHeight = tTotalHeight - 1; return survivialBuildPiece( - STRUCTURE_PIECE_TOP_HINT, stackSize, 1, tTotalHeight - 1, 0, elementBudget, env, false, true); + STRUCTURE_PIECE_TOP_HINT, + stackSize, + 1, + tTotalHeight - 1, + 0, + elementBudget, + env, + 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 ba5c28b3a4..55ccfd6230 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 @@ -13,12 +13,27 @@ 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 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.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.common.util.ForgeDirection; + import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -33,58 +48,46 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; 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.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.common.util.ForgeDirection; 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()) - .adder(GT_MetaTileEntity_DrillerBase::addToMachineList) - .casingIndex(t.casingTextureIndex) - .dot(1) - .buildAndChain( + 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()))) - .build(); - } - }; + .addElement( + 'b', + lazy( + t -> buildHatchAdder(GT_MetaTileEntity_DrillerBase.class) + .atLeastList(t.getAllowedHatches()) + .adder(GT_MetaTileEntity_DrillerBase::addToMachineList) + .casingIndex(t.casingTextureIndex).dot(1).buildAndChain( + t.getCasingBlockItem().getBlock(), + t.getCasingBlockItem().get(0).getItemDamage()))) + .build(); + } + }; private Block casingBlock; private int casingMeta; @@ -133,41 +136,17 @@ public abstract class GT_MetaTileEntity_DrillerBase } @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_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() - }; + 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() }; } - return new ITexture[] {getCasingTextureForId(casingTextureIndex)}; + return new ITexture[] { getCasingTextureForId(casingTextureIndex) }; } @Override @@ -190,20 +169,20 @@ public abstract class GT_MetaTileEntity_DrillerBase workState = aNBT.getBoolean("isPickingPipes") ? STATE_UPWARD : STATE_DOWNWARD; 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") + mChunkLoadingEnabled ? GT_Utility.trans("502", "Mining chunk loading enabled") : GT_Utility.trans("503", "Mining chunk loading disabled")); return true; } @@ -219,8 +198,7 @@ public abstract class GT_MetaTileEntity_DrillerBase @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide() - && mCurrentChunk != null + if (aBaseMetaTileEntity.isServerSide() && mCurrentChunk != null && !mWorkChunkNeedsReload && !aBaseMetaTileEntity.isAllowedToWork()) { // if machine has stopped, stop chunkloading @@ -242,6 +220,7 @@ public abstract class GT_MetaTileEntity_DrillerBase /** * Added for compability reasons + * * @return true if the state is 0 false otherwise. * @deprecated compatibility reason */ @@ -270,19 +249,18 @@ public abstract class GT_MetaTileEntity_DrillerBase } 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 (b != miningPipeBlock && b != miningPipeTipBlock) - getBaseMetaTileEntity().decrStackSize(1, 1); + if (b != miningPipeBlock && b != miningPipeTipBlock) getBaseMetaTileEntity().decrStackSize(1, 1); } return 0; @@ -315,7 +293,7 @@ public abstract class GT_MetaTileEntity_DrillerBase private boolean tryOutputPipe() { if (!getBaseMetaTileEntity().addStackToSlot(1, GT_Utility.copyAmount(1, miningPipe))) - mOutputItems = new ItemStack[] {GT_Utility.copyAmount(1, miningPipe)}; + mOutputItems = new ItemStack[] { GT_Utility.copyAmount(1, miningPipe) }; return true; } @@ -361,8 +339,8 @@ public abstract class GT_MetaTileEntity_DrillerBase 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; @@ -378,8 +356,8 @@ public abstract class GT_MetaTileEntity_DrillerBase } } - 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; @@ -390,8 +368,8 @@ public abstract class GT_MetaTileEntity_DrillerBase } } - 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 { @@ -436,8 +414,7 @@ public abstract class GT_MetaTileEntity_DrillerBase @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { updateCoordinates(); - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 6, 0) - && checkHatches() + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 6, 0) && checkHatches() && GT_Utility.getTier(getMaxInputVoltage()) >= getMinTier() && mMaintenanceHatches.size() == 1; } @@ -465,6 +442,7 @@ public abstract class GT_MetaTileEntity_DrillerBase 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) @Deprecated @@ -612,6 +590,7 @@ public abstract class GT_MetaTileEntity_DrillerBase } protected enum DataHatchElement implements IHatchElement<GT_MetaTileEntity_DrillerBase> { + DataAccess; @Override 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 15f04c5fda..37a9b924e8 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 @@ -8,10 +8,20 @@ import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofCoil; +import java.util.ArrayList; + +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 net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.HeatingCoilLevel; @@ -24,59 +34,44 @@ 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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidStack; 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); @@ -94,69 +89,39 @@ public class GT_MetaTileEntity_ElectricBlastFurnace @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Blast Furnace") - .addInfo("Controller block for the Electric Blast Furnace") + tt.addMachineType("Blast Furnace").addInfo("Controller block for the Electric Blast Furnace") .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("Additionally gives +100K for every tier past MV") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 4, 3, true) - .addController("Front bottom") - .addCasingInfo("Heat Proof Machine Casing", 0) + .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 4, 3, true) + .addController("Front bottom").addCasingInfo("Heat Proof Machine Casing", 0) .addOtherStructurePart("Heating Coils", "Two middle Layers") - .addEnergyHatch("Any bottom layer casing", 3) - .addMaintenanceHatch("Any bottom layer casing", 3) - .addMufflerHatch("Top middle", 2) - .addInputBus("Any bottom layer casing", 3) - .addInputHatch("Any bottom layer casing", 3) - .addOutputBus("Any bottom layer casing", 3) + .addEnergyHatch("Any bottom layer casing", 3).addMaintenanceHatch("Any bottom layer casing", 3) + .addMufflerHatch("Top middle", 2).addInputBus("Any bottom layer casing", 3) + .addInputHatch("Any bottom layer casing", 3).addOutputBus("Any bottom layer casing", 3) .addOutputHatch("Liquid form of fluids, Any bottom layer casing") .addOutputHatch("Gas form of fluids, Any top layer casing", 1) - .addStructureInfo("Recovery amount scales with Muffler Hatch tier") - .toolTipFinisher("Gregtech"); + .addStructureInfo("Recovery amount scales with Muffler Hatch tier").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[] { - 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[] { - 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() - }; + 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[] { 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 @@ -211,8 +176,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace 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); + 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; @@ -230,16 +195,17 @@ public class GT_MetaTileEntity_ElectricBlastFurnace } 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 + 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; } + /** * Calcualtes overclocked ness using long integers * @@ -272,9 +238,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace 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 + 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) { @@ -362,31 +327,60 @@ public class GT_MetaTileEntity_ElectricBlastFurnace } 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 + " %" - }; + 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 @@ -404,7 +398,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace 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); + 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 407e661c57..66951a889d 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 @@ -6,6 +6,11 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESE import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; @@ -18,10 +23,6 @@ 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 net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_DieselEngine { @@ -36,28 +37,21 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Combustion Generator") - .addInfo("Controller block for the Extreme Combustion Engine") + tt.addMachineType("Combustion Generator").addInfo("Controller block for the Extreme Combustion Engine") .addInfo("Supply high rating fuel and 8000L of Lubricant per hour to run") .addInfo("Supply 40L/s of Liquid Oxygen to boost output (optional)") .addInfo("Default: Produces 10900EU/t at 100% fuel efficiency") .addInfo("Boosted: Produces 32700EU/t at 150% fuel efficiency") .addInfo("You need to wait for it to reach 300% to output full power") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 4, false) - .addController("Front center") - .addCasingInfo("Robust Tungstensteel Machine Casing", 16) + .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false) + .addController("Front center").addCasingInfo("Robust Tungstensteel Machine Casing", 16) .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks") .addOtherStructurePart("Extreme Engine Intake Machine Casing", "8x, ring around controller") .addStructureInfo("Extreme Engine Intake Casings must not be obstructed in front (only air blocks)") - .addDynamoHatch("Back center", 2) - .addMaintenanceHatch("One of the casings next to a Gear Box", 1) + .addDynamoHatch("Back center", 2).addMaintenanceHatch("One of the casings next to a Gear Box", 1) .addMufflerHatch("Top middle back, above the rear Gear Box", 1) - .addInputHatch("HOG, next to a Gear Box", 1) - .addInputHatch("Lubricant, next to a Gear Box", 1) - .addInputHatch("Liquid Oxygen, optional, next to a Gear Box", 1) - .toolTipFinisher("Gregtech"); + .addInputHatch("HOG, next to a Gear Box", 1).addInputHatch("Lubricant, next to a Gear Box", 1) + .addInputHatch("Liquid Oxygen, optional, next to a Gear Box", 1).toolTipFinisher("Gregtech"); return tt; } @@ -67,41 +61,19 @@ 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[] { - 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() - }; + 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() }; } - return new ITexture[] {casingTexturePages[0][60]}; + return new ITexture[] { casingTexturePages[0][60] }; } @Override @@ -197,31 +169,50 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die } } - 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 adfefee6c1..1f2b4f8222 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 @@ -12,6 +12,15 @@ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.filterByMTETier; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidStack; + import com.google.common.collect.ImmutableMap; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -25,6 +34,7 @@ import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; import com.gtnewhorizons.modularui.common.widget.ProgressBar; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; @@ -41,101 +51,65 @@ 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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidStack; public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_FusionComputer> implements ISurvivalConstructable, IAddUIWidgets { + 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[][] { - { - " ", - " ihi ", - " hh hh ", - " h h ", - " h h ", - " h h ", - " i i ", - " h h ", - " i i ", - " h h ", - " h h ", - " h h ", - " hh hh ", - " ihi ", - " ", - }, - { - " xhx ", - " hhccchh ", - " eccxhxcce ", - " eceh hece ", - " hce ech ", - " hch hch ", - "xcx xcx", - "hch hch", - "xcx xcx", - " hch hch ", - " hce ech ", - " eceh hece ", - " eccx~xcce ", - " hhccchh ", - " xhx ", - }, - { - " ", - " ihi ", - " hh hh ", - " h h ", - " h h ", - " h h ", - " i i ", - " h h ", - " i i ", - " h h ", - " h h ", - " h h ", - " 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(); - } - }; + 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 ", " h h ", + " h h ", " h h ", " i i ", " h h ", + " i i ", " h h ", " h h ", " h h ", + " hh hh ", " ihi ", " ", }, + { " xhx ", " hhccchh ", " eccxhxcce ", " eceh hece ", + " hce ech ", " hch hch ", "xcx xcx", "hch hch", + "xcx xcx", " hch hch ", " hce ech ", " eceh hece ", + " eccx~xcce ", " hhccchh ", " xhx ", }, + { " ", " ihi ", " hh hh ", " h h ", + " h h ", " h h ", " i i ", " h h ", + " i i ", " h h ", " h h ", " h h ", + " 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(); + } + }; public GT_Recipe mLastRecipe; public long mEUStore; @@ -143,14 +117,8 @@ public abstract class GT_MetaTileEntity_FusionComputer 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() + TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW).extFacing().build(), + TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).extFacing().glow() .build())); } @@ -194,20 +162,16 @@ public abstract class GT_MetaTileEntity_FusionComputer @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addController("Fusion Reactor") - .addInfo("Some kind of fusion reactor, maybe") - .addSeparator() + tt.addController("Fusion Reactor").addInfo("Some kind of fusion reactor, maybe").addSeparator() .addInfo("Some kind of fusion reactor, maybe") .addStructureInfo("Should probably be built similar to other fusions") - .addStructureInfo("See controller tooltip for details") - .toolTipFinisher("Gregtech"); + .addStructureInfo("See controller tooltip for details").toolTipFinisher("Gregtech"); return tt; } @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - if (checkPiece(STRUCTURE_PIECE_MAIN, 7, 1, 12) - && mInputHatches.size() > 1 + if (checkPiece(STRUCTURE_PIECE_MAIN, 7, 1, 12) && mInputHatches.size() > 1 && !mOutputHatches.isEmpty() && !mEnergyHatches.isEmpty()) { mWrench = true; @@ -262,28 +226,13 @@ public abstract class GT_MetaTileEntity_FusionComputer public abstract int getFusionCoilMeta(); @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[] { - 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() - }; + 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() }; } /** @@ -331,11 +280,15 @@ public abstract class GT_MetaTileEntity_FusionComputer 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); + this.getBaseMetaTileEntity(), + this.mLastRecipe, + false, + GT_Values.V[tier()], + tFluids); } if ((tRecipe == null && !mRunningOnLoad) || (maxEUStore() < tRecipe.mSpecialValue)) { @@ -400,9 +353,8 @@ public abstract class GT_MetaTileEntity_FusionComputer for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) { long energyToMove = GT_Values.V[tier()] / 16; - if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore() - && tHatch.getBaseMetaTileEntity() - .decreaseStoredEnergyUnits(energyToMove, false)) { + if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore() && tHatch + .getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyToMove, false)) { aBaseMetaTileEntity.increaseStoredEnergyUnits(energyToMove, true); } } @@ -418,7 +370,8 @@ public abstract class GT_MetaTileEntity_FusionComputer if (mOutputFluids != null) for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack); mEfficiency = Math.max( - 0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]))); + 0, + Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]))); mOutputItems = null; mProgresstime = 0; mMaxProgresstime = 0; @@ -426,19 +379,16 @@ public abstract class GT_MetaTileEntity_FusionComputer if (mOutputFluids != null && mOutputFluids.length > 0) { try { GT_Mod.achievements.issueAchivementHatchFluid( - aBaseMetaTileEntity - .getWorld() + aBaseMetaTileEntity.getWorld() .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } this.mEUStore = aBaseMetaTileEntity.getStoredEU(); if (aBaseMetaTileEntity.isAllowedToWork()) checkRecipe(); } } else { - if (aTick % 100 == 0 - || aBaseMetaTileEntity.hasWorkJustBeenEnabled() + if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { @@ -448,7 +398,8 @@ public abstract class GT_MetaTileEntity_FusionComputer criticalStopMachine(); } aBaseMetaTileEntity.decreaseStoredEnergyUnits( - this.mLastRecipe.mSpecialValue - this.mEUt, true); + this.mLastRecipe.mSpecialValue - this.mEUt, + true); } } if (mMaxProgresstime <= 0) mEfficiency = Math.max(0, mEfficiency - 1000); @@ -459,8 +410,8 @@ public abstract class GT_MetaTileEntity_FusionComputer stopMachine(); } } - aBaseMetaTileEntity.setErrorDisplayID( - (aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64)); + aBaseMetaTileEntity + .setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); } } @@ -510,10 +461,8 @@ public abstract class GT_MetaTileEntity_FusionComputer @Override public String[] getInfoData() { - String tier = tier() == 6 - ? EnumChatFormatting.RED + "I" + EnumChatFormatting.RESET - : tier() == 7 - ? EnumChatFormatting.YELLOW + "II" + EnumChatFormatting.RESET + 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; @@ -524,17 +473,26 @@ public abstract class GT_MetaTileEntity_FusionComputer } } - 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 @@ -560,10 +518,9 @@ public abstract class GT_MetaTileEntity_FusionComputer @Override public void addGregTechLogo(ModularWindow.Builder builder) { - builder.widget(new DrawableWidget() - .setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(155, 145)); + builder.widget( + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17) + .setPos(155, 145)); } @Override @@ -573,63 +530,61 @@ public abstract class GT_MetaTileEntity_FusionComputer @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> !mMachine) - .setPos(10, 8)) + builder.widget( + new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")).setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> !mMachine).setPos(10, 8)) .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val)) - .widget(new TextWidget("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setTextAlignment(Alignment.Center) - .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 - && !getBaseMetaTileEntity().isActive()) - .setPos(-getGUIWidth() / 2, 170) - .setSize(getGUIWidth() * 2, 9)) - .widget(new FakeSyncWidget.IntegerSyncer( - () -> getBaseMetaTileEntity().getErrorDisplayID(), - val -> getBaseMetaTileEntity().setErrorDisplayID(val))) - .widget(new FakeSyncWidget.BooleanSyncer( - () -> getBaseMetaTileEntity().isActive(), - val -> getBaseMetaTileEntity().setActive(val))) - .widget(new TextWidget("Running perfectly.") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setTextAlignment(Alignment.Center) - .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 - && getBaseMetaTileEntity().isActive()) - .setPos(0, 170) - .setSize(getGUIWidth(), 9)) - .widget(new FakeSyncWidget.IntegerSyncer( - () -> getBaseMetaTileEntity().getErrorDisplayID(), - val -> getBaseMetaTileEntity().setErrorDisplayID(val))) - .widget(new ProgressBar() - .setProgress(() -> (float) getBaseMetaTileEntity().getStoredEU() - / getBaseMetaTileEntity().getEUCapacity()) - .setDirection(ProgressBar.Direction.RIGHT) - .setTexture(GT_UITextures.PROGRESSBAR_STORED_EU, 147) - .setPos(5, 156) - .setSize(147, 5)) + .widget( + new TextWidget("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.") + .setDefaultColor(COLOR_TEXT_WHITE.get()).setTextAlignment(Alignment.Center) + .setEnabled( + widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 + && !getBaseMetaTileEntity().isActive()) + .setPos(-getGUIWidth() / 2, 170).setSize(getGUIWidth() * 2, 9)) + .widget( + new FakeSyncWidget.IntegerSyncer( + () -> getBaseMetaTileEntity().getErrorDisplayID(), + val -> getBaseMetaTileEntity().setErrorDisplayID(val))) + .widget( + new FakeSyncWidget.BooleanSyncer( + () -> getBaseMetaTileEntity().isActive(), + val -> getBaseMetaTileEntity().setActive(val))) + .widget( + new TextWidget("Running perfectly.").setDefaultColor(COLOR_TEXT_WHITE.get()) + .setTextAlignment(Alignment.Center) + .setEnabled( + widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0 + && getBaseMetaTileEntity().isActive()) + .setPos(0, 170).setSize(getGUIWidth(), 9)) + .widget( + new FakeSyncWidget.IntegerSyncer( + () -> getBaseMetaTileEntity().getErrorDisplayID(), + val -> getBaseMetaTileEntity().setErrorDisplayID(val))) + .widget( + new ProgressBar() + .setProgress( + () -> (float) getBaseMetaTileEntity().getStoredEU() + / getBaseMetaTileEntity().getEUCapacity()) + .setDirection(ProgressBar.Direction.RIGHT) + .setTexture(GT_UITextures.PROGRESSBAR_STORED_EU, 147).setPos(5, 156).setSize(147, 5)) .widget(TextWidget.dynamicString(() -> { - long energy = getBaseMetaTileEntity().getStoredEU(); - if (energy > 160_000_000L && energy < 160_010_000L) { - energy = 160_000_000L; - } - if (energy > 320_000_000L && energy < 320_010_000L) { - energy = 320_000_000L; - } - if (energy > 640_000_000L && energy < 640_010_000L) { - energy = 640_000_000L; - } - if (energy > 5_120_000_000L && energy < 5_120_080_000L) { - energy = 5_120_000_000L; - } - return GT_Utility.formatNumbers(energy) + " EU"; - }) - .setDefaultColor(COLOR_TEXT_RED.get()) - .setPos(50, 155)) - .widget(new ButtonWidget() - .setNEITransferRect(GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NEI) - .setPos(154, 4) - .setSize(18, 18)); + long energy = getBaseMetaTileEntity().getStoredEU(); + if (energy > 160_000_000L && energy < 160_010_000L) { + energy = 160_000_000L; + } + if (energy > 320_000_000L && energy < 320_010_000L) { + energy = 320_000_000L; + } + if (energy > 640_000_000L && energy < 640_010_000L) { + energy = 640_000_000L; + } + if (energy > 5_120_000_000L && energy < 5_120_080_000L) { + energy = 5_120_000_000L; + } + return GT_Utility.formatNumbers(energy) + " EU"; + }).setDefaultColor(COLOR_TEXT_RED.get()).setPos(50, 155)).widget( + new ButtonWidget().setNEITransferRect(GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName) + .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NEI) + .setPos(154, 4).setSize(18, 18)); } } 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 ef218cb643..f032a9b53e 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 @@ -3,23 +3,20 @@ 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 net.minecraft.block.Block; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import net.minecraft.block.Block; 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); @@ -67,22 +64,16 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Fusion Reactor") - .addInfo("It's over 9000!!!") + tt.addMachineType("Fusion Reactor").addInfo("It's over 9000!!!") .addInfo("Controller block for the Fusion Reactor Mk I") .addInfo("2048EU/t and 10M EU capacity per Energy Hatch") .addInfo("If the recipe has a startup cost greater than the") - .addInfo("number of energy hatches * cap, you can't do it") - .addSeparator() - .beginStructureBlock(15, 3, 15, false) - .addController("See diagram when placed") - .addCasingInfo("LuV Machine Casing", 79) - .addStructureInfo("Cover the coils with casing") + .addInfo("number of energy hatches * cap, you can't do it").addSeparator() + .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed") + .addCasingInfo("LuV Machine Casing", 79).addStructureInfo("Cover the coils with casing") .addOtherStructurePart("Superconducting Coil Block", "Center part of the ring") - .addEnergyHatch("1-16, Specified casings", 2) - .addInputHatch("2-16, Specified casings", 1) - .addOutputHatch("1-16, Specified casings", 3) - .addStructureInfo("ALL Hatches must be LuV or better") + .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1) + .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be LuV or better") .toolTipFinisher("Gregtech"); return tt; } 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 a763e1f639..6d95abd1cb 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 @@ -3,23 +3,20 @@ 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 net.minecraft.block.Block; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import net.minecraft.block.Block; 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); @@ -67,22 +64,16 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Fusion Reactor") - .addInfo("It's over 9000!!!") + tt.addMachineType("Fusion Reactor").addInfo("It's over 9000!!!") .addInfo("Controller block for the Fusion Reactor Mk II") .addInfo("8192EU/t and 20M EU capacity per Energy Hatch") .addInfo("If the recipe has a startup cost greater than the") - .addInfo("number of energy hatches * cap, you can't do it") - .addSeparator() - .beginStructureBlock(15, 3, 15, false) - .addController("See diagram when placed") - .addCasingInfo("Fusion Machine Casing", 79) - .addStructureInfo("Cover the coils with casing") + .addInfo("number of energy hatches * cap, you can't do it").addSeparator() + .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed") + .addCasingInfo("Fusion Machine Casing", 79).addStructureInfo("Cover the coils with casing") .addOtherStructurePart("Fusion Coil Block", "Center part of the ring") - .addEnergyHatch("1-16, Specified casings", 2) - .addInputHatch("2-16, Specified casings", 1) - .addOutputHatch("1-16, Specified casings", 3) - .addStructureInfo("ALL Hatches must be ZPM or better") + .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1) + .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be ZPM or better") .toolTipFinisher("Gregtech"); return tt; } 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 c2c0367d61..210a427f32 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 @@ -3,23 +3,20 @@ 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 net.minecraft.block.Block; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import net.minecraft.block.Block; 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); @@ -67,22 +64,16 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Fusion Reactor") - .addInfo("A SUN DOWN ON EARTH") + tt.addMachineType("Fusion Reactor").addInfo("A SUN DOWN ON EARTH") .addInfo("Controller block for the Fusion Reactor Mk III") .addInfo("32768EU/t and 40M EU capacity per Energy Hatch") .addInfo("If the recipe has a startup cost greater than the") - .addInfo("number of energy hatches * cap, you can't do it") - .addSeparator() - .beginStructureBlock(15, 3, 15, false) - .addController("See diagram when placed") - .addCasingInfo("Fusion Machine Casing Mk II", 79) - .addStructureInfo("Cover the coils with casing") + .addInfo("number of energy hatches * cap, you can't do it").addSeparator() + .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed") + .addCasingInfo("Fusion Machine Casing Mk II", 79).addStructureInfo("Cover the coils with casing") .addOtherStructurePart("Fusion Coil Block", "Center part of the ring") - .addEnergyHatch("1-16, Specified casings", 2) - .addInputHatch("2-16, Specified casings", 1) - .addOutputHatch("1-16, Specified casings", 3) - .addStructureInfo("ALL Hatches must be UV or better") + .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1) + .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be UV or better") .toolTipFinisher("Gregtech"); return tt; } 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 6c35a3e9c2..e5921aaf32 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 @@ -7,11 +7,19 @@ import static gregtech.api.enums.GT_HatchElement.*; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.ITexture; @@ -26,49 +34,41 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -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 int dryHeatCounter = 0; // Counts up to dryHeatMaximum to check for explosion conditions private static final int dryHeatMaximum = 2000; // 2000 ticks = 100 seconds 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( + 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(); + .build(); public static float penalty_per_config = 0.015f; // penalize 1.5% efficiency per circuitry level (1-25) private GT_MetaTileEntity_Hatch_Input mInputHotFluidHatch; @@ -93,23 +93,16 @@ public class GT_MetaTileEntity_HeatExchanger @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Heat Exchanger") - .addInfo("Controller Block for the Large Heat Exchanger") - .addInfo("More complicated than a Fusion Reactor. Seriously") - .addInfo("Inputs are Hot Coolant or Lava") + tt.addMachineType("Heat Exchanger").addInfo("Controller Block for the Large Heat Exchanger") + .addInfo("More complicated than a Fusion Reactor. Seriously").addInfo("Inputs are Hot Coolant or Lava") .addInfo("Outputs Coolant or Pahoehoe Lava and SH Steam/Steam") .addInfo("Read the wiki article to understand how it works") - .addInfo("Then go to the Discord to understand the wiki") - .addSeparator() - .beginStructureBlock(3, 4, 3, false) - .addController("Front bottom") + .addInfo("Then go to the Discord to understand the wiki").addSeparator() + .beginStructureBlock(3, 4, 3, false).addController("Front bottom") .addCasingInfo("Stable Titanium Machine Casing", 20) - .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks") - .addMaintenanceHatch("Any casing", 1) - .addInputHatch("Hot fluid, bottom center", 2) - .addInputHatch("Distilled water, any casing", 1) - .addOutputHatch("Cold fluid, top center", 3) - .addOutputHatch("Steam/SH Steam, any casing", 1) + .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks").addMaintenanceHatch("Any casing", 1) + .addInputHatch("Hot fluid, bottom center", 2).addInputHatch("Distilled water, any casing", 1) + .addOutputHatch("Cold fluid, top center", 3).addOutputHatch("Steam/SH Steam, any casing", 1) .toolTipFinisher("Gregtech"); return tt; } @@ -129,41 +122,18 @@ public class GT_MetaTileEntity_HeatExchanger } @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[] { - casingTexturePages[0][CASING_INDEX], - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW) - .extFacing() - .glow() - .build() - }; + 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[] { 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 @@ -221,11 +191,11 @@ public class GT_MetaTileEntity_HeatExchanger return false; } - superheated = fluidAmountToConsume - >= superheated_threshold; // set the internal superheated flag if we have enough hot fluid. Used in the + 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 + 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); @@ -253,8 +223,8 @@ public class GT_MetaTileEntity_HeatExchanger @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 @@ -267,8 +237,9 @@ public class GT_MetaTileEntity_HeatExchanger 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 } @@ -357,26 +328,43 @@ public class GT_MetaTileEntity_HeatExchanger @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 - }; + 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 }; } @Override 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 1b2c690a57..ed7ca009c5 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 @@ -4,7 +4,12 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; + import com.gtnewhorizon.structurelib.structure.IStructureElement; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.SoundResource; @@ -18,11 +23,10 @@ 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.item.ItemStack; 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); } @@ -39,21 +43,13 @@ public class GT_MetaTileEntity_ImplosionCompressor @Override 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") + 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) + .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"); + .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addMufflerHatch("Any casing", 1) + .addInputBus("Any casing", 1).addOutputBus("Any casing", 1).toolTipFinisher("Gregtech"); return tt; } @@ -64,41 +60,19 @@ public class GT_MetaTileEntity_ImplosionCompressor } @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[] { - BlockIcons.casingTexturePages[0][16], - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW) - .extFacing() - .glow() - .build() - }; + 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() }; } - return new ITexture[] {Textures.BlockIcons.casingTexturePages[0][16]}; + return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][16] }; } @Override @@ -131,8 +105,8 @@ public class GT_MetaTileEntity_ImplosionCompressor } 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; @@ -143,7 +117,7 @@ public class GT_MetaTileEntity_ImplosionCompressor 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 1d52753a8c..8b7c5cdf99 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 @@ -6,11 +6,23 @@ import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofFrame; +import java.util.*; +import java.util.stream.Collectors; + +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 net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -28,15 +40,6 @@ 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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_IntegratedOreFactory> @@ -52,57 +55,58 @@ public class GT_MetaTileEntity_IntegratedOreFactory 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_INDEX2) - .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_INDEX2).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<>(); @@ -178,31 +182,20 @@ public class GT_MetaTileEntity_IntegratedOreFactory @Override 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.") + 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") + .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") .addStructureInfo("128 advanced iridium plated machine casing") - .addStructureInfo("105 clean stainless steel machine casing") - .addStructureInfo("48 reinforced glass") - .addStructureInfo("30 tungstensteel pipe casing") - .addStructureInfo("16 tungstensteel frame box") - .addStructureInfo("16 steel gear box casing") - .addEnergyHatch("Button Casing", 1) - .addMaintenanceHatch("Button Casing", 1) - .addInputBus("Input ore/crushed ore", 2) + .addStructureInfo("105 clean stainless steel machine casing").addStructureInfo("48 reinforced glass") + .addStructureInfo("30 tungstensteel pipe casing").addStructureInfo("16 tungstensteel frame box") + .addStructureInfo("16 steel gear box casing").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"); + .addMufflerHatch("Output Pollution", 3).addOutputBus("Output products", 4).toolTipFinisher("Gregtech"); return tt; } @@ -276,8 +269,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory if (tCharged <= 0) break; int tID = GT_Utility.stackToInt(ore); if (tID == 0) continue; - if (isPureDust.contains(tID) - || isImpureDust.contains(tID) + if (isPureDust.contains(tID) || isImpureDust.contains(tID) || isCrushedPureOre.contains(tID) || isThermal.contains(tID) || isCrushedOre.contains(tID) @@ -369,7 +361,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory if (aPlayer.isSneaking()) { sVoidStone = !sVoidStone; GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", sVoidStone)); + aPlayer, + StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", sVoidStone)); return; } sMode = (sMode + 1) % 5; @@ -394,7 +387,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory des = ""; } GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor", des, getTime() / 20)); + aPlayer, + StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor", des, getTime() / 20)); } @Override @@ -420,8 +414,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory 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 { @@ -446,7 +440,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory getBaseMetaTileEntity(), false, GT_Values.V[15], - new FluidStack[] {GT_ModHandler.getDistilledWater(Integer.MAX_VALUE)}, + new FluidStack[] { GT_ModHandler.getDistilledWater(Integer.MAX_VALUE) }, aStack); if (tRecipe != null) { tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize)); @@ -468,8 +462,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory 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 { @@ -490,8 +484,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory 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 { @@ -512,8 +506,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory 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 { @@ -541,8 +535,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory 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)); @@ -622,8 +615,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return checkPiece(STRUCTURE_PIECE_MAIN, 8, 9, 1) - && mMaintenanceHatches.size() <= 1 + return checkPiece(STRUCTURE_PIECE_MAIN, 8, 9, 1) && mMaintenanceHatches.size() <= 1 && !mMufflerHatches.isEmpty(); } @@ -664,46 +656,25 @@ public class GT_MetaTileEntity_IntegratedOreFactory public String[] getInfoData() { List<String> informationData = new ArrayList<>(Arrays.asList(super.getInfoData())); String parallelism = StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " - + EnumChatFormatting.BLUE + getCurrentParallelism() + EnumChatFormatting.RESET; + + EnumChatFormatting.BLUE + + getCurrentParallelism() + + EnumChatFormatting.RESET; informationData.add(parallelism); return informationData.toArray(new String[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) { - if (aActive) - 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[] { - 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() - }; + if (aActive) 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[] { 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() }; } - 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 b0c9e55a81..93d42acec0 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 @@ -14,10 +14,19 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_Utility.formatNumbers; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.GT_Mod; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -33,47 +42,41 @@ 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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -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 @@ -100,7 +103,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler // 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 " + formatNumbers((getEUt() * 40) * ((runtimeBoost(20) / (20f)) / superToNormalSteam)) + tt.addInfo( + "Produces " + formatNumbers((getEUt() * 40) * ((runtimeBoost(20) / (20f)) / superToNormalSteam)) + "L of Superheated Steam with 1 Coal at " + formatNumbers((getEUt() * 40L) / superToNormalSteam) + "L/s") // ? @@ -108,29 +112,27 @@ public abstract class GT_MetaTileEntity_LargeBoiler .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 " + formatNumbers((getEUt() * 40) * (runtimeBoost(20) / 20f)) - + "L of Steam with 1 Coal at " + formatNumbers(getEUt() * 40) + "L/s") // ? + tt.addInfo( + "Produces " + formatNumbers((getEUt() * 40) * (runtimeBoost(20) / 20f)) + + "L of Steam with 1 Coal at " + + formatNumbers(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( + tt.addInfo( + String.format( "Diesel fuels have 1/4 efficiency - Takes %s seconds to heat up", formatNumbers(500.0 / getEfficiencyIncrease()))) // ? check semifluid again - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 5, 3, false) + .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 5, 3, false) .addController("Front bottom") .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) - .addMufflerHatch("Any firebox", 1) - .addInputBus("Solid fuel, Any firebox", 1) - .addInputHatch("Liquid fuel, Any firebox", 1) - .addStructureInfo("You can use either, or both") - .addInputHatch("Water, Any firebox", 1) - .addOutputHatch("Steam, any casing", 2) - .toolTipFinisher("Gregtech"); + .addMaintenanceHatch("Any firebox", 1).addMufflerHatch("Any firebox", 1) + .addInputBus("Solid fuel, Any firebox", 1).addInputHatch("Liquid fuel, Any firebox", 1) + .addStructureInfo("You can use either, or both").addInputHatch("Water, Any firebox", 1) + .addOutputHatch("Steam, any casing", 2).toolTipFinisher("Gregtech"); return tt; } @@ -166,46 +168,25 @@ public abstract class GT_MetaTileEntity_LargeBoiler @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()))); + 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[] { - 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() - }; + 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() }; } - return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()) }; } @Override @@ -262,8 +243,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler 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; @@ -285,7 +266,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler 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) { @@ -311,7 +292,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler 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) { @@ -338,12 +319,11 @@ public abstract class GT_MetaTileEntity_LargeBoiler @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))); + if (this.mSuperEfficencyIncrease > 0) 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; @@ -422,8 +402,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mCasingAmount = 0; mFireboxAmount = 0; - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 4, 0) - && mCasingAmount >= 24 + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 4, 0) && mCasingAmount >= 24 && mFireboxAmount >= 3 && mMaintenanceHatches.size() == 1 && !mMufflerHatches.isEmpty(); 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 970000da11..2effcf7966 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 @@ -1,10 +1,11 @@ package gregtech.common.tileentities.machines.multi; +import net.minecraft.block.Block; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; public class GT_MetaTileEntity_LargeBoiler_Bronze extends GT_MetaTileEntity_LargeBoiler { 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 bc30228b3a..c7bd766945 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 @@ -1,12 +1,14 @@ package gregtech.common.tileentities.machines.multi; +import net.minecraft.block.Block; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; public class GT_MetaTileEntity_LargeBoiler_Steel extends GT_MetaTileEntity_LargeBoiler { + public GT_MetaTileEntity_LargeBoiler_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond; 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 bda83f7210..61f2756622 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 @@ -1,12 +1,14 @@ package gregtech.common.tileentities.machines.multi; +import net.minecraft.block.Block; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; public class GT_MetaTileEntity_LargeBoiler_Titanium extends GT_MetaTileEntity_LargeBoiler { + public GT_MetaTileEntity_LargeBoiler_Titanium(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond; 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 3b73b4f407..f00ea287b2 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 @@ -1,12 +1,14 @@ package gregtech.common.tileentities.machines.multi; +import net.minecraft.block.Block; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; public class GT_MetaTileEntity_LargeBoiler_TungstenSteel extends GT_MetaTileEntity_LargeBoiler { + public GT_MetaTileEntity_LargeBoiler_TungstenSteel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond; 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 ce1031e284..a6739e6fa2 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 @@ -7,10 +7,23 @@ import static gregtech.api.enums.GT_HatchElement.*; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import java.util.ArrayList; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IChatComponent; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.*; import com.gtnewhorizon.structurelib.util.ItemStackPredicate; + import gregtech.api.GregTech_API; import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.interfaces.IHeatingCoil; @@ -23,51 +36,39 @@ 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 java.util.stream.Collectors; -import java.util.stream.IntStream; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IChatComponent; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidStack; 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( + 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(); + .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; @@ -88,63 +89,33 @@ public class GT_MetaTileEntity_LargeChemicalReactor @Override public GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Chemical Reactor") - .addInfo("Controller block for the Large Chemical Reactor") - .addInfo("Does not lose efficiency when overclocked") - .addInfo("Accepts fluids instead of fluid cells") - .addSeparator() - .beginStructureBlock(3, 3, 3, false) - .addController("Front center") + tt.addMachineType("Chemical Reactor").addInfo("Controller block for the Large Chemical Reactor") + .addInfo("Does not lose efficiency when overclocked").addInfo("Accepts fluids instead of fluid cells") + .addSeparator().beginStructureBlock(3, 3, 3, false).addController("Front center") .addCasingInfo("Chemically Inert Machine Casing", 8) .addOtherStructurePart("PTFE Pipe Machine Casing", "Center") .addOtherStructurePart("Heating Coil", "Adjacent to the PTFE Pipe Machine Casing", 1) - .addEnergyHatch("Any casing", 1, 2) - .addMaintenanceHatch("Any casing", 1, 2) - .addInputBus("Any casing", 1, 2) - .addInputHatch("Any casing", 1, 2) - .addOutputBus("Any casing", 1, 2) - .addOutputHatch("Any casing", 1, 2) - .addStructureInfo("You can have multiple hatches/busses") + .addEnergyHatch("Any casing", 1, 2).addMaintenanceHatch("Any casing", 1, 2) + .addInputBus("Any casing", 1, 2).addInputHatch("Any casing", 1, 2).addOutputBus("Any casing", 1, 2) + .addOutputHatch("Any casing", 1, 2).addStructureInfo("You can have multiple hatches/busses") .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[] { - 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[] { - 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() - }; + 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[] { 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 @@ -187,15 +158,19 @@ public class GT_MetaTileEntity_LargeChemicalReactor } tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe( - getBaseMetaTileEntity(), false, false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); + 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(); } } @@ -232,8 +207,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mCasingAmount = 0; mCoilAmount = 0; - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) - && mCasingAmount >= 8 + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) && mCasingAmount >= 8 && mCoilAmount == 1 && !mEnergyHatches.isEmpty() && mMaintenanceHatches.size() == 1; @@ -268,6 +242,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor } private enum CoilStructureElement implements IStructureElement<GT_MetaTileEntity_LargeChemicalReactor> { + INSTANCE; @Override @@ -282,15 +257,15 @@ public class GT_MetaTileEntity_LargeChemicalReactor } @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++; @@ -298,42 +273,23 @@ public class GT_MetaTileEntity_LargeChemicalReactor } @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) { return survivalPlaceBlock(t, world, x, y, z, trigger, AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); } @Override public BlocksToPlace getBlocksToPlace( - GT_MetaTileEntity_LargeChemicalReactor gt_metaTileEntity_largeChemicalReactor, - World world, - int x, - int y, - int z, - ItemStack trigger, - AutoPlaceEnvironment env) { - return BlocksToPlace.create(IntStream.range(0, 8) - .mapToObj(i -> new ItemStack(GregTech_API.sBlockCasings5, 1, i)) - .collect(Collectors.toList())); + GT_MetaTileEntity_LargeChemicalReactor gt_metaTileEntity_largeChemicalReactor, World world, int x, + int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + return BlocksToPlace.create( + IntStream.range(0, 8).mapToObj(i -> new ItemStack(GregTech_API.sBlockCasings5, 1, i)) + .collect(Collectors.toList())); } @Override - public PlaceResult survivalPlaceBlock( - GT_MetaTileEntity_LargeChemicalReactor t, - World world, - int x, - int y, - int z, - ItemStack trigger, - AutoPlaceEnvironment env) { + public PlaceResult survivalPlaceBlock(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, + int z, ItemStack trigger, AutoPlaceEnvironment env) { if (t.mCoilAmount > 0) return PlaceResult.SKIP; if (check(t, world, x, y, z)) return PlaceResult.SKIP; if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, env.getActor())) return PlaceResult.REJECT; 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 84e6ab520c..0f700950f2 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 @@ -9,11 +9,25 @@ import static gregtech.api.enums.Textures.BlockIcons.TURBINE_NEW_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.TURBINE_NEW_EMPTY; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.api.enums.Dyes; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -25,54 +39,36 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.LightingHelper; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.render.GT_RenderUtil; -import java.util.ArrayList; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.IBlockAccess; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -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[][] { - { - " ", " ", " ", " ", " ", - }, - { - " --- ", " ccc ", " hhh ", " hhh ", " hhh ", - }, - { - " --- ", " c~c ", " h-h ", " h-h ", " hdh ", - }, - { - " --- ", " ccc ", " hhh ", " hhh ", " hhh ", - }, - { - " ", " ", " ", " ", " ", - }, - })) - .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()))) - .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[][] { { " ", " ", " ", " ", " ", }, + { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", }, + { " --- ", " c~c ", " h-h ", " h-h ", " hdh ", }, + { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", }, + { " ", " ", " ", " ", " ", }, })) + .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()))) + .build(); + } + }; protected int baseEff = 0; protected int optFlow = 0; @@ -81,7 +77,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine 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 }; // client side stuff protected boolean mHasTurbine; @@ -106,8 +102,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return checkPiece(STRUCTURE_PIECE_MAIN, 2, 2, 1) - && mMaintenanceHatches.size() == 1 + return checkPiece(STRUCTURE_PIECE_MAIN, 2, 2, 1) && mMaintenanceHatches.size() == 1 && mMufflerHatches.isEmpty() == (getPollutionPerTick(null) == 0); } @@ -136,7 +131,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine @Override public boolean renderInWorld(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { if (!isNewStyleRendering() || !mMachine) return false; - int[] tABCCoord = new int[] {-1, -1, 0}; + int[] tABCCoord = new int[] { -1, -1, 0 }; int[] tXYZOffset = new int[3]; byte tFacing = getBaseMetaTileEntity().getFrontFacing(); ExtendedFacing tExtendedFacing = getExtendedFacing(); @@ -163,8 +158,12 @@ public abstract class GT_MetaTileEntity_LargeTurbine int tZ = tXYZOffset[2] + aZ; // we skip the occlusion test, as we always require a working turbine to have a block of air before it // so the front face cannot be occluded whatsoever in the most cases. - Tessellator.instance.setBrightness(tBlock.getMixedBrightnessForBlock( - aWorld, aX + tDirection.offsetX, tY + tDirection.offsetY, aZ + tDirection.offsetZ)); + Tessellator.instance.setBrightness( + tBlock.getMixedBrightnessForBlock( + aWorld, + aX + tDirection.offsetX, + tY + tDirection.offsetY, + aZ + tDirection.offsetZ)); tLighting.setupLighting(tBlock, tX, tY, tZ, tFacing).setupColor(tFacing, Dyes._NULL.mRGBa); GT_RenderUtil.renderBlockIcon( aRenderer, @@ -217,32 +216,28 @@ public abstract class GT_MetaTileEntity_LargeTurbine @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 + 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() - * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed - * 50)); + 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)); overflowMultiplier = getOverflowMultiplier(aStack); @@ -259,12 +254,10 @@ public abstract class GT_MetaTileEntity_LargeTurbine } } - 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 @@ -285,13 +278,13 @@ public abstract class GT_MetaTileEntity_LargeTurbine } else { this.mMaxProgresstime = 1; this.mEfficiencyIncrease = 10; - // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here. + // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here. return true; } } - 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); @@ -351,26 +344,21 @@ public abstract class GT_MetaTileEntity_LargeTurbine } String tRunning = mMaxProgresstime > 0 - ? EnumChatFormatting.GREEN - + StatCollector.translateToLocal("GT5U.turbine.running.true") + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.running.true") + EnumChatFormatting.RESET - : EnumChatFormatting.RED - + StatCollector.translateToLocal("GT5U.turbine.running.false") + : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.running.false") + EnumChatFormatting.RESET; String tMaintainance = getIdealStatus() == getRepairStatus() - ? EnumChatFormatting.GREEN - + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + EnumChatFormatting.RESET - : EnumChatFormatting.RED - + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + : 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; @@ -382,40 +370,64 @@ public abstract class GT_MetaTileEntity_LargeTurbine } } String[] ret = new String[] { - // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) - + 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 */ + // 8 Lines available for information panels + tRunning + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) + + 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() { - return getBaseMetaTileEntity() != null && getBaseMetaTileEntity().isClientSide() - ? mHasTurbine + return getBaseMetaTileEntity() != null && getBaseMetaTileEntity().isClientSide() ? mHasTurbine : this.getMaxEfficiency(mInventory[1]) > 0; } 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 ad56dd7be4..79078febec 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 @@ -2,6 +2,12 @@ package gregtech.common.tileentities.machines.multi; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -12,10 +18,6 @@ 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; public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeTurbine { @@ -28,49 +30,28 @@ 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_NEW_ACTIVE5) - .build() - : hasTurbine() - ? TextureFactory.builder() - .addIcon(LARGETURBINE_NEW5) - .build() - : TextureFactory.builder() - .addIcon(LARGETURBINE_NEW_EMPTY5) - .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_NEW_ACTIVE5).build() + : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build() + : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build()) + : casingTexturePages[0][58] }; } @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Gas Turbine") - .addInfo("Controller block for the Large Gas Turbine") + tt.addMachineType("Gas Turbine").addInfo("Controller block for the Large Gas Turbine") .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!") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 4, true) - .addController("Front center") - .addCasingInfo("Stainless Steel Turbine Casing", 24) - .addDynamoHatch("Back center", 1) - .addMaintenanceHatch("Side centered", 2) - .addMufflerHatch("Side centered", 2) - .addInputHatch("Gas Fuel, Side centered", 2) + .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, true) + .addController("Front center").addCasingInfo("Stainless Steel 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; } @@ -113,19 +94,14 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT } @Override - int fluidIntoPower( - ArrayList<FluidStack> aFluids, - int aOptFlow, - int aBaseEff, - int overflowMultiplier, + 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) { @@ -177,9 +153,9 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT // 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 (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 @@ -203,9 +179,8 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); + 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_GasAdvanced.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java index 185da58b28..fbad39dd32 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 @@ -2,6 +2,12 @@ package gregtech.common.tileentities.machines.multi; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -12,12 +18,9 @@ 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; 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); } @@ -27,49 +30,27 @@ 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_NEW_ACTIVE5) - .build() - : hasTurbine() - ? TextureFactory.builder() - .addIcon(LARGETURBINE_NEW5) - .build() - : TextureFactory.builder() - .addIcon(LARGETURBINE_NEW_EMPTY5) - .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_NEW_ACTIVE5).build() + : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build() + : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).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 ") + 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("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) + .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; } @@ -112,19 +93,14 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit } @Override - int fluidIntoPower( - ArrayList<FluidStack> aFluids, - int aOptFlow, - int aBaseEff, - int overflowMultiplier, + 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) { @@ -200,9 +176,8 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); + 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 779de1a17a..a28c28518c 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 @@ -4,6 +4,14 @@ 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 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 gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -13,12 +21,6 @@ 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; public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_LargeTurbine { @@ -34,49 +36,27 @@ 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_NEW_ACTIVE5) - .build() - : hasTurbine() - ? TextureFactory.builder() - .addIcon(LARGETURBINE_NEW5) - .build() - : TextureFactory.builder() - .addIcon(LARGETURBINE_NEW_EMPTY5) - .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_NEW_ACTIVE5).build() + : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build() + : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build()) + : casingTexturePages[0][59] }; } @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Steam Turbine") - .addInfo("Controller block for the Large High Pressure Steam Turbine") - .addInfo("Needs a Turbine, place inside controller") - .addInfo("Outputs Steam as well as producing power") + tt.addMachineType("Steam Turbine").addInfo("Controller block for the Large High Pressure Steam Turbine") + .addInfo("Needs a Turbine, place inside controller").addInfo("Outputs Steam as well as producing power") .addInfo("Power output depends on turbine and fitting") - .addInfo("Use screwdriver to adjust fitting of turbine") - .addSeparator() - .beginStructureBlock(3, 3, 4, true) - .addController("Front center") - .addCasingInfo("Titanium Turbine Casing", 24) - .addDynamoHatch("Back center", 1) - .addMaintenanceHatch("Side centered", 2) - .addInputHatch("Superheated Steam, Side centered", 2) - .addOutputHatch("Steam, Side centered", 2) - .toolTipFinisher("Gregtech"); + .addInfo("Use screwdriver to adjust fitting of turbine").addSeparator() + .beginStructureBlock(3, 3, 4, true).addController("Front center") + .addCasingInfo("Titanium Turbine Casing", 24).addDynamoHatch("Back center", 1) + .addMaintenanceHatch("Side centered", 2).addInputHatch("Superheated Steam, Side centered", 2) + .addOutputHatch("Steam, Side centered", 2).toolTipFinisher("Gregtech"); return tt; } @@ -106,11 +86,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La } @Override - int fluidIntoPower( - ArrayList<FluidStack> aFluids, - int aOptFlow, - int aBaseEff, - int overflowEfficiency, + int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowEfficiency, float[] flowMultipliers) { if (looseFit) { long[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); @@ -145,13 +121,10 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La if (!achievement) { try { GT_Mod.achievements.issueAchievement( - this.getBaseMetaTileEntity() - .getWorld() - .getPlayerEntityByName( - this.getBaseMetaTileEntity().getOwnerName()), + this.getBaseMetaTileEntity().getWorld() + .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} achievement = true; } } else if (GT_ModHandler.isAnySteam(aFluidStack)) { @@ -164,8 +137,10 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La if (totalFlow == (GT_Utility.safeInt((long) realOptFlow))) { tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L); } else { - float efficiency = - getOverflowEfficiency(totalFlow, (GT_Utility.safeInt((long) realOptFlow)), overflowMultiplier); + float efficiency = getOverflowEfficiency( + totalFlow, + (GT_Utility.safeInt((long) realOptFlow)), + overflowMultiplier); tEU *= efficiency; tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L)); } @@ -192,9 +167,8 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * (overflowMultiplier + 2)); + efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) + / ((float) actualOptimalFlow * (overflowMultiplier + 2)); } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -208,8 +182,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La looseFit ^= true; GT_Utility.sendChatToPlayer( aPlayer, - looseFit - ? GT_Utility.trans("500", "Fitting: Loose - More Flow") + looseFit ? GT_Utility.trans("500", "Fitting: Loose - More Flow") : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); } } 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 272a3ddcc1..5479d277e2 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 @@ -2,6 +2,15 @@ package gregtech.common.tileentities.machines.multi; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -15,13 +24,6 @@ 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; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_LargeTurbine { @@ -34,47 +36,26 @@ 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_NEW_ACTIVE5) - .build() - : hasTurbine() - ? TextureFactory.builder() - .addIcon(LARGETURBINE_NEW5) - .build() - : TextureFactory.builder() - .addIcon(LARGETURBINE_NEW_EMPTY5) - .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_NEW_ACTIVE5).build() + : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build() + : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build()) + : casingTexturePages[0][60] }; } @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Plasma Turbine") - .addInfo("Controller block for the Large Plasma Generator") + tt.addMachineType("Plasma Turbine").addInfo("Controller block for the Large Plasma Generator") .addInfo("Needs a Turbine, place inside controller") - .addInfo("Use your Fusion Reactor to produce the Plasma") - .addSeparator() - .beginStructureBlock(3, 3, 4, true) - .addController("Front center") - .addCasingInfo("Tungstensteel Turbine Casing", 24) - .addDynamoHatch("Back center", 1) - .addMaintenanceHatch("Side centered", 2) - .addInputHatch("Plasma Fluid, Side centered", 2) - .addOutputHatch("Molten Fluid, optional, Side centered", 2) - .toolTipFinisher("Gregtech"); + .addInfo("Use your Fusion Reactor to produce the Plasma").addSeparator() + .beginStructureBlock(3, 3, 4, true).addController("Front center") + .addCasingInfo("Tungstensteel Turbine Casing", 24).addDynamoHatch("Back center", 1) + .addMaintenanceHatch("Side centered", 2).addInputHatch("Plasma Fluid, Side centered", 2) + .addOutputHatch("Molten Fluid, optional, Side centered", 2).toolTipFinisher("Gregtech"); return tt; } @@ -111,11 +92,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } @Override - int fluidIntoPower( - ArrayList<FluidStack> aFluids, - int aOptFlow, - int aBaseEff, - int overflowMultiplier, + 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 @@ -123,12 +100,11 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar 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. @@ -202,9 +178,8 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * ((overflowMultiplier * 3) + 1)); + efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) + / ((float) actualOptimalFlow * ((overflowMultiplier * 3) + 1)); } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -214,31 +189,28 @@ 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 + 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() - * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed - * 50)); + 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); flowMultipliers[0] = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mSteamMultiplier; @@ -254,12 +226,10 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar 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 @@ -281,7 +251,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } else { this.mMaxProgresstime = 20; this.mEfficiencyIncrease = 200; - // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here. + // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here. return true; } @@ -297,26 +267,21 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } String tRunning = mMaxProgresstime > 0 - ? EnumChatFormatting.GREEN - + StatCollector.translateToLocal("GT5U.turbine.running.true") + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.running.true") + EnumChatFormatting.RESET - : EnumChatFormatting.RED - + StatCollector.translateToLocal("GT5U.turbine.running.false") + : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.running.false") + EnumChatFormatting.RESET; String tMaintainance = getIdealStatus() == getRepairStatus() - ? EnumChatFormatting.GREEN - + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + EnumChatFormatting.RESET - : EnumChatFormatting.RED - + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + : 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; @@ -328,34 +293,59 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } } String[] ret = new String[] { - // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) - + 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 */ + // 8 Lines available for information panels + tRunning + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) + + 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 b66bf85fb7..35deef3fed 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 @@ -4,6 +4,14 @@ 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 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 gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -13,12 +21,6 @@ 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; public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_LargeTurbine { @@ -35,48 +37,27 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg } @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_NEW_ACTIVE5) - .build() - : hasTurbine() - ? TextureFactory.builder() - .addIcon(LARGETURBINE_NEW5) - .build() - : TextureFactory.builder() - .addIcon(LARGETURBINE_NEW_EMPTY5) - .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_NEW_ACTIVE5).build() + : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build() + : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build()) + : casingTexturePages[0][57] }; } @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Steam Turbine") - .addInfo("Controller block for the Large Steam Turbine") + tt.addMachineType("Steam Turbine").addInfo("Controller block for the Large Steam Turbine") .addInfo("Needs a Turbine, place inside controller") .addInfo("Outputs Distilled Water as well as producing power") .addInfo("Power output depends on turbine and fitting") - .addInfo("Use screwdriver to adjust fitting of turbine") - .addSeparator() - .beginStructureBlock(3, 3, 4, true) - .addController("Front center") - .addCasingInfo("Turbine Casing", 24) - .addDynamoHatch("Back center", 1) - .addMaintenanceHatch("Side centered", 2) - .addInputHatch("Steam, Side centered", 2) - .addOutputHatch("Distilled Water, Side centered", 2) + .addInfo("Use screwdriver to adjust fitting of turbine").addSeparator() + .beginStructureBlock(3, 3, 4, true).addController("Front center").addCasingInfo("Turbine Casing", 24) + .addDynamoHatch("Back center", 1).addMaintenanceHatch("Side centered", 2) + .addInputHatch("Steam, Side centered", 2).addOutputHatch("Distilled Water, Side centered", 2) .toolTipFinisher("Gregtech"); return tt; } @@ -114,11 +95,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg } @Override - int fluidIntoPower( - ArrayList<FluidStack> aFluids, - int aOptFlow, - int aBaseEff, - int overflowEfficiency, + int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowEfficiency, float[] flowMultipliers) { if (looseFit) { long[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); @@ -142,9 +119,8 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg int remainingFlow = GT_Utility.safeInt((long) (realOptFlow * (0.5f * overflowMultiplier + 1))); 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 @@ -154,10 +130,8 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg totalFlow += flow; // track total input used if (!achievement) { GT_Mod.achievements.issueAchievement( - this.getBaseMetaTileEntity() - .getWorld() - .getPlayerEntityByName( - this.getBaseMetaTileEntity().getOwnerName()), + this.getBaseMetaTileEntity().getWorld() + .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam"); achievement = true; } @@ -172,8 +146,10 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg if (totalFlow == (GT_Utility.safeInt((long) realOptFlow))) { tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L); } else { - float efficiency = - getOverflowEfficiency(totalFlow, (GT_Utility.safeInt((long) realOptFlow)), overflowMultiplier); + float efficiency = getOverflowEfficiency( + totalFlow, + (GT_Utility.safeInt((long) realOptFlow)), + overflowMultiplier); tEU *= efficiency; tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L)); } @@ -199,9 +175,8 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * (overflowMultiplier + 1)); + efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) + / ((float) actualOptimalFlow * (overflowMultiplier + 1)); } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -249,8 +224,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg looseFit ^= true; GT_Utility.sendChatToPlayer( aPlayer, - looseFit - ? GT_Utility.trans("500", "Fitting: Loose - More Flow") + looseFit ? GT_Utility.trans("500", "Fitting: Loose - More Flow") : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); } } 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 466e741fed..aec44c664d 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 @@ -11,10 +11,18 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_GLOW; import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.common.util.ForgeDirection; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.HeatingCoilLevel; @@ -32,44 +40,37 @@ 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.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; -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); @@ -87,59 +88,26 @@ public class GT_MetaTileEntity_MultiFurnace @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Furnace") - .addInfo("Controller Block for the Multi Smelter") - .addInfo("Smelts up to 8-8192 items at once") - .addInfo("Items smelted increases with coil tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front bottom") - .addCasingInfo("Heat Proof Machine Casing", 8) - .addOtherStructurePart("Heating Coils", "Middle layer") - .addEnergyHatch("Any bottom casing", 1) - .addMaintenanceHatch("Any bottom casing", 1) - .addMufflerHatch("Top Middle", 2) - .addInputBus("Any bottom casing", 1) - .addOutputBus("Any bottom casing", 1) - .toolTipFinisher("Gregtech"); + tt.addMachineType("Furnace").addInfo("Controller Block for the Multi Smelter") + .addInfo("Smelts up to 8-8192 items at once").addInfo("Items smelted increases with coil tier") + .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true) + .addController("Front bottom").addCasingInfo("Heat Proof Machine Casing", 8) + .addOtherStructurePart("Heating Coils", "Middle layer").addEnergyHatch("Any bottom casing", 1) + .addMaintenanceHatch("Any bottom casing", 1).addMufflerHatch("Top Middle", 2) + .addInputBus("Any bottom casing", 1).addOutputBus("Any bottom casing", 1).toolTipFinisher("Gregtech"); return tt; } @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[] { - casingTexturePages[0][CASING_INDEX], - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_MULTI_SMELTER) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW) - .extFacing() - .glow() - .build() - }; + 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[] { 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 @@ -240,61 +208,87 @@ public class GT_MetaTileEntity_MultiFurnace int tY = aBaseMetaTileEntity.getYCoord(); int tZ = aBaseMetaTileEntity.getZCoord() + zDir; int tUsedMeta; - for (int xPos = tX - 1; xPos <= tX + 1; xPos++) - 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); - } + for (int xPos = tX - 1; xPos <= tX + 1; xPos++) 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); + } } @Override public String[] getInfoData() { int mPollutionReduction = 0; - for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) - if (isValidMetaTileEntity(tHatch)) - mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); + 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) - if (isValidMetaTileEntity(tHatch)) { - storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); - } + 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 + EnumChatFormatting.RESET + " Discount: (EU/t) / " - + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mCostDiscount) + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN - + mPollutionReduction + EnumChatFormatting.RESET + " %" - }; + 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 + + EnumChatFormatting.RESET + + " Discount: (EU/t) / " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mCostDiscount) + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %" }; } @Override @@ -306,8 +300,7 @@ public class GT_MetaTileEntity_MultiFurnace 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 + 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; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java index 0694434137..ddb8e302e4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java @@ -10,12 +10,23 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofFrame; +import java.util.ArrayList; + +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 net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.Textures.BlockIcons; @@ -29,24 +40,16 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Casings8; -import java.util.ArrayList; -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 net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -public class GT_MetaTileEntity_NanoForge - extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase<GT_MetaTileEntity_NanoForge> - implements ISurvivalConstructable { +public class GT_MetaTileEntity_NanoForge extends + GT_MetaTileEntity_ExtendedPowerMultiBlockBase<GT_MetaTileEntity_NanoForge> implements ISurvivalConstructable { + private static final String STRUCTURE_PIECE_MAIN = "main"; private static final String STRUCTURE_PIECE_TIER2 = "tier2"; private static final String STRUCTURE_PIECE_TIER3 = "tier3"; - private static final IStructureDefinition<GT_MetaTileEntity_NanoForge> STRUCTURE_DEFINITION = - StructureDefinition.<GT_MetaTileEntity_NanoForge>builder() - // spotless:off + private static final IStructureDefinition<GT_MetaTileEntity_NanoForge> STRUCTURE_DEFINITION = StructureDefinition + .<GT_MetaTileEntity_NanoForge>builder() + // spotless:off .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { {" "," "," F "," C "," C "," C "," C "," F "," "," "}, {" "," "," F "," C "," C "," C "," C "," F "," "," "}, @@ -134,17 +137,15 @@ public class GT_MetaTileEntity_NanoForge {" CCCCCC ", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", " CCCCCC "} })) //spotless:on - .addElement('F', ofFrame(Materials.StellarAlloy)) - .addElement('C', ofBlock(GregTech_API.sBlockCasings8, 10)) - .addElement('A', ofBlock(GregTech_API.sBlockCasings2, 5)) - .addElement( - 'B', - buildHatchAdder(GT_MetaTileEntity_NanoForge.class) - .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)) - .dot(1) - .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(10)) - .buildAndChain(GregTech_API.sBlockCasings8, 10)) - .build(); + .addElement('F', ofFrame(Materials.StellarAlloy)).addElement('C', ofBlock(GregTech_API.sBlockCasings8, 10)) + .addElement('A', ofBlock(GregTech_API.sBlockCasings2, 5)) + .addElement( + 'B', + buildHatchAdder(GT_MetaTileEntity_NanoForge.class) + .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1) + .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(10)) + .buildAndChain(GregTech_API.sBlockCasings8, 10)) + .build(); private byte mSpecialTier = 0; private boolean mSeparate = false; @@ -178,43 +179,21 @@ public class GT_MetaTileEntity_NanoForge } @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(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW) - .extFacing() - .glow() - .build() - }; + 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.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW) - .extFacing() - .glow() - .build() - }; + BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() }; } return new ITexture[] { - BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)) - }; + BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)) }; } @Override @@ -253,8 +232,8 @@ public class GT_MetaTileEntity_NanoForge mOutputItems = null; mOutputFluids = null; long tTotalEU = getMaxInputEu(); - GT_Recipe tRecipe = - map.findRecipe(getBaseMetaTileEntity(), null, false, false, tTotalEU, tFluidInputs, null, tItemInputs); + GT_Recipe tRecipe = map + .findRecipe(getBaseMetaTileEntity(), null, false, false, tTotalEU, tFluidInputs, null, tItemInputs); if (tRecipe == null) return false; @@ -266,7 +245,11 @@ public class GT_MetaTileEntity_NanoForge this.mMaxProgresstime = tRecipe.mDuration; this.lEUt = -tRecipe.mEUt; calculateOverclockedNessMultiInternal( - tRecipe.mEUt, tRecipe.mDuration, 1, tTotalEU, tRecipe.mSpecialValue < mSpecialTier); + tRecipe.mEUt, + tRecipe.mDuration, + 1, + tTotalEU, + tRecipe.mSpecialValue < mSpecialTier); if (this.lEUt == Long.MAX_VALUE - 1 || this.mMaxProgresstime == Integer.MAX_VALUE - 1) return false; @@ -300,21 +283,18 @@ public class GT_MetaTileEntity_NanoForge mSpecialTier = 1; } - if (aStack.isItemEqual(Materials.Neutronium.getNanite(1)) - && checkPiece(STRUCTURE_PIECE_MAIN, 4, 37, 1) + if (aStack.isItemEqual(Materials.Neutronium.getNanite(1)) && checkPiece(STRUCTURE_PIECE_MAIN, 4, 37, 1) && checkPiece(STRUCTURE_PIECE_TIER2, -7, 14, 4)) { mSpecialTier = 2; } - if (aStack.isItemEqual(Materials.TranscendentMetal.getNanite(1)) - && checkPiece(STRUCTURE_PIECE_MAIN, 4, 37, 1) + if (aStack.isItemEqual(Materials.TranscendentMetal.getNanite(1)) && checkPiece(STRUCTURE_PIECE_MAIN, 4, 37, 1) && checkPiece(STRUCTURE_PIECE_TIER2, -7, 14, 4) && checkPiece(STRUCTURE_PIECE_TIER3, 14, 26, 4)) { mSpecialTier = 3; } - if (mMaintenanceHatches.size() != 1 - || mInputBusses.isEmpty() + if (mMaintenanceHatches.size() != 1 || mInputBusses.isEmpty() || mOutputBusses.isEmpty() || mInputHatches.isEmpty()) { return false; @@ -370,40 +350,32 @@ public class GT_MetaTileEntity_NanoForge mSpecialTier = aNBT.getByte("mSpecialTier"); } - /** Get possible alignments of this controller + /** + * Get possible alignments of this controller * * @return List of alignments that are possible or denied */ @Override public IAlignmentLimits getAlignmentLimits() { // The nano forge should only be buildable upright - return IAlignmentLimits.Builder.allowAll() - .deny(ForgeDirection.DOWN) - .deny(ForgeDirection.UP) - .deny(Rotation.UPSIDE_DOWN) - .deny(Rotation.CLOCKWISE) - .deny(Rotation.COUNTER_CLOCKWISE) - .build(); + return IAlignmentLimits.Builder.allowAll().deny(ForgeDirection.DOWN).deny(ForgeDirection.UP) + .deny(Rotation.UPSIDE_DOWN).deny(Rotation.CLOCKWISE).deny(Rotation.COUNTER_CLOCKWISE).build(); } @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Nanite Fabricator") - .addInfo("Controller block for the Nano Forge") + tt.addMachineType("Nanite Fabricator").addInfo("Controller block for the Nano Forge") .addInfo("Requires insane amounts of power to create nanites. Each tier") .addInfo("the multi gains a new building next to it. The nanite in the") - .addInfo("controller slot controls the tier.") - .addInfo("--------------------------------------------") + .addInfo("controller slot controls the tier.").addInfo("--------------------------------------------") .addInfo("Requires a Carbon Nanite to use tier tier " + EnumChatFormatting.DARK_PURPLE + 1) .addInfo("Requires a Neutronium Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 2) .addInfo("Requires a Transcendent Metal Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 3) .addInfo("--------------------------------------------") .addInfo("If a recipe's tier is lower than the tier of the Nano Forge") .addInfo("it gains " + EnumChatFormatting.RED + "perfect overclock" + EnumChatFormatting.GRAY + ".") - .addInfo(AuthorBlueWeabo) - .addSeparator() - .beginStructureBlock(30, 38, 13, false) + .addInfo(AuthorBlueWeabo).addSeparator().beginStructureBlock(30, 38, 13, false) .addStructureInfo("Nano Forge Structure is too complex! See schematic for details.") .addStructureInfo("--------------------------------------------") .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.GRAY) @@ -423,21 +395,50 @@ public class GT_MetaTileEntity_NanoForge .addStructureInfo(EnumChatFormatting.GOLD + "84" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box") .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing") .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 + + "-" + + 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 + 1 + EnumChatFormatting.GRAY + "+" - + EnumChatFormatting.GRAY + " input hatches.") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 0 + EnumChatFormatting.GRAY + "+" - + EnumChatFormatting.GRAY + " output hatches.") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + "+" - + EnumChatFormatting.GRAY + " input busses.") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + "+" - + EnumChatFormatting.GRAY + " output busses.") - .addStructureInfo("--------------------------------------------") - .toolTipFinisher("GregTech"); + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + + 1 + + EnumChatFormatting.GRAY + + "+" + + EnumChatFormatting.GRAY + + " input hatches.") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + + 0 + + EnumChatFormatting.GRAY + + "+" + + EnumChatFormatting.GRAY + + " output hatches.") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + + 1 + + EnumChatFormatting.GRAY + + "+" + + EnumChatFormatting.GRAY + + " input busses.") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + + 1 + + EnumChatFormatting.GRAY + + "+" + + EnumChatFormatting.GRAY + + " output busses.") + .addStructureInfo("--------------------------------------------").toolTipFinisher("GregTech"); return tt; } @@ -445,6 +446,7 @@ public class GT_MetaTileEntity_NanoForge public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { mSeparate = !mSeparate; GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparate); + aPlayer, + StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparate); } } 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 3f64dd2e2a..becb1fcf47 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 @@ -10,10 +10,18 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_G import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GT_StructureUtility.*; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_HatchElement; import gregtech.api.enums.HeatingCoilLevel; @@ -28,69 +36,58 @@ 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.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; 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', - buildHatchAdder(GT_MetaTileEntity_OilCracker.class) - .atLeast( - GT_HatchElement.InputHatch.withAdder( - GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList), - GT_HatchElement.Energy, - GT_HatchElement.Maintenance) - .dot(2) - .casingIndex(CASING_INDEX) - .buildAndChain(onElementPass( + 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', + buildHatchAdder(GT_MetaTileEntity_OilCracker.class).atLeast( + GT_HatchElement.InputHatch + .withAdder(GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList), + GT_HatchElement.Energy, + GT_HatchElement.Maintenance).dot(2).casingIndex(CASING_INDEX).buildAndChain( + onElementPass( GT_MetaTileEntity_OilCracker::onCasingAdded, ofBlock(GregTech_API.sBlockCasings4, 1)))) - .addElement( - 'r', - buildHatchAdder(GT_MetaTileEntity_OilCracker.class) - .atLeast( - GT_HatchElement.OutputHatch.withAdder( - GT_MetaTileEntity_OilCracker::addRightHatchToMachineList), - GT_HatchElement.Energy, - GT_HatchElement.Maintenance) - .dot(3) - .casingIndex(CASING_INDEX) - .buildAndChain(onElementPass( + .addElement( + 'r', + buildHatchAdder(GT_MetaTileEntity_OilCracker.class).atLeast( + GT_HatchElement.OutputHatch + .withAdder(GT_MetaTileEntity_OilCracker::addRightHatchToMachineList), + GT_HatchElement.Energy, + GT_HatchElement.Maintenance).dot(3).casingIndex(CASING_INDEX).buildAndChain( + onElementPass( GT_MetaTileEntity_OilCracker::onCasingAdded, ofBlock(GregTech_API.sBlockCasings4, 1)))) - .addElement( - 'm', - buildHatchAdder(GT_MetaTileEntity_OilCracker.class) + .addElement( + 'm', + buildHatchAdder( + GT_MetaTileEntity_OilCracker.class) .atLeast( - GT_HatchElement.InputHatch.withAdder( + GT_HatchElement.InputHatch + .withAdder( GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList) .withCount(t -> t.mMiddleInputHatches.size()), GT_HatchElement.Energy, GT_HatchElement.Maintenance) - .dot(1) - .casingIndex(CASING_INDEX) - .buildAndChain(onElementPass( - GT_MetaTileEntity_OilCracker::onCasingAdded, - ofBlock(GregTech_API.sBlockCasings4, 1)))) - .build(); + .dot(1).casingIndex(CASING_INDEX).buildAndChain( + 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 @@ -109,68 +106,39 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Cracker") - .addInfo("Controller block for the Oil Cracking Unit") + tt.addMachineType("Cracker").addInfo("Controller block for the Oil Cracking Unit") .addInfo("Thermally cracks heavy hydrocarbons into lighter fractions") .addInfo("More efficient than the Chemical Reactor") .addInfo("Gives different benefits whether it hydro or steam-cracks:") .addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid") .addInfo("Steam - Outputs 50% more cracked fluid") .addInfo("(Values compared to cracking in the Chemical Reactor)") - .addInfo("Place the appropriate circuit in the controller") - .addSeparator() - .beginStructureBlock(5, 3, 3, true) - .addController("Front center") + .addInfo("Place the appropriate circuit in the controller").addSeparator() + .beginStructureBlock(5, 3, 3, true).addController("Front center") .addCasingInfo("Clean Stainless Steel Machine Casing", 18) .addOtherStructurePart("2 Rings of 8 Coils", "Each side of the controller") .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%") - .addEnergyHatch("Any casing", 1, 2, 3) - .addMaintenanceHatch("Any casing", 1, 2, 3) + .addEnergyHatch("Any casing", 1, 2, 3).addMaintenanceHatch("Any casing", 1, 2, 3) .addInputHatch("Steam/Hydrogen ONLY, Any middle ring casing", 1) - .addInputHatch("Any left/right side casing", 2, 3) - .addOutputHatch("Any right/left 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") - .toolTipFinisher("Gregtech"); + .addStructureHint("GT5U.cracker.io_side").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[] { - 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 @@ -185,13 +153,12 @@ 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; @@ -211,7 +178,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult 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; @@ -303,8 +270,7 @@ 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 + return checkPiece(STRUCTURE_PIECE_MAIN, 2, 1, 0) && mInputOnSide != -1 && mOutputOnSide != -1 && mCasingAmount >= 18 && mMaintenanceHatches.size() == 1 @@ -351,8 +317,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult if (tUsedMeta > 14) continue; if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) continue; - aBaseMetaTileEntity - .getWorld() + 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_OilDrill1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill1.java index 610c21e89b..1e37dcbac9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill1.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill1.java @@ -7,6 +7,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; public class GT_MetaTileEntity_OilDrill1 extends GT_MetaTileEntity_OilDrillBase { + public GT_MetaTileEntity_OilDrill1(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill2.java index 31fc763da7..10a64a6b1d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill2.java @@ -9,6 +9,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_OilDrill2 extends GT_MetaTileEntity_OilDrillBase { + public GT_MetaTileEntity_OilDrill2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill3.java index 303502e1ce..bcbe42d794 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill3.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill3.java @@ -9,6 +9,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_OilDrill3 extends GT_MetaTileEntity_OilDrillBase { + public GT_MetaTileEntity_OilDrill3(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } 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 72741573fd..dc56ffcb3f 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 @@ -10,18 +10,10 @@ import static gregtech.api.enums.Textures.BlockIcons.getCasingTextureForId; import static gregtech.common.GT_UndergroundOil.undergroundOil; import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; -import com.google.common.collect.ImmutableList; -import gregtech.api.interfaces.IHatchElement; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_ChunkManager; -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.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -33,7 +25,19 @@ import net.minecraft.world.chunk.Chunk; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import com.google.common.collect.ImmutableList; + +import gregtech.api.interfaces.IHatchElement; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_ChunkManager; +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; + public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_DrillerBase { + private final ArrayList<Chunk> mOilFieldChunks = new ArrayList<>(); private int mOilId = 0; private int mOilFlow = 0; @@ -49,41 +53,17 @@ 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[] { - getCasingTextureForId(casingTextureIndex), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_OIL_DRILL) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW) - .extFacing() - .glow() - .build() - }; + 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[] { 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 @@ -110,20 +90,15 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D .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 + .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") + .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) + .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1) .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1) - .addOutputHatch("Any base casing", 1) - .toolTipFinisher("Gregtech"); + .addOutputHatch("Any base casing", 1).toolTipFinisher("Gregtech"); return tt; } @@ -147,7 +122,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D if (oldChunkRange != chunkRangeConfig) mOilFieldChunks.clear(); GT_Utility.sendChatToPlayer( aPlayer, - StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + chunkRangeConfig + "x" + StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + + chunkRangeConfig + + "x" + chunkRangeConfig + StatCollector.translateToLocal("GT5U.machines.chunks")); // TODO Add translation support } @@ -170,10 +147,8 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D 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); + (workState == STATE_AT_BOTTOM ? (64 * (chunkRangeConfig * chunkRangeConfig)) >> (getMinTier() - 1) + : 120) >> tier); } protected float computeSpeed() { @@ -181,8 +156,8 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D } @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; @@ -202,7 +177,7 @@ 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}; + this.mOutputFluids = new FluidStack[] { tFluid }; return true; } } @@ -225,21 +200,22 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D 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. + 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++) { @@ -249,8 +225,7 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(xChunk + i, zChunk + j); tFluid = undergroundOilReadInformation(tChunk); if (debugDriller) { - GT_Log.out.println( - " Fluid in chunk = " + tFluid.getFluid().getID()); + GT_Log.out.println(" Fluid in chunk = " + tFluid.getFluid().getID()); } if (tOil.isFluidEqual(tFluid) && tFluid.amount > 0) { mOilFieldChunks.add(tChunk); @@ -280,8 +255,10 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D for (Chunk tChunk : mOilFieldChunks) { tFluid = undergroundOil(tChunk, speed); if (debugDriller) { - GT_Log.out.println(" chunkX = " + tChunk.getChunkCoordIntPair().chunkXPos + " chunkZ = " - + tChunk.getChunkCoordIntPair().chunkZPos); + GT_Log.out.println( + " chunkX = " + tChunk.getChunkCoordIntPair().chunkXPos + + " chunkZ = " + + tChunk.getChunkCoordIntPair().chunkZPos); if (tFluid != null) { GT_Log.out.println(" Fluid pumped = " + tFluid.amount); } else { @@ -300,18 +277,26 @@ 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 6fa7c00f0f..e54fcbbd28 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 @@ -2,15 +2,17 @@ package gregtech.common.tileentities.machines.multi; import static gregtech.api.enums.GT_Values.VN; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDrillBase { + public GT_MetaTileEntity_OilDrillInfinite(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -24,20 +26,15 @@ public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDri String casings = getCasingBlockItem().get(0).getDisplayName(); final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Pump") - .addInfo("Controller Block for the Infinite Oil/Gas/Fluid Drilling Rig ") - .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks") - .addSeparator() - .beginStructureBlock(3, 7, 3, false) - .addController("Front bottom") + tt.addMachineType("Pump").addInfo("Controller Block for the Infinite Oil/Gas/Fluid Drilling Rig ") + .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks").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) + .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1) .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1) - .addOutputHatch("Any base casing", 1) - .toolTipFinisher("Gregtech"); + .addOutputHatch("Any base casing", 1).toolTipFinisher("Gregtech"); return tt; } 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 859f826320..50edf8928a 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 @@ -7,6 +7,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; 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; 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 e178bdab83..6a80c96d26 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 @@ -7,6 +7,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; 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; 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 b8ac96a8a7..2bb25b2254 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 @@ -7,6 +7,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; 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; 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 e4a3da16ac..7ba26b9500 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 @@ -7,6 +7,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; 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; 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 80b3660eb3..1f5bdf690e 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 @@ -5,24 +5,12 @@ 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 com.google.common.collect.ImmutableList; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.IHatchElement; -import gregtech.api.objects.GT_ChunkManager; -import gregtech.api.objects.ItemData; -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 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 java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -34,7 +22,23 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; +import com.google.common.collect.ImmutableList; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.IHatchElement; +import gregtech.api.objects.GT_ChunkManager; +import gregtech.api.objects.ItemData; +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 gregtech.common.blocks.GT_Block_Ores_Abstract; +import gregtech.common.blocks.GT_TileEntity_Ores; + public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTileEntity_DrillerBase { + private final ArrayList<ChunkPosition> oreBlockPositions = new ArrayList<>(); protected int mTier = 1; private int chunkRadiusConfig = getRadiusInChunks(); @@ -82,21 +86,23 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile } GT_Utility.sendChatToPlayer( aPlayer, - StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + (chunkRadiusConfig << 4) + " " + 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) { + 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 @@ -152,12 +158,10 @@ 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() + getBaseMetaTileEntity().getWorld() .setBlock(x, y, z, Block.getBlockFromItem(cobble.getItem()), cobble.getItemDamage(), 3); } else { - getBaseMetaTileEntity() - .getWorld() + getBaseMetaTileEntity().getWorld() .setBlockToAir(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); } mOutputItems = getOutputByDrops(oreBlockDrops); @@ -166,8 +170,8 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile } @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); @@ -198,15 +202,16 @@ 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); + 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(); @@ -244,15 +249,14 @@ 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() + return !mMaintenanceHatches.isEmpty() && !mInputHatches.isEmpty() && !mOutputBusses.isEmpty() && !mEnergyHatches.isEmpty(); } @@ -268,9 +272,8 @@ 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); } @@ -282,8 +285,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; @@ -300,16 +303,14 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile private boolean doUseMaceratorRecipe(ItemStack currentItem) { 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; + 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; } private ItemStack multiplyStackSize(ItemStack itemStack) { @@ -355,9 +356,8 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile for (int z = startZ; z < (startZ + 16); ++z) tryAddOreBlockToMineList(x, yHead, z); } else { int radius = chunkRadiusConfig << 4; - for (int xOff = -radius; xOff <= radius; xOff++) - for (int zOff = -radius; zOff <= radius; zOff++) - tryAddOreBlockToMineList(xDrill + xOff, yHead, zDrill + zOff); + for (int xOff = -radius; xOff <= radius; xOff++) for (int zOff = -radius; zOff <= radius; zOff++) + tryAddOreBlockToMineList(xDrill + xOff, yHead, zDrill + zOff); } } @@ -390,18 +390,14 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile .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") + .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) + .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) + .addInputHatch("Drilling Fluid, any base casing", 1).addOutputBus("Any base casing", 1) .toolTipFinisher("Gregtech"); return tt; } @@ -410,11 +406,15 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile 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") - }; + 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_PCBFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java index 06969bb55b..fb16756d40 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java @@ -10,6 +10,18 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofFrame; +import java.util.ArrayList; + +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 net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import com.gtnewhorizon.structurelib.alignment.enumerable.Flip; @@ -30,6 +42,7 @@ import com.gtnewhorizons.modularui.common.widget.DynamicPositionedRow; import com.gtnewhorizons.modularui.common.widget.MultiChildWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -53,21 +66,11 @@ import gregtech.api.util.GT_ParallelHelper; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Casings8; -import java.util.ArrayList; -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 net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; @SuppressWarnings("SpellCheckingInspection") -public class GT_MetaTileEntity_PCBFactory - extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase<GT_MetaTileEntity_PCBFactory> - implements ISurvivalConstructable { +public class GT_MetaTileEntity_PCBFactory extends + GT_MetaTileEntity_ExtendedPowerMultiBlockBase<GT_MetaTileEntity_PCBFactory> implements ISurvivalConstructable { + private static final String tier1 = "tier1"; private static final String tier2 = "tier2"; private static final String tier3 = "tier3"; @@ -78,9 +81,8 @@ public class GT_MetaTileEntity_PCBFactory private float mRoughnessMultiplier = 1; private int mTier = 1, mSetTier = 1, mUpgradesInstalled = 0, mCurrentParallel = 0, mMaxParallel = 0; private boolean mBioUpgrade = false, mBioRotate = false, mOCTier1 = false, mOCTier2 = false; - private int[] mBioOffsets = new int[] {-5, -1}, - mOCTier1Offsets = new int[] {2, -11}, - mOCTier2Offsets = new int[] {2, -11}; + private int[] mBioOffsets = new int[] { -5, -1 }, mOCTier1Offsets = new int[] { 2, -11 }, + mOCTier2Offsets = new int[] { 2, -11 }; private GT_MetaTileEntity_Hatch_Input mCoolantInputHatch; private static final int mBioRotateBitMap = 0b1000000; private static final int mOCTier2BitMap = 0b100000; @@ -90,10 +92,12 @@ public class GT_MetaTileEntity_PCBFactory private static final int mTier2BitMap = 0b10; private static final int mTier1BitMap = 0b1; private static final int COOLANT_CONSUMED_PER_SEC = 10; - private static final IStructureDefinition<GT_MetaTileEntity_PCBFactory> STRUCTURE_DEFINITION = - StructureDefinition.<GT_MetaTileEntity_PCBFactory>builder() - .addShape(tier1, transpose(new String[][] { - // spotless:off + private static final IStructureDefinition<GT_MetaTileEntity_PCBFactory> STRUCTURE_DEFINITION = StructureDefinition + .<GT_MetaTileEntity_PCBFactory>builder().addShape( + tier1, + transpose( + new String[][] { + // spotless:off {" ","E E","E E","EEEEEEE","E E","E E"," "}, {"EEEEEEE","CAAAAAC","CAAAAAC","CCCCCCC","CCCCCCC","CCCCCCC","E E"}, {"EAAAAAE","C-----C","C-----C","C-----C","C-----C","C-----C","ECCCCCE"}, @@ -101,9 +105,11 @@ public class GT_MetaTileEntity_PCBFactory {"EAAAAAE","C-----C","B-FFF-B","B-FFF-B","B-FFF-B","C-----C","EPPPPPE"}, {"ECC~CCE","CDDDDDC","CDDDDDC","CDDDDDC","CDDDDDC","CDDDDDC","EPPPPPE"} //spotless:on - })) - .addShape(tier2, transpose(new String[][] { - // spotless:off + })).addShape( + tier2, + transpose( + new String[][] { + // spotless:off {" "," "," ","HGGH","HGGH","HGGH","HGGH","HGGH"," "," "," "}, {" "," ","HGGH","GGGG","GGGG","GGGG","GGGG","GGGG","HGGH"," "," "}, {" ","HGGH","GGGG","G G","G G","G G","G G","G G","GGGG","HGGH"," "}, @@ -112,9 +118,11 @@ public class GT_MetaTileEntity_PCBFactory {"HGGH","G G","G G","G G","G G","G G","G G","G G","G G","G G","HGGH"}, {"HGGH","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","HGGH"} //spotless:on - })) - .addShape(tier3, transpose(new String[][] { - // spotless:off + })).addShape( + tier3, + transpose( + new String[][] { + // spotless:off {" "," "," "," "," I "," I "," "," "," "," "}, {" "," "," "," I "," I "," I "," I "," "," "," "}, {" "," "," KKK "," KIK "," K K "," K K "," I "," "," "," "}, @@ -138,9 +146,11 @@ public class GT_MetaTileEntity_PCBFactory {" "," III "," I I "," I I "," I I "," I I "," I I "," I I "," III "," "}, {" II~II ","IIJJJII","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IIJJJII"," IIIII "} //spotless:on - })) - .addShape(bioUpgrade, transpose(new String[][] { - // spotless:off + })).addShape( + bioUpgrade, + transpose( + new String[][] { + // spotless:off {" "," "," LLLLLL "," "," "}, {" "," "," L L "," "," "}, {"E E E E"," LLL LLL "," LLL LLL "," LLL LLL ","E E E E"}, @@ -149,9 +159,12 @@ public class GT_MetaTileEntity_PCBFactory {"EAAAE EAAAE","A A A A","A A A A","A A A A","EAAAE EAAAE"}, {"ELLLE ELLLE","LLLLL LLLLL","LLLLL LLLLL","LLLLL LLLLL","ELLLE ELLLE"} //spotless:on - })) - .addShape(ocTier1Upgrade, transpose(new String[][] { - // spotless:off + })) + .addShape( + ocTier1Upgrade, + transpose( + new String[][] { + // spotless:off {"EKKKE","K K","K K","K K","EKKKE"}, {"E E"," KKK "," K K "," KKK ","E E"}, {"E E"," NNN "," N N "," NNN ","E E"}, @@ -163,9 +176,11 @@ public class GT_MetaTileEntity_PCBFactory {"ENNNE","NKKKN","NK KN","NKKKN","ENNNE"}, {"EGGGE","GGGGG","GGMGG","GGGGG","EGGGE"} //spotless:on - })) - .addShape(ocTier2Upgrade, transpose(new String[][] { - // spotless:off + })).addShape( + ocTier2Upgrade, + transpose( + new String[][] { + // spotless:off {"RGGGR","G G","G G","G G","RGGGR"}, {"R R"," GGG "," GTG "," GGG ","R R"}, {"R R"," NNN "," NTN "," NNN ","R R"}, @@ -177,61 +192,50 @@ public class GT_MetaTileEntity_PCBFactory {"RNNNR","NQQQN","NQTQN","NQQQN","RNNNR"}, {"RGGGR","GGGGG","GGSGG","GGGGG","RGGGR"} //spotless:on - })) - .addElement('E', ofFrame(Materials.DamascusSteel)) - .addElement('C', ofBlock(GregTech_API.sBlockCasings8, 11)) - .addElement('D', ofBlock(GregTech_API.sBlockReinforced, 2)) - .addElement( - 'A', - ofChain( - ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true), - // warded glass - ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false))) - .addElement('B', ofBlock(GregTech_API.sBlockCasings3, 10)) - .addElement('F', ofFrame(Materials.VibrantAlloy)) - .addElement( - 'P', - buildHatchAdder(GT_MetaTileEntity_PCBFactory.class) - .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)) - .dot(1) - .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11)) - .buildAndChain(GregTech_API.sBlockCasings8, 11)) - .addElement('H', ofFrame(Materials.Duranium)) - .addElement('G', ofBlock(GregTech_API.sBlockCasings8, 12)) - .addElement('I', ofBlock(GregTech_API.sBlockCasings8, 13)) - .addElement('K', ofBlock(GregTech_API.sBlockCasings8, 10)) - .addElement( - 'J', - buildHatchAdder(GT_MetaTileEntity_PCBFactory.class) - .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)) - .dot(1) - .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13)) - .buildAndChain(GregTech_API.sBlockCasings8, 13)) - .addElement('L', ofBlock(GregTech_API.sBlockCasings4, 1)) - .addElement( - 'M', - buildHatchAdder(GT_MetaTileEntity_PCBFactory.class) - .hatchClass(GT_MetaTileEntity_Hatch_Input.class) - .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList) - .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)) - .dot(2) - .buildAndChain(GregTech_API.sBlockCasings8, 12)) - .addElement('N', ofBlock(GregTech_API.sBlockCasings2, 15)) - .addElement('O', ofBlock(GregTech_API.sBlockCasings8, 4)) - .addElement( - 'S', - buildHatchAdder(GT_MetaTileEntity_PCBFactory.class) - .hatchClass(GT_MetaTileEntity_Hatch_Input.class) - .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList) - .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)) - .dot(2) - .buildAndChain(GregTech_API.sBlockCasings8, 12)) - .addElement('R', ofFrame(Materials.Americium)) - .addElement('Q', ofBlock(GregTech_API.sBlockCasings8, 14)) - .addElement('T', ofBlock(GregTech_API.sBlockCasings1, 15)) - .build(); + })).addElement('E', ofFrame(Materials.DamascusSteel)) + .addElement('C', ofBlock(GregTech_API.sBlockCasings8, 11)) + .addElement('D', ofBlock(GregTech_API.sBlockReinforced, 2)) + .addElement( + 'A', + ofChain( + ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true), + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true), + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true), + // warded glass + ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false))) + .addElement('B', ofBlock(GregTech_API.sBlockCasings3, 10)).addElement('F', ofFrame(Materials.VibrantAlloy)) + .addElement( + 'P', + buildHatchAdder(GT_MetaTileEntity_PCBFactory.class) + .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1) + .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11)) + .buildAndChain(GregTech_API.sBlockCasings8, 11)) + .addElement('H', ofFrame(Materials.Duranium)).addElement('G', ofBlock(GregTech_API.sBlockCasings8, 12)) + .addElement('I', ofBlock(GregTech_API.sBlockCasings8, 13)) + .addElement('K', ofBlock(GregTech_API.sBlockCasings8, 10)) + .addElement( + 'J', + buildHatchAdder(GT_MetaTileEntity_PCBFactory.class) + .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1) + .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13)) + .buildAndChain(GregTech_API.sBlockCasings8, 13)) + .addElement('L', ofBlock(GregTech_API.sBlockCasings4, 1)) + .addElement( + 'M', + buildHatchAdder(GT_MetaTileEntity_PCBFactory.class).hatchClass(GT_MetaTileEntity_Hatch_Input.class) + .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList) + .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)).dot(2) + .buildAndChain(GregTech_API.sBlockCasings8, 12)) + .addElement('N', ofBlock(GregTech_API.sBlockCasings2, 15)) + .addElement('O', ofBlock(GregTech_API.sBlockCasings8, 4)) + .addElement( + 'S', + buildHatchAdder(GT_MetaTileEntity_PCBFactory.class).hatchClass(GT_MetaTileEntity_Hatch_Input.class) + .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList) + .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)).dot(2) + .buildAndChain(GregTech_API.sBlockCasings8, 12)) + .addElement('R', ofFrame(Materials.Americium)).addElement('Q', ofBlock(GregTech_API.sBlockCasings8, 14)) + .addElement('T', ofBlock(GregTech_API.sBlockCasings1, 15)).build(); @Override public void construct(ItemStack stackSize, boolean hintsOnly) { @@ -247,20 +251,19 @@ public class GT_MetaTileEntity_PCBFactory if (mBioUpgrade) { if (mBioRotate) { final IGregTechTileEntity tTile = getBaseMetaTileEntity(); - getStructureDefinition() - .buildOrHints( - this, - stackSize, - bioUpgrade, - tTile.getWorld(), - transformFacing(getExtendedFacing()), - tTile.getXCoord(), - tTile.getYCoord(), - tTile.getZCoord(), - mBioOffsets[1], - 6, - mBioOffsets[0], - hintsOnly); + getStructureDefinition().buildOrHints( + this, + stackSize, + bioUpgrade, + tTile.getWorld(), + transformFacing(getExtendedFacing()), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + mBioOffsets[1], + 6, + mBioOffsets[0], + hintsOnly); } else { buildPiece(bioUpgrade, stackSize, hintsOnly, mBioOffsets[0], 6, mBioOffsets[1]); } @@ -290,25 +293,32 @@ public class GT_MetaTileEntity_PCBFactory if (mBioUpgrade) { if (mBioRotate) { final IGregTechTileEntity tTile = getBaseMetaTileEntity(); - getStructureDefinition() - .survivalBuild( - this, - stackSize, - bioUpgrade, - tTile.getWorld(), - transformFacing(getExtendedFacing()), - tTile.getXCoord(), - tTile.getYCoord(), - tTile.getZCoord(), - mBioOffsets[1], - 6, - mBioOffsets[0], - elementBudget, - env, - false); + getStructureDefinition().survivalBuild( + this, + stackSize, + bioUpgrade, + tTile.getWorld(), + transformFacing(getExtendedFacing()), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + mBioOffsets[1], + 6, + mBioOffsets[0], + elementBudget, + env, + false); } else { built += survivialBuildPiece( - bioUpgrade, stackSize, mBioOffsets[0], 6, mBioOffsets[1], elementBudget, env, false, true); + bioUpgrade, + stackSize, + mBioOffsets[0], + 6, + mBioOffsets[1], + elementBudget, + env, + false, + true); } } @@ -354,52 +364,26 @@ public class GT_MetaTileEntity_PCBFactory } @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( - getTier() < 3 - ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11) + getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11) : GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW) - .extFacing() - .glow() - .build() - }; + 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.getCasingTextureForId( - getTier() < 3 - ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11) - : GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW) - .extFacing() - .glow() - .build() - }; + BlockIcons.getCasingTextureForId( + getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11) + : GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() }; } - return new ITexture[] { - BlockIcons.getCasingTextureForId( - mSetTier < 3 - ? ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11) - : ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13)) - }; + return new ITexture[] { BlockIcons.getCasingTextureForId( + mSetTier < 3 ? ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11) + : ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13)) }; } @Override @@ -434,19 +418,18 @@ public class GT_MetaTileEntity_PCBFactory if (mBioUpgrade) { if (mBioRotate) { final IGregTechTileEntity tTile = getBaseMetaTileEntity(); - if (!getStructureDefinition() - .check( - this, - bioUpgrade, - tTile.getWorld(), - transformFacing(getExtendedFacing()), - tTile.getXCoord(), - tTile.getYCoord(), - tTile.getZCoord(), - mBioOffsets[1], - 6, - mBioOffsets[0], - !mMachine)) { + if (!getStructureDefinition().check( + this, + bioUpgrade, + tTile.getWorld(), + transformFacing(getExtendedFacing()), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + mBioOffsets[1], + 6, + mBioOffsets[0], + !mMachine)) { return false; } } else { @@ -479,8 +462,7 @@ public class GT_MetaTileEntity_PCBFactory getBaseMetaTileEntity().sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, getUpdateData()); - if (mMaintenanceHatches.size() != 1 - || mOutputBusses.isEmpty() + if (mMaintenanceHatches.size() != 1 || mOutputBusses.isEmpty() || mInputBusses.isEmpty() || mInputHatches.isEmpty()) { return false; @@ -521,8 +503,8 @@ public class GT_MetaTileEntity_PCBFactory return false; } - private boolean processRecipe( - ItemStack aStack, ItemStack[] aItemInputs, FluidStack[] aFluidInputs, GT_Recipe.GT_Recipe_Map aMap) { + private boolean processRecipe(ItemStack aStack, ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + GT_Recipe.GT_Recipe_Map aMap) { mOutputItems = null; mOutputFluids = null; if (aItemInputs == null || aFluidInputs == null) { @@ -533,8 +515,8 @@ public class GT_MetaTileEntity_PCBFactory long amps = getMaxInputAmps(); int tier = GT_Utility.getTier(voltage); - GT_Recipe tRecipe = - aMap.findRecipe(getBaseMetaTileEntity(), null, true, false, V[tier], aFluidInputs, aStack, aItemInputs); + GT_Recipe tRecipe = aMap + .findRecipe(getBaseMetaTileEntity(), null, true, false, V[tier], aFluidInputs, aStack, aItemInputs); if (tRecipe == null) { return false; @@ -562,20 +544,14 @@ public class GT_MetaTileEntity_PCBFactory } boolean recipeAllowed = (((recipeBitMap & mTier1BitMap) == mTier1BitMap && (mTier >= 1)) - || ((recipeBitMap & mTier2BitMap) == mTier2BitMap && (mTier >= 2)) - || ((recipeBitMap & mTier3BitMap) == mTier3BitMap && (mTier >= 3))) + || ((recipeBitMap & mTier2BitMap) == mTier2BitMap && (mTier >= 2)) + || ((recipeBitMap & mTier3BitMap) == mTier3BitMap && (mTier >= 3))) && ((recipeBitMap & mBioBitMap) == 0 || ((recipeBitMap & mBioBitMap) == mBioBitMap && mBioUpgrade)); if (recipeAllowed) { - GT_ParallelHelper helper = new GT_ParallelHelper() - .setRecipe(tRecipe) - .setItemInputs(aItemInputs) - .setFluidInputs(aFluidInputs) - .setMaxParallel(aMaxParallel) - .setAvailableEUt(getMaxInputEu()) - .setEUtModifier(aExtraPower) - .enableConsumption() - .build(); + GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs) + .setFluidInputs(aFluidInputs).setMaxParallel(aMaxParallel).setAvailableEUt(getMaxInputEu()) + .setEUtModifier(aExtraPower).enableConsumption().build(); mCurrentParallel = helper.getCurrentParallel(); if (mCurrentParallel > 0) { @@ -585,13 +561,9 @@ public class GT_MetaTileEntity_PCBFactory this.mMaxProgresstime = (int) Math.ceil(tRecipe.mDuration * Math.pow(mRoughnessMultiplier, 2)); if (mOCTier1 || mOCTier2) { - GT_OverclockCalculator calc = new GT_OverclockCalculator() - .setRecipeEUt(tRecipe.mEUt) - .setDuration(tRecipe.mDuration) - .setEUt(voltage) - .setAmperage(amps) - .setEUtDiscount(aExtraPower) - .setSpeedBoost((float) Math.pow(mRoughnessMultiplier, 2)); + GT_OverclockCalculator calc = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt) + .setDuration(tRecipe.mDuration).setEUt(voltage).setAmperage(amps) + .setEUtDiscount(aExtraPower).setSpeedBoost((float) Math.pow(mRoughnessMultiplier, 2)); if (mOCTier2) { calc.enablePerfectOC(); } @@ -755,8 +727,7 @@ public class GT_MetaTileEntity_PCBFactory break; } } else if (curRotation == Rotation.CLOCKWISE || curRotation == Rotation.COUNTER_CLOCKWISE) { - newFlip = curRotation == Rotation.CLOCKWISE - ? curFlip == Flip.NONE ? Flip.NONE : Flip.HORIZONTAL + newFlip = curRotation == Rotation.CLOCKWISE ? curFlip == Flip.NONE ? Flip.NONE : Flip.HORIZONTAL : curFlip != Flip.NONE ? Flip.NONE : Flip.HORIZONTAL; newDirection = curRotation == Rotation.CLOCKWISE ? ForgeDirection.UP : ForgeDirection.DOWN; } else { @@ -806,8 +777,8 @@ public class GT_MetaTileEntity_PCBFactory } @Override - protected void calculateOverclockedNessMultiInternal( - long aEUt, int aDuration, int mAmperage, long maxInputVoltage, boolean perfectOC) { + protected void calculateOverclockedNessMultiInternal(long aEUt, int aDuration, int mAmperage, long maxInputVoltage, + boolean perfectOC) { int hatches = Math.max(getExoticEnergyHatches().size(), 1); long zMaxInputVoltage = maxInputVoltage; long zTime = aDuration; @@ -853,7 +824,8 @@ public class GT_MetaTileEntity_PCBFactory public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { mSeparate = !mSeparate; GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparate); + aPlayer, + StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparate); } @Override @@ -877,42 +849,73 @@ public class GT_MetaTileEntity_PCBFactory long amps = getMaxInputAmps(); 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(getActualEnergyUsage()) + EnumChatFormatting.RESET + " EU/t", - /* 4*/ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(voltage) + EnumChatFormatting.RESET + " EU/t(*" + amps + " A)" - + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " + EnumChatFormatting.YELLOW - + VN[GT_Utility.getTier(voltage)] + 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 + " %", - /* 7*/ StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " + EnumChatFormatting.GREEN - + mMaxParallel, - /* 8*/ StatCollector.translateToLocal("GT5U.multiblock.curparallelism") + ": " + EnumChatFormatting.GREEN - + mCurrentParallel - }; + /* 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(getActualEnergyUsage()) + + EnumChatFormatting.RESET + + " EU/t", + /* 4 */ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(voltage) + + EnumChatFormatting.RESET + + " EU/t(*" + + amps + + " A)" + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier(voltage)] + + 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 + + " %", + /* 7 */ StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " + + EnumChatFormatting.GREEN + + mMaxParallel, + /* 8 */ StatCollector.translateToLocal("GT5U.multiblock.curparallelism") + ": " + + EnumChatFormatting.GREEN + + mCurrentParallel }; } @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Circuit Board Fabricator") - .addInfo("Controller for the PCB Factory") - .addInfo(EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD + "IMPORTANT!" - + " Check the configuration menu before building.") + tt.addMachineType("Circuit Board Fabricator").addInfo("Controller for the PCB Factory") + .addInfo( + EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD + + "IMPORTANT!" + + " Check the configuration menu before building.") .addInfo("Tier of the machine determines the available recipes.") .addInfo("Machine tier (1-3) is set in the controller GUI.") .addInfo("The configuration menu can be used to add upgrades.") @@ -925,46 +928,74 @@ public class GT_MetaTileEntity_PCBFactory .addInfo("Liquid Cooling uses 10 L/s of distilled water and enables default overclocks.") .addInfo("Thermosink uses 10 L/s of Space Coolant and enables perfect overclocks.") .addInfo("Trace size can be changed to modify the material usage and machine speed.") - .addInfo(AuthorBlueWeabo) - .beginStructureBlock(30, 38, 13, false) - .addSeparator() + .addInfo(AuthorBlueWeabo).beginStructureBlock(30, 38, 13, false).addSeparator() .addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1) .addEnergyHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1) .addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1) .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1) .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1) - .addStructureInfo("Coolant Hatch (Input Hatch): " + EnumChatFormatting.GOLD + "1" - + EnumChatFormatting.GRAY + "Center of the Liquid Cooling/Thermosink") - .addStructureInfo(EnumChatFormatting.BLUE + "Base Multi (Tier " + EnumChatFormatting.DARK_PURPLE + 1 - + EnumChatFormatting.BLUE + "):") + .addStructureInfo( + "Coolant Hatch (Input Hatch): " + EnumChatFormatting.GOLD + + "1" + + EnumChatFormatting.GRAY + + "Center of the Liquid Cooling/Thermosink") + .addStructureInfo( + EnumChatFormatting.BLUE + "Base Multi (Tier " + + EnumChatFormatting.DARK_PURPLE + + 1 + + EnumChatFormatting.BLUE + + "):") .addStructureInfo( EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box") .addStructureInfo(EnumChatFormatting.GOLD + "9" + EnumChatFormatting.GRAY + " Vibrant Alloy Frame Box") .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Reinforced Glass") - .addStructureInfo(EnumChatFormatting.GOLD + "77" + EnumChatFormatting.GRAY - + " Basic Photolithography Framework Casing") + .addStructureInfo( + EnumChatFormatting.GOLD + "77" + + EnumChatFormatting.GRAY + + " Basic Photolithography Framework Casing") .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Grate Machine Casing") .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Plascrete Block") - .addStructureInfo(EnumChatFormatting.BLUE + "Tier " + EnumChatFormatting.DARK_PURPLE + 2 - + EnumChatFormatting.BLUE + " (Adds to Tier " + EnumChatFormatting.DARK_PURPLE + 1 - + EnumChatFormatting.BLUE + "):") + .addStructureInfo( + EnumChatFormatting.BLUE + "Tier " + + EnumChatFormatting.DARK_PURPLE + + 2 + + EnumChatFormatting.BLUE + + " (Adds to Tier " + + EnumChatFormatting.DARK_PURPLE + + 1 + + EnumChatFormatting.BLUE + + "):") .addStructureInfo(EnumChatFormatting.GOLD + "34" + EnumChatFormatting.GRAY + " Duranium Frame Box") - .addStructureInfo(EnumChatFormatting.GOLD + "158" + EnumChatFormatting.GRAY - + " Reinforced Photolithography Framework Casing") - .addStructureInfo(EnumChatFormatting.BLUE + "Tier " + EnumChatFormatting.DARK_PURPLE + 3 - + EnumChatFormatting.BLUE + ":") - .addStructureInfo(EnumChatFormatting.GOLD + "292" + EnumChatFormatting.GRAY - + " Radiation Proof Photolithography Framework Casing") + .addStructureInfo( + EnumChatFormatting.GOLD + "158" + + EnumChatFormatting.GRAY + + " Reinforced Photolithography Framework Casing") + .addStructureInfo( + EnumChatFormatting.BLUE + "Tier " + + EnumChatFormatting.DARK_PURPLE + + 3 + + EnumChatFormatting.BLUE + + ":") + .addStructureInfo( + EnumChatFormatting.GOLD + "292" + + EnumChatFormatting.GRAY + + " Radiation Proof Photolithography Framework Casing") .addStructureInfo( EnumChatFormatting.GOLD + "76" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing") .addStructureInfo(EnumChatFormatting.BLUE + "Biochamber Upgrade") - .addStructureInfo(EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY - + " Clean Stainless Steel Machine Casing") + .addStructureInfo( + EnumChatFormatting.GOLD + "68" + + EnumChatFormatting.GRAY + + " Clean Stainless Steel Machine Casing") .addStructureInfo( EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box") .addStructureInfo(EnumChatFormatting.GOLD + "72" + EnumChatFormatting.GRAY + " Reinforced Glass") - .addStructureInfo(EnumChatFormatting.BLUE + "Liquid Cooling Tower (Tier " - + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.BLUE + "):") + .addStructureInfo( + EnumChatFormatting.BLUE + "Liquid Cooling Tower (Tier " + + EnumChatFormatting.DARK_PURPLE + + 1 + + EnumChatFormatting.BLUE + + "):") .addStructureInfo( EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box") .addStructureInfo( @@ -973,13 +1004,21 @@ public class GT_MetaTileEntity_PCBFactory EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Extreme Engine Intake Casing") .addStructureInfo( EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing") - .addStructureInfo(EnumChatFormatting.GOLD + "21" + EnumChatFormatting.GRAY - + " Reinforced Photolithography Framework Casing") - .addStructureInfo(EnumChatFormatting.BLUE + "Thermosink Radiator(Tier " + EnumChatFormatting.DARK_PURPLE - + 2 + EnumChatFormatting.BLUE + "):") + .addStructureInfo( + EnumChatFormatting.GOLD + "21" + + EnumChatFormatting.GRAY + + " Reinforced Photolithography Framework Casing") + .addStructureInfo( + EnumChatFormatting.BLUE + "Thermosink Radiator(Tier " + + EnumChatFormatting.DARK_PURPLE + + 2 + + EnumChatFormatting.BLUE + + "):") .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Americium Frame Box") - .addStructureInfo(EnumChatFormatting.GOLD + "41" + EnumChatFormatting.GRAY - + " Reinforced Photolithography Framework Casing") + .addStructureInfo( + EnumChatFormatting.GOLD + "41" + + EnumChatFormatting.GRAY + + " Reinforced Photolithography Framework Casing") .addStructureInfo( EnumChatFormatting.GOLD + "8" + EnumChatFormatting.GRAY + " Superconducting Coil Block") .addStructureInfo( @@ -1069,100 +1108,85 @@ public class GT_MetaTileEntity_PCBFactory public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { super.addUIWidgets(builder, buildContext); buildContext.addSyncedWindow(10, this::createConfigurationWindow); - builder.widget(new ButtonWidget() - .setOnClick((clickData, widget) -> { - if (!widget.isClient()) widget.getContext().openSyncedWindow(10); - }) - .setSize(18, 18) - .setBackground(GT_UITextures.BUTTON_STANDARD) - .setBackground(GT_UITextures.OVERLAY_BUTTON_CYCLIC) - .addTooltip("Configuration Menu") + builder.widget( + new ButtonWidget().setOnClick( + (clickData, widget) -> { if (!widget.isClient()) widget.getContext().openSyncedWindow(10); }) + .setSize(18, 18).setBackground(GT_UITextures.BUTTON_STANDARD) + .setBackground(GT_UITextures.OVERLAY_BUTTON_CYCLIC).addTooltip("Configuration Menu") .setPos(151, 24)) - .widget(new TextWidget(new Text("Tier")) - .setTextAlignment(Alignment.Center) - .setScale(0.91f) - .setSize(20, 16) - .setPos(152, 46)) - .widget(new TextFieldWidget() - .setGetterInt(() -> mSetTier) - .setSetterInt(val -> { - mSetTier = val; - }) - .setNumbers(1, 3) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("PCB Factory Tier") - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) - .setSize(18, 18) - .setPos(151, 61)); + .widget( + new TextWidget(new Text("Tier")).setTextAlignment(Alignment.Center).setScale(0.91f) + .setSize(20, 16).setPos(152, 46)) + .widget( + new TextFieldWidget().setGetterInt(() -> mSetTier).setSetterInt(val -> { mSetTier = val; }) + .setNumbers(1, 3).setTextColor(Color.WHITE.normal).setTextAlignment(Alignment.Center) + .addTooltip("PCB Factory Tier").setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setSize(18, 18).setPos(151, 61)); } protected ModularWindow createConfigurationWindow(final EntityPlayer player) { ModularWindow.Builder builder = ModularWindow.builder(200, 160); builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) - .setPos(5, 5) - .setSize(16, 16)) + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC).setPos(5, 5).setSize(16, 16)) .widget(new TextWidget("Configuration Menu").setPos(25, 9)) .widget(ButtonWidget.closeWindowButton(true).setPos(185, 3)) - .widget(new DynamicPositionedColumn() - .setSynced(false) - .widget(new MultiChildWidget() - .addChild( - new CycleButtonWidget() - .setToggle(() -> mBioUpgrade, val -> { + .widget( + new DynamicPositionedColumn().setSynced(false) + .widget( + new MultiChildWidget() + .addChild(new CycleButtonWidget().setToggle(() -> mBioUpgrade, val -> { mBioUpgrade = val; if (!mBioUpgrade) { GT_Utility.sendChatToPlayer( player, - GT_Utility.trans( - "339.1", "Biochamber Upgrade Disabled")); + GT_Utility + .trans("339.1", "Biochamber Upgrade Disabled")); } else { GT_Utility.sendChatToPlayer( player, GT_Utility.trans("339", "Biochamber Upgrade Enabled")); } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setSize(90, 18) - .addTooltip( - "Enables nanites to construct organic circuitry. Required for Bioware and Wetware boards.")) - .addChild(new DrawableWidget() - .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) - .setSize(18, 18)) - .addChild(new TextWidget("Biochamber") - .setTextAlignment(Alignment.Center) - .setPos(23, 5)) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new MultiChildWidget() - .addChild(new CycleButtonWidget() - .setToggle(() -> mBioRotate, val -> { - mBioRotate = val; - if (!mBioRotate) { - GT_Utility.sendChatToPlayer( - player, - GT_Utility.trans("340.1", "Rotated biochamber disabled")); - } else { - GT_Utility.sendChatToPlayer( - player, GT_Utility.trans("340", "Rotated biochamber enabled")); - } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setSize(90, 18) - .addTooltip("Rotates the biochamber by 90 degrees.")) - .addChild(new DrawableWidget() - .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) - .setSize(18, 18)) - .addChild(new TextWidget("Bio Rotation") - .setTextAlignment(Alignment.Center) - .setPos(23, 5)) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new MultiChildWidget() - .addChild( - new CycleButtonWidget() - .setToggle(() -> mOCTier1, val -> { + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setSize(90, 18).addTooltip( + "Enables nanites to construct organic circuitry. Required for Bioware and Wetware boards.")) + .addChild( + new DrawableWidget() + .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) + .setSize(18, 18)) + .addChild( + new TextWidget("Biochamber").setTextAlignment(Alignment.Center) + .setPos(23, 5)) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new MultiChildWidget() + .addChild(new CycleButtonWidget().setToggle(() -> mBioRotate, val -> { + mBioRotate = val; + if (!mBioRotate) { + GT_Utility.sendChatToPlayer( + player, + GT_Utility + .trans("340.1", "Rotated biochamber disabled")); + } else { + GT_Utility.sendChatToPlayer( + player, + GT_Utility.trans("340", "Rotated biochamber enabled")); + } + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setSize(90, 18) + .addTooltip("Rotates the biochamber by 90 degrees.")) + .addChild( + new DrawableWidget() + .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) + .setSize(18, 18)) + .addChild( + new TextWidget("Bio Rotation") + .setTextAlignment(Alignment.Center).setPos(23, 5)) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new MultiChildWidget() + .addChild(new CycleButtonWidget().setToggle(() -> mOCTier1, val -> { mOCTier1 = val; if (!mOCTier1) { GT_Utility.sendChatToPlayer( @@ -1173,22 +1197,20 @@ public class GT_MetaTileEntity_PCBFactory player, GT_Utility.trans("341", "Tier 1 cooling enabled")); } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setSize(90, 18) - .addTooltip( - "Allows for overclocking. Requires 10 L/s of distilled water. Cooling upgrades are mutually exclusive.")) - .addChild(new DrawableWidget() - .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) - .setSize(18, 18)) - .addChild(new TextWidget("Liquid Cooling") - .setTextAlignment(Alignment.Center) - .setPos(20, 5)) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new MultiChildWidget() - .addChild( - new CycleButtonWidget() - .setToggle(() -> mOCTier2, val -> { + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setSize(90, 18).addTooltip( + "Allows for overclocking. Requires 10 L/s of distilled water. Cooling upgrades are mutually exclusive.")) + .addChild( + new DrawableWidget() + .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) + .setSize(18, 18)) + .addChild( + new TextWidget("Liquid Cooling") + .setTextAlignment(Alignment.Center).setPos(20, 5)) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new MultiChildWidget() + .addChild(new CycleButtonWidget().setToggle(() -> mOCTier2, val -> { mOCTier2 = val; if (!mOCTier2) { GT_Utility.sendChatToPlayer( @@ -1199,128 +1221,100 @@ public class GT_MetaTileEntity_PCBFactory player, GT_Utility.trans("342", "Tier 2 cooling enabled")); } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setSize(90, 18) + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setSize(90, 18).addTooltip( + "Enables perfect overclocking by allowing nanites to work with extreme speed and efficiency. Uses 10 L/s of space coolant.")) + .addChild( + new DrawableWidget() + .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) + .setSize(18, 18)) + .addChild( + new TextWidget("Thermosink").setTextAlignment(Alignment.Center) + .setPos(20, 5)) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new TextWidget(new Text("Trace Size")).setSize(90, 18) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive()).setPos(0, 4)) + .widget( + new TextFieldWidget() + .setGetterInt(() -> (int) ((1f / mRoughnessMultiplier) * 100f)) + .setSetterInt(val -> { mRoughnessMultiplier = 100f / val; }) + .setNumbers(50, 200).setTextColor(Color.WHITE.normal) + .setTextAlignment(Alignment.Center) + .addTooltip( + "Set the trace size. Smaller traces allow material savings but take longer to fabricate. Larger traces waste material but are fast. 50-200 μm.") + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD).setSize(90, 16)) + .widget( + new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CROSS) + .setSize(18, 18) .addTooltip( - "Enables perfect overclocking by allowing nanites to work with extreme speed and efficiency. Uses 10 L/s of space coolant.")) - .addChild(new DrawableWidget() - .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC) - .setSize(18, 18)) - .addChild(new TextWidget("Thermosink") - .setTextAlignment(Alignment.Center) - .setPos(20, 5)) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new TextWidget(new Text("Trace Size")) - .setSize(90, 18) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive()) - .setPos(0, 4)) - .widget(new TextFieldWidget() - .setGetterInt(() -> (int) ((1f / mRoughnessMultiplier) * 100f)) - .setSetterInt(val -> { - mRoughnessMultiplier = 100f / val; - }) - .setNumbers(50, 200) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip( - "Set the trace size. Smaller traces allow material savings but take longer to fabricate. Larger traces waste material but are fast. 50-200 μm.") - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) - .setSize(90, 16)) - .widget(new DrawableWidget() - .setDrawable(GT_UITextures.OVERLAY_BUTTON_CROSS) - .setSize(18, 18) - .addTooltip( - new Text("Can't change configuration when running !").color(Color.RED.dark(3))) - .setEnabled(widget -> getBaseMetaTileEntity().isActive())) - .setPos(10, 25)) - .widget(new DynamicPositionedColumn() - .setSynced(false) - .widget(new TextWidget(new Text("Bio Upgrade Offsets")) - .setSize(72, 18) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new DynamicPositionedRow() - .setSynced(false) - .widget(new TextFieldWidget() - .setGetterInt(() -> mBioOffsets[0]) - .setSetterInt(val -> { - mBioOffsets[0] = val; - }) - .setNumbers(-16, 16) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("X Offset") - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) - .setSize(36, 18)) - .widget(new TextFieldWidget() - .setGetterInt(() -> mBioOffsets[1]) - .setSetterInt(val -> { - mBioOffsets[1] = val; - }) - .setNumbers(-16, 16) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("Z Offset") - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) - .setSize(36, 18)) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new TextWidget(new Text("Cooler Tier 1 Offsets")) - .setSize(72, 18) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new DynamicPositionedRow() - .setSynced(false) - .widget(new TextFieldWidget() - .setGetterInt(() -> mOCTier1Offsets[0]) - .setSetterInt(val -> { - mOCTier1Offsets[0] = val; - }) - .setNumbers(-16, 16) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("X Offset") - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) - .setSize(36, 18)) - .widget(new TextFieldWidget() - .setGetterInt(() -> mOCTier1Offsets[1]) - .setSetterInt(val -> { - mOCTier1Offsets[1] = val; - }) - .setNumbers(-16, 16) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("Z Offset") - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) - .setSize(36, 18)) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new TextWidget(new Text("Cooler Tier 2 Offsets")) - .setSize(72, 18) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .widget(new DynamicPositionedRow() - .setSynced(false) - .widget(new TextFieldWidget() - .setGetterInt(() -> mOCTier2Offsets[0]) - .setSetterInt(val -> { - mOCTier2Offsets[0] = val; - }) - .setNumbers(-16, 16) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("X Offset") - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) - .setSize(36, 18)) - .widget(new TextFieldWidget() - .setGetterInt(() -> mOCTier2Offsets[1]) - .setSetterInt(val -> { - mOCTier2Offsets[1] = val; - }) - .setNumbers(-16, 16) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("Z Offset") - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) - .setSize(36, 18)) - .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) - .setPos(110, 25)); + new Text("Can't change configuration when running !") + .color(Color.RED.dark(3))) + .setEnabled(widget -> getBaseMetaTileEntity().isActive())) + .setPos(10, 25)) + .widget( + new DynamicPositionedColumn().setSynced(false) + .widget( + new TextWidget(new Text("Bio Upgrade Offsets")).setSize(72, 18) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new DynamicPositionedRow().setSynced(false).widget( + new TextFieldWidget().setGetterInt(() -> mBioOffsets[0]) + .setSetterInt(val -> { mBioOffsets[0] = val; }) + .setNumbers(-16, 16).setTextColor(Color.WHITE.normal) + .setTextAlignment(Alignment.Center).addTooltip("X Offset") + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setSize(36, 18)) + .widget( + new TextFieldWidget().setGetterInt(() -> mBioOffsets[1]) + .setSetterInt(val -> { mBioOffsets[1] = val; }) + .setNumbers(-16, 16).setTextColor(Color.WHITE.normal) + .setTextAlignment(Alignment.Center) + .addTooltip("Z Offset") + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setSize(36, 18)) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new TextWidget(new Text("Cooler Tier 1 Offsets")).setSize(72, 18) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new DynamicPositionedRow().setSynced(false).widget( + new TextFieldWidget().setGetterInt(() -> mOCTier1Offsets[0]) + .setSetterInt(val -> { mOCTier1Offsets[0] = val; }) + .setNumbers(-16, 16).setTextColor(Color.WHITE.normal) + .setTextAlignment(Alignment.Center).addTooltip("X Offset") + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setSize(36, 18)) + .widget( + new TextFieldWidget().setGetterInt(() -> mOCTier1Offsets[1]) + .setSetterInt(val -> { mOCTier1Offsets[1] = val; }) + .setNumbers(-16, 16).setTextColor(Color.WHITE.normal) + .setTextAlignment(Alignment.Center) + .addTooltip("Z Offset") + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setSize(36, 18)) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new TextWidget(new Text("Cooler Tier 2 Offsets")).setSize(72, 18) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .widget( + new DynamicPositionedRow().setSynced(false).widget( + new TextFieldWidget().setGetterInt(() -> mOCTier2Offsets[0]) + .setSetterInt(val -> { mOCTier2Offsets[0] = val; }) + .setNumbers(-16, 16).setTextColor(Color.WHITE.normal) + .setTextAlignment(Alignment.Center).addTooltip("X Offset") + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setSize(36, 18)) + .widget( + new TextFieldWidget().setGetterInt(() -> mOCTier2Offsets[1]) + .setSetterInt(val -> { mOCTier2Offsets[1] = val; }) + .setNumbers(-16, 16).setTextColor(Color.WHITE.normal) + .setTextAlignment(Alignment.Center) + .addTooltip("Z Offset") + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setSize(36, 18)) + .setEnabled(widget -> !getBaseMetaTileEntity().isActive())) + .setPos(110, 25)); return builder.build(); } } 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 60f168e05d..c231c6e935 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 @@ -8,10 +8,22 @@ import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofCoil; import static java.lang.Math.*; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import gregtech.api.GregTech_API; import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.enums.Materials; @@ -26,15 +38,6 @@ 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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMultiFurnace<GT_MetaTileEntity_PlasmaForge> implements ISurvivalConstructable { @@ -44,12 +47,9 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul private static final double maximum_discount = 0.5d; // Valid fuels which the discount will get applied to. - private static final FluidStack[] valid_fuels = { - Materials.ExcitedDTEC.getFluid(1L), - Materials.ExcitedDTRC.getFluid(1L), - Materials.ExcitedDTPC.getFluid(1L), - Materials.ExcitedDTCC.getFluid(1L), - }; + private static final FluidStack[] valid_fuels = { Materials.ExcitedDTEC.getFluid(1L), + Materials.ExcitedDTRC.getFluid(1L), Materials.ExcitedDTPC.getFluid(1L), + Materials.ExcitedDTCC.getFluid(1L), }; // Saves recomputing this every recipe check for overclocking. private static final double log4 = log(4); @@ -72,865 +72,402 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul @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; @@ -939,31 +476,19 @@ 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) { @@ -988,42 +513,87 @@ 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( + "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) + .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 + "2,112" + EnumChatFormatting.GRAY + " Heating coils required.") - .addStructureInfo(EnumChatFormatting.GOLD + "120" + EnumChatFormatting.GRAY - + " Dimensional bridge blocks required.") - .addStructureInfo(EnumChatFormatting.GOLD + "1,270" + EnumChatFormatting.GRAY - + " Dimensional injection casings required.") - .addStructureInfo(EnumChatFormatting.GOLD + "2,121" + EnumChatFormatting.GRAY - + " Dimensionally transcendent casings required.") + .addStructureInfo( + EnumChatFormatting.GOLD + "120" + + EnumChatFormatting.GRAY + + " Dimensional bridge blocks required.") + .addStructureInfo( + EnumChatFormatting.GOLD + "1,270" + + EnumChatFormatting.GRAY + + " Dimensional injection casings required.") + .addStructureInfo( + EnumChatFormatting.GOLD + "2,121" + + 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 + + "-" + + 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"); + .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; } @@ -1034,33 +604,16 @@ 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[] { - 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[] { - casingTexturePages[0][DIM_BRIDGE_CASING], - TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build() - }; + if (aActive) 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[] { casingTexturePages[0][DIM_BRIDGE_CASING], + 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 @@ -1101,8 +654,8 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul long tTotalEU = GT_ExoticEnergyInputHelper.getTotalEuMulti(getExoticAndNormalEnergyHatchList()); // 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); + GT_Recipe tRecipe_0 = GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes + .findRecipe(getBaseMetaTileEntity(), false, tTotalEU, tFluids, tItems); // Check if recipe found. if (tRecipe_0 == null) return false; @@ -1114,8 +667,7 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul GT_Recipe tRecipe_1 = tRecipe_0.copy(); // Break out to the outermost for loop when fuel found and discounted. Only 1 fuel per recipe is intended. - outside: - for (int i = 0; i < tRecipe_0.mFluidInputs.length; i++) { + outside: for (int i = 0; i < tRecipe_0.mFluidInputs.length; i++) { for (FluidStack fuel : valid_fuels) { if (tRecipe_1.mFluidInputs[i].isFluidEqual(fuel)) { // If running for max_efficiency_time_in_ticks then discount is at maximum. @@ -1257,37 +809,63 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul } } - 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.getAverageInputVoltageMulti(getExoticAndNormalEnergyHatchList())) - + EnumChatFormatting.RESET + " EU/t(*" + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers( - GT_ExoticEnergyInputHelper.getMaxWorkingInputAmpsMulti(getExoticAndNormalEnergyHatchList())) - + EnumChatFormatting.RESET + "A) " + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " + EnumChatFormatting.YELLOW - + VN[ - GT_Utility.getTier( - GT_ExoticEnergyInputHelper.getTotalEuMulti(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 + "%", - "-----------------------------------------" - }; + 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 + .getAverageInputVoltageMulti(getExoticAndNormalEnergyHatchList())) + + EnumChatFormatting.RESET + + " EU/t(*" + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers( + GT_ExoticEnergyInputHelper + .getMaxWorkingInputAmpsMulti(getExoticAndNormalEnergyHatchList())) + + EnumChatFormatting.RESET + + "A) " + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier( + GT_ExoticEnergyInputHelper.getTotalEuMulti(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 + + "%", + "-----------------------------------------" }; } public List<GT_MetaTileEntity_Hatch> getExoticAndNormalEnergyHatchList() { 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 40754c14c5..67afa63df8 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 @@ -3,6 +3,13 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; @@ -15,6 +22,7 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.ProgressBar; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; @@ -34,37 +42,28 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import gregtech.common.GT_Pollution; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEntity implements IAlignment, ISurvivalConstructable, IAddUIWidgets, IGetTitleColor { + public static final int INPUT_SLOTS = 3, OUTPUT_SLOTS = 3; - private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace>> - STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace>>() { - @Override - protected IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace> computeValue(Class<?> type) { - return IStructureDefinition.<GT_MetaTileEntity_PrimitiveBlastFurnace>builder() - .addShape("main", transpose(new String[][] { - {"ccc", "c-c", "ccc"}, - {"ccc", "clc", "ccc"}, - {"c~c", "clc", "ccc"}, - {"ccc", "ccc", "ccc"}, - })) - .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMetaID()))) - .addElement( - 'l', - ofChain( - isAir(), - ofBlockAnyMeta(Blocks.lava, 1), - ofBlockAnyMeta(Blocks.flowing_lava, 1))) - .build(); - } - }; + private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace>>() { + + @Override + protected IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace> computeValue(Class<?> type) { + return IStructureDefinition.<GT_MetaTileEntity_PrimitiveBlastFurnace>builder() + .addShape( + "main", + transpose( + new String[][] { { "ccc", "c-c", "ccc" }, { "ccc", "clc", "ccc" }, + { "c~c", "clc", "ccc" }, { "ccc", "ccc", "ccc" }, })) + .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMetaID()))) + .addElement( + 'l', + ofChain(isAir(), ofBlockAnyMeta(Blocks.lava, 1), ofBlockAnyMeta(Blocks.flowing_lava, 1))) + .build(); + } + }; public int mMaxProgresstime = 0; private volatile boolean mUpdated; @@ -197,8 +196,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override public ExtendedFacing getExtendedFacing() { - return ExtendedFacing.of( - ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing())); + return ExtendedFacing.of(ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing())); } @Override @@ -212,20 +210,18 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } private boolean checkMachine() { - return STRUCTURE_DEFINITION - .get(this.getClass()) - .check( - this, - "main", - getBaseMetaTileEntity().getWorld(), - getExtendedFacing(), - getBaseMetaTileEntity().getXCoord(), - getBaseMetaTileEntity().getYCoord(), - getBaseMetaTileEntity().getZCoord(), - 1, - 2, - 0, - !mMachine); + return STRUCTURE_DEFINITION.get(this.getClass()).check( + this, + "main", + getBaseMetaTileEntity().getWorld(), + getExtendedFacing(), + getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord(), + 1, + 2, + 0, + !mMachine); } protected abstract Block getCasingBlock(); @@ -243,15 +239,13 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn final int lavaZ = aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1); if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { - new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setMotion(0D, 0.3D, 0D) + 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(); + .setWorld(getBaseMetaTileEntity().getWorld()).run(); } if (aBaseMetaTileEntity.isServerSide()) { if (mUpdated) { @@ -270,8 +264,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn this.mProgresstime = 0; this.mMaxProgresstime = 0; GT_Mod.achievements.issueAchievement( - aBaseMetaTileEntity - .getWorld() + aBaseMetaTileEntity.getWorld() .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel"); } @@ -281,7 +274,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } if (this.mMaxProgresstime > 0 && (aTimer % 20L == 0L)) { GT_Pollution.addPollution( - this.getBaseMetaTileEntity(), GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); + this.getBaseMetaTileEntity(), + GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); } aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); @@ -318,11 +312,9 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } /** - * Draws random flames and smoke particles in front of Primitive Blast - * Furnace when active + * Draws random flames and smoke particles in front of Primitive Blast Furnace when active * - * @param aBaseMetaTileEntity The entity that will handle the - * {@link Block#randomDisplayTick} + * @param aBaseMetaTileEntity The entity that will handle the {@link Block#randomDisplayTick} */ @SideOnly(Side.CLIENT) @Override @@ -356,10 +348,8 @@ 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(); } @@ -397,7 +387,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn return true; } return ((this.mInventory[absoluteSlot].stackSize + outputStack.stackSize - <= this.mInventory[absoluteSlot].getMaxStackSize()) + <= this.mInventory[absoluteSlot].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[absoluteSlot], outputStack))); } @@ -459,23 +449,21 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { if (mMachine) return -1; - return STRUCTURE_DEFINITION - .get(getClass()) - .survivalBuild( - this, - stackSize, - "main", - getBaseMetaTileEntity().getWorld(), - getExtendedFacing(), - getBaseMetaTileEntity().getXCoord(), - getBaseMetaTileEntity().getYCoord(), - getBaseMetaTileEntity().getZCoord(), - 1, - 2, - 0, - elementBudget, - env, - false); + return STRUCTURE_DEFINITION.get(getClass()).survivalBuild( + this, + stackSize, + "main", + getBaseMetaTileEntity().getWorld(), + getExtendedFacing(), + getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord(), + 1, + 2, + 0, + elementBudget, + env, + false); } @Override @@ -485,21 +473,19 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - STRUCTURE_DEFINITION - .get(getClass()) - .buildOrHints( - this, - stackSize, - "main", - getBaseMetaTileEntity().getWorld(), - getExtendedFacing(), - getBaseMetaTileEntity().getXCoord(), - getBaseMetaTileEntity().getYCoord(), - getBaseMetaTileEntity().getZCoord(), - 1, - 2, - 0, - hintsOnly); + STRUCTURE_DEFINITION.get(getClass()).buildOrHints( + this, + stackSize, + "main", + getBaseMetaTileEntity().getWorld(), + getExtendedFacing(), + getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord(), + 1, + 2, + 0, + hintsOnly); } @Override @@ -509,45 +495,40 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new SlotWidget(inventoryHandler, 0) - .setBackground( - getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant())) - .setPos(33, 15)) - .widget(new SlotWidget(inventoryHandler, 1) - .setBackground( - getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())) - .setPos(33, 33)) - .widget(new SlotWidget(inventoryHandler, 2) - .setBackground( - getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM.get(getSteamVariant())) - .setPos(33, 51)) - .widget(new SlotWidget(inventoryHandler, 3) - .setAccess(true, false) - .setBackground( - getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant())) - .setPos(85, 24)) - .widget(new SlotWidget(inventoryHandler, 4) - .setAccess(true, false) - .setBackground( + builder.widget( + new SlotWidget(inventoryHandler, 0).setBackground( + getGUITextureSet().getItemSlot(), + GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant())).setPos(33, 15)) + .widget( + new SlotWidget(inventoryHandler, 1).setBackground( getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())) - .setPos(103, 24)) - .widget(new SlotWidget(inventoryHandler, 5) - .setAccess(true, false) - .setBackground( + GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())).setPos(33, 33)) + .widget( + new SlotWidget(inventoryHandler, 2).setBackground( getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())) - .setPos(121, 24)) - .widget(new ProgressBar() - .setTexture(GT_UITextures.PROGRESSBAR_ARROW_2_STEAM.get(getSteamVariant()), 20) - .setProgress(() -> (float) mProgresstime / mMaxProgresstime) - .setNEITransferRect(getRecipeMap().mNEIName) - .setPos(58, 24) - .setSize(20, 18)); + GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM.get(getSteamVariant())).setPos(33, 51)) + .widget( + new SlotWidget(inventoryHandler, 3).setAccess(true, false) + .setBackground( + getGUITextureSet().getItemSlot(), + GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant())) + .setPos(85, 24)) + .widget( + new SlotWidget(inventoryHandler, 4).setAccess(true, false) + .setBackground( + getGUITextureSet().getItemSlot(), + GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())) + .setPos(103, 24)) + .widget( + new SlotWidget(inventoryHandler, 5).setAccess(true, false) + .setBackground( + getGUITextureSet().getItemSlot(), + GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())) + .setPos(121, 24)) + .widget( + new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW_2_STEAM.get(getSteamVariant()), 20) + .setProgress(() -> (float) mProgresstime / mMaxProgresstime) + .setNEITransferRect(getRecipeMap().mNEIName).setPos(58, 24).setSize(20, 18)); } @Override 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 f36ba2853b..a53288d50c 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 @@ -12,8 +12,22 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_AR import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_GLOW; import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.isValidForLowGravity; +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.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidStack; + import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.structure.IStructureElement; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -33,17 +47,6 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Single_Recipe_Check_Processing_Array; 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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMultiBlockBase<GT_MetaTileEntity_ProcessingArray> { @@ -75,25 +78,17 @@ public class GT_MetaTileEntity_ProcessingArray @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Processing Array") - .addInfo("Runs supplied machines as if placed in the world") + tt.addMachineType("Processing Array").addInfo("Runs supplied machines as if placed in the world") .addInfo("Place up to 64 singleblock GT machines into the controller") .addInfo("Note that you still need to supply power to them all") .addInfo("Use a screwdriver to enable separate input busses") .addInfo("Use a wire cutter to disable UEV+ downtiering") .addInfo("Doesn't work on certain machines, deal with it") - .addInfo("Use it if you hate GT++, or want even more speed later on") - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front center") - .addCasingInfo("Robust Tungstensteel Machine Casing", 14) - .addEnergyHatch("Any casing", 1) - .addMaintenanceHatch("Any casing", 1) - .addInputBus("Any casing", 1) - .addInputHatch("Any casing", 1) - .addOutputBus("Any casing", 1) - .addOutputHatch("Any casing", 1) - .toolTipFinisher("Gregtech"); + .addInfo("Use it if you hate GT++, or want even more speed later on").addSeparator() + .beginStructureBlock(3, 3, 3, true).addController("Front center") + .addCasingInfo("Robust Tungstensteel Machine Casing", 14).addEnergyHatch("Any casing", 1) + .addMaintenanceHatch("Any casing", 1).addInputBus("Any casing", 1).addInputHatch("Any casing", 1) + .addOutputBus("Any casing", 1).addOutputHatch("Any casing", 1).toolTipFinisher("Gregtech"); return tt; } @@ -104,65 +99,28 @@ public class GT_MetaTileEntity_ProcessingArray } @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[] { - BlockIcons.casingTexturePages[0][48], - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW) - .extFacing() - .glow() - .build() - }; + 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[] { 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] }; } // TODO: Expand so it also does the non recipe map recipes /* - public void remoteRecipeCheck() { - if (mInventory[1] == null) return; - String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", ""); - if (tmp.startsWith("replicator")) { - - } else if (tmp.startsWith("brewery")) { - - } else if (tmp.startsWith("packer")) { - - } else if (tmp.startsWith("printer")) { - - } else if (tmp.startsWith("disassembler")) { - - } else if (tmp.startsWith("massfab")) { - - } else if (tmp.startsWith("scanner")) { - - } - } - */ + * public void remoteRecipeCheck() { if (mInventory[1] == null) return; String tmp = + * mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", ""); if + * (tmp.startsWith("replicator")) { } else if (tmp.startsWith("brewery")) { } else if (tmp.startsWith("packer")) { } + * else if (tmp.startsWith("printer")) { } else if (tmp.startsWith("disassembler")) { } else if + * (tmp.startsWith("massfab")) { } else if (tmp.startsWith("scanner")) { } } + */ // Gets the recipe map for the given machine through its unlocalized name @Override @@ -233,23 +191,29 @@ public class GT_MetaTileEntity_ProcessingArray } 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); return processRecipeOutputs( - tSingleRecipeCheck.getRecipe(), tSingleRecipeCheck.getRecipeAmperage(), parallel, 1); + tSingleRecipeCheck.getRecipe(), + tSingleRecipeCheck.getRecipeAmperage(), + parallel, + 1); } 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); + 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 + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && !isValidForLowGravity(tRecipe, getBaseMetaTileEntity().getWorld().provider.dimensionId)) return false; @@ -270,11 +234,8 @@ public class GT_MetaTileEntity_ProcessingArray break; } else if (mLockedToSingleRecipe && !recipeLocked) { // We want to lock to a single run of the recipe. - mSingleRecipeCheck = tSingleRecipeCheckBuilder - .setAfter(tInputs, tFluids) - .setRecipe(tRecipe) - .setRecipeAmperage(map.mAmperage) - .build(); + mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter(tInputs, tFluids).setRecipe(tRecipe) + .setRecipeAmperage(map.mAmperage).build(); recipeLocked = true; } } @@ -304,7 +265,11 @@ public class GT_MetaTileEntity_ProcessingArray this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; ProcessingArrayCalculateOverclock( - aRecipe.mEUt, aRecipe.mDuration * multiplier, aAmperage, GT_Values.V[tTier], false); + aRecipe.mEUt, + aRecipe.mDuration * multiplier, + aAmperage, + GT_Values.V[tTier], + false); // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUPerTick == Long.MAX_VALUE - 1) return false; mEUPerTick = mEUPerTick * parallel; @@ -322,8 +287,7 @@ public class GT_MetaTileEntity_ProcessingArray } FluidStack[] tFOut = new FluidStack[aRecipe.mFluidOutputs.length]; for (int i = 0; i < aRecipe.mFluidOutputs.length; i++) - if (aRecipe.getFluidOutput(i) != null) - tFOut[i] = aRecipe.getFluidOutput(i).copy(); + if (aRecipe.getFluidOutput(i) != null) tFOut[i] = aRecipe.getFluidOutput(i).copy(); for (int f = 0; f < tOut.length; f++) { if (aRecipe.mOutputs[f] != null && tOut[f] != null) { for (int g = 0; g < parallel * multiplier; g++) { @@ -341,10 +305,8 @@ public class GT_MetaTileEntity_ProcessingArray oNumber++; } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - this.mOutputItems = Arrays.stream(tOut) - .filter(Objects::nonNull) - .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack) - .filter(is -> is.stackSize > 0) + this.mOutputItems = Arrays.stream(tOut).filter(Objects::nonNull) + .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack).filter(is -> is.stackSize > 0) .toArray(ItemStack[]::new); this.mOutputFluids = tFOut; updateSlots(); @@ -420,13 +382,14 @@ public class GT_MetaTileEntity_ProcessingArray } else { mSeparate = !mSeparate; GT_Utility.sendChatToPlayer( - aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparate); + 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) { if (aPlayer.isSneaking()) { mUseMultiparallelMode = !mUseMultiparallelMode; if (mUseMultiparallelMode) { @@ -460,8 +423,8 @@ public class GT_MetaTileEntity_ProcessingArray @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 @@ -487,41 +450,71 @@ public class GT_MetaTileEntity_ProcessingArray } 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(-mEUPerTick) + 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 + EnumChatFormatting.RESET + " x", - StatCollector.translateToLocal("GT5U.PA.parallel") + ": " + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers((mInventory[1] != null) ? (mInventory[1].stackSize << mMult) : 0) - + EnumChatFormatting.RESET - }; + 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(-mEUPerTick) + + 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 + + EnumChatFormatting.RESET + + " x", + StatCollector.translateToLocal("GT5U.PA.parallel") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers((mInventory[1] != null) ? (mInventory[1].stackSize << mMult) : 0) + + EnumChatFormatting.RESET }; } public List<GT_MetaTileEntity_Hatch> getExoticAndNormalEnergyHatchList() { @@ -543,8 +536,8 @@ public class GT_MetaTileEntity_ProcessingArray return true; } - protected void ProcessingArrayCalculateOverclock( - long aEUt, int aDuration, int mAmperage, long maxInputVoltage, boolean perfectOC) { + protected void ProcessingArrayCalculateOverclock(long 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 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 5212dc9195..8e3f07df48 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 @@ -13,11 +13,16 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofCoil; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.IStructureElement; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -33,21 +38,16 @@ 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 net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -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); 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) @@ -55,12 +55,13 @@ public class GT_MetaTileEntity_PyrolyseOven : 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', @@ -70,18 +71,13 @@ public class GT_MetaTileEntity_PyrolyseOven .addElement( 'b', buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class) - .atLeast(OutputBus, OutputHatch, Energy, Maintenance) - .casingIndex(CASING_INDEX) - .dot(1) + .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( + buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class).atLeast(InputBus, InputHatch, Muffler) + .casingIndex(CASING_INDEX).dot(1).buildAndChain( onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))) .build(); } @@ -99,65 +95,33 @@ public class GT_MetaTileEntity_PyrolyseOven @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Coke Oven") - .addInfo("Controller block for the Pyrolyse Oven") - .addInfo("Industrial Charcoal producer") - .addInfo("Processing speed scales linearly with Coil tier:") + tt.addMachineType("Coke Oven").addInfo("Controller block for the Pyrolyse Oven") + .addInfo("Industrial Charcoal producer").addInfo("Processing speed scales linearly with Coil tier:") .addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, Fe50CW: 200%, etc.") - .addInfo("EU/t is not affected by Coil tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(5, 4, 5, true) - .addController("Front center") + .addInfo("EU/t is not affected by Coil tier").addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator().beginStructureBlock(5, 4, 5, true).addController("Front center") .addCasingInfo("Pyrolyse Oven Casing", 60) .addOtherStructurePart("Heating Coils", "Center 3x1x3 of the bottom layer") - .addEnergyHatch("Any bottom layer casing", 1) - .addMaintenanceHatch("Any bottom layer casing", 1) - .addMufflerHatch("Center 3x1x3 area in top layer", 2) - .addInputBus("Center 3x1x3 area in top layer", 2) - .addInputHatch("Center 3x1x3 area in top layer", 2) - .addOutputBus("Any bottom layer casing", 1) - .addOutputHatch("Any bottom layer casing", 1) - .toolTipFinisher("Gregtech"); + .addEnergyHatch("Any bottom layer casing", 1).addMaintenanceHatch("Any bottom layer casing", 1) + .addMufflerHatch("Center 3x1x3 area in top layer", 2).addInputBus("Center 3x1x3 area in top layer", 2) + .addInputHatch("Center 3x1x3 area in top layer", 2).addOutputBus("Any bottom layer casing", 1) + .addOutputHatch("Any bottom layer casing", 1).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[] { - 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[] { - BlockIcons.casingTexturePages[8][66], - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW) - .extFacing() - .glow() - .build() - }; + 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[] { 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 @@ -191,13 +155,16 @@ public class GT_MetaTileEntity_PyrolyseOven } tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe( - getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); + getBaseMetaTileEntity(), + false, + gregtech.api.enums.GT_Values.V[tTier], + tFluids, + tInputs); if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) return false; if (mLockedToSingleRecipe) { - mSingleRecipeCheck = - tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build(); + mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build(); } } @@ -209,8 +176,8 @@ public class GT_MetaTileEntity_PyrolyseOven 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; } @@ -237,8 +204,7 @@ public class GT_MetaTileEntity_PyrolyseOven coilHeat = HeatingCoilLevel.None; mCasingAmount = 0; replaceDeprecatedCoils(aBaseMetaTileEntity); - return checkPiece("main", 2, 3, 0) - && mCasingAmount >= 60 + return checkPiece("main", 2, 3, 0) && mCasingAmount >= 60 && mMaintenanceHatches.size() == 1 && !mMufflerHatches.isEmpty(); } 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 f942123109..681a4dfd63 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 @@ -6,8 +6,12 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZE import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_GLOW; import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.structure.IStructureElement; import com.gtnewhorizon.structurelib.structure.StructureUtility; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -17,11 +21,10 @@ 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 net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; 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); } @@ -38,62 +41,33 @@ public class GT_MetaTileEntity_VacuumFreezer @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Vacuum Freezer") - .addInfo("Controller Block for the Vacuum Freezer") - .addInfo("Cools hot ingots and cells") - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front center") - .addCasingInfo("Frost Proof Machine Casing", 16) - .addEnergyHatch("Any casing", 1) - .addMaintenanceHatch("Any casing", 1) - .addInputHatch("Any casing", 1) - .addOutputHatch("Any casing", 1) - .addInputBus("Any casing", 1) - .addOutputBus("Any casing", 1) + tt.addMachineType("Vacuum Freezer").addInfo("Controller Block for the Vacuum Freezer") + .addInfo("Cools hot ingots and cells").addSeparator().beginStructureBlock(3, 3, 3, true) + .addController("Front center").addCasingInfo("Frost Proof Machine Casing", 16) + .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addInputHatch("Any casing", 1) + .addOutputHatch("Any casing", 1).addInputBus("Any casing", 1).addOutputBus("Any casing", 1) .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) { 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; } @@ -115,9 +89,12 @@ public class GT_MetaTileEntity_VacuumFreezer 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); @@ -130,8 +107,8 @@ public class GT_MetaTileEntity_VacuumFreezer 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 09aae61527..757b3ea72d 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 @@ -12,16 +12,19 @@ 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 net.minecraft.block.Block; + 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; @Override @@ -33,23 +36,25 @@ 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 "}, - })) + .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))) + 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(); + .addElement('D', addMultiTileCasing(getCasingRegistryID(), getCasingMeta(), NOTHING)).build(); } return STRUCTURE_DEFINITION; } @@ -72,12 +77,9 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera @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() + 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) + .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") @@ -124,22 +126,15 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera // TODO: MTE(Texture) if (mFacing == aSide) { return new ITexture[] { - // Base Texture - MACHINE_CASINGS[1][0], - // Active - 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() - }; + // Base Texture + MACHINE_CASINGS[1][0], + // Active + 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() }; } // 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 3aefd2d16f..4f9677eda6 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 @@ -12,6 +12,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; 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); } @@ -54,97 +55,57 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_Bas @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - 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() - }; + 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() }; } } 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 9926c8a5e7..ca08d647a1 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 @@ -12,6 +12,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; 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); } @@ -54,97 +55,57 @@ public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_Basi @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - 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() - }; + 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() }; } } 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 5706345c3b..3f7eed2c99 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 @@ -12,6 +12,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; 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); } @@ -49,97 +50,56 @@ public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_Basic @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR), + 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 693f5abdbc..3f6e318284 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 @@ -12,6 +12,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; 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); } @@ -49,97 +50,56 @@ public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicM @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR), + 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 7fa8358974..d9597663da 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 @@ -12,6 +12,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; 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); } @@ -49,97 +50,55 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR), + 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 c18a7e8a51..f90e0044bd 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 @@ -12,6 +12,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; 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); } @@ -49,97 +50,55 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR), + 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 9709207ab3..3f25499dd8 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 @@ -3,6 +3,9 @@ package gregtech.common.tileentities.machines.steam; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.block.Block; +import net.minecraftforge.common.util.ForgeDirection; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.ParticleFX; @@ -15,10 +18,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; -import net.minecraft.block.Block; -import net.minecraftforge.common.util.ForgeDirection; 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); } @@ -56,103 +58,58 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build() }; } /** - * Handles {@link Block#randomDisplayTick}. - * Draws Random Sparkles at main face. + * Handles {@link Block#randomDisplayTick}. Draws Random Sparkles at main face. * * @param aBaseMetaTileEntity The entity that will handle the {@see Block#randomDisplayTick} */ @@ -165,8 +122,7 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi final byte mainFacing = (byte) this.mMainFacing; - if (mainFacing > 1 - && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 + if (mainFacing > 1 && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { final double oX = aBaseMetaTileEntity.getXCoord(); @@ -202,10 +158,8 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi mZ = .05D; } - ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()) - .setMotion(mX, 0, mZ) - .setPosition(x, y, z) - .setWorld(getBaseMetaTileEntity().getWorld()); + ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(mX, 0, mZ) + .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.LAVA).run(); } } 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 d34cf2efb9..acfd8e6b28 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 @@ -3,6 +3,9 @@ package gregtech.common.tileentities.machines.steam; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.block.Block; +import net.minecraftforge.common.util.ForgeDirection; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.ParticleFX; @@ -15,10 +18,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; -import net.minecraft.block.Block; -import net.minecraftforge.common.util.ForgeDirection; 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); } @@ -56,103 +58,58 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build() }; } /** - * Handles {@link Block#randomDisplayTick}. - * Draws Random Sparkles at main face. + * Handles {@link Block#randomDisplayTick}. Draws Random Sparkles at main face. * * @param aBaseMetaTileEntity The entity that will handle the {@see Block#randomDisplayTick} */ @@ -165,8 +122,7 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic final byte mainFacing = (byte) this.mMainFacing; - if (mainFacing > 1 - && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 + if (mainFacing > 1 && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { final double oX = aBaseMetaTileEntity.getXCoord(); @@ -202,10 +158,8 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic mZ = .05D; } - ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()) - .setMotion(mX, 0, mZ) - .setPosition(x, y, z) - .setWorld(getBaseMetaTileEntity().getWorld()); + ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(mX, 0, mZ) + .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.LAVA).run(); } } 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 15d971a0fb..e102d797e8 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 @@ -2,6 +2,8 @@ package gregtech.common.tileentities.machines.steam; import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -11,9 +13,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; 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); } @@ -52,8 +54,8 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac } @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) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; } @@ -73,98 +75,55 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - 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()) - }; + 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()) }; } } 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 85142dbd98..8d0414103e 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 @@ -2,6 +2,8 @@ package gregtech.common.tileentities.machines.steam; import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -11,9 +13,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; 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); } @@ -52,8 +54,8 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach } @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) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; } @@ -73,97 +75,54 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + 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_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java index e06a179fa7..def8af9fe3 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 @@ -4,6 +4,10 @@ import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.ParticleFX; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; @@ -15,11 +19,9 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; 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); } @@ -48,15 +50,12 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { - new ParticleEventBuilder() - .setMotion(0.0D, 0.0D, 0.0D) - .setIdentifier(ParticleFX.SMOKE) + 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(); + .setWorld(getBaseMetaTileEntity().getWorld()).run(); } } } @@ -77,7 +76,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); @@ -85,8 +84,8 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM } @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) && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); } @@ -106,97 +105,55 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR), + 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 13270b9a83..81027ca069 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 @@ -4,6 +4,10 @@ import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.ParticleFX; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; @@ -15,11 +19,9 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; 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); } @@ -48,15 +50,13 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { - new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setMotion(0.0D, 0.0D, 0.0D) + 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(); + .setWorld(getBaseMetaTileEntity().getWorld()).run(); } } } @@ -77,7 +77,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); @@ -85,8 +85,8 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa } @Override - public boolean allowPutStackValidated( - IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack 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)); } @@ -106,97 +106,55 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa @Override public ITexture[] getSideFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { - super.getSideFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW).glow().build() }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { - super.getFrontFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR), + TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW).glow().build() }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { - super.getTopFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR), + TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW).glow().build() }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - 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() - }; + 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() }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { - super.getBottomFacingInactive(aColor)[0], - TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW) - .glow() - .build() - }; + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR), + 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 8ef639e89e..c40e05090b 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 @@ -4,11 +4,29 @@ 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 java.util.HashMap; +import java.util.List; +import java.util.Map; + +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.util.Constants; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import cpw.mods.fml.common.Optional; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -21,36 +39,25 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachi import gregtech.api.objects.AE2DigitalChestHandler; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.Constants; @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>, IAddUIWidgets { + protected boolean mVoidOverflow = false; protected boolean mDisableFilter; - 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", - "Will keep its contents when harvested", - }); + 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", + "Will keep its contents when harvested", }); } protected static int commonSizeCompute(int tier) { @@ -84,24 +91,21 @@ 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() + 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, + appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> imeMonitorHandlerReceiver, Object o) { if (listeners == null) listeners = new HashMap<>(); listeners.put(imeMonitorHandlerReceiver, o); @@ -110,8 +114,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Optional.Method(modid = "appliedenergistics2") @Override public void removeListener( - appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> - imeMonitorHandlerReceiver) { + appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> imeMonitorHandlerReceiver) { if (listeners == null) listeners = new HashMap<>(); listeners.remove(imeMonitorHandlerReceiver); } @@ -203,15 +206,12 @@ 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 (mode != appeng.api.config.Actionable.SIMULATE) - getBaseMetaTileEntity().markDirty(); + if (mode != appeng.api.config.Actionable.SIMULATE) getBaseMetaTileEntity().markDirty(); ItemStack storedStack = getItemStack(); if (storedStack != null) { if (GT_Utility.areStacksEqual(storedStack, inputStack)) { @@ -244,14 +244,11 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @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 (mode != appeng.api.config.Actionable.SIMULATE) - getBaseMetaTileEntity().markDirty(); + 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()); @@ -278,21 +275,19 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti GT_Utility.sendChatToPlayer( aPlayer, StatCollector.translateToLocal( - mVoidOverflow - ? "GT5U.machines.digitalchest.voidoverflow.enabled" + mVoidOverflow ? "GT5U.machines.digitalchest.voidoverflow.enabled" : "GT5U.machines.digitalchest.voidoverflow.disabled")); } @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 (super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ)) return true; mDisableFilter = !mDisableFilter; GT_Utility.sendChatToPlayer( aPlayer, StatCollector.translateToLocal( - mDisableFilter - ? "GT5U.machines.digitalchest.inputfilter.disabled" + mDisableFilter ? "GT5U.machines.digitalchest.inputfilter.disabled" : "GT5U.machines.digitalchest.inputfilter.enabled")); return true; } @@ -312,8 +307,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti ItemStack stack = getItemStack(); int savedCount = count; - if ((mInventory[0] != null) - && ((count < getMaxItemCount()) || mVoidOverflow) + if ((mInventory[0] != null) && ((count < getMaxItemCount()) || mVoidOverflow) && GT_Utility.areStacksEqual(mInventory[0], stack)) { count += mInventory[0].stackSize; if (count <= getMaxItemCount()) { @@ -331,13 +325,12 @@ 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) + } 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; - } + int tmp = Math.min(count, mInventory[1].getMaxStackSize() - mInventory[1].stackSize); + mInventory[1].stackSize += tmp; + count -= tmp; + } setItemCount(count); if (stack != null) { mInventory[2] = stack.copy(); @@ -379,8 +372,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public int getProgresstime() { - return getItemCount() - + (mInventory[0] == null ? 0 : mInventory[0].stackSize) + return getItemCount() + (mInventory[0] == null ? 0 : mInventory[0].stackSize) + (mInventory[1] == null ? 0 : mInventory[1].stackSize); } @@ -398,21 +390,23 @@ 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[] { 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[] { - 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 - }; + 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 }; } @Override @@ -442,8 +436,8 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @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()) { + 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; @@ -488,39 +482,30 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti } @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() }; } @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); NBTTagCompound tag = accessor.getNBTData(); if (tag.hasKey("itemType", Constants.NBT.TAG_COMPOUND)) { currenttip.add("Item Count: " + GT_Utility.parseNumberToString(tag.getInteger("itemCount"))); - currenttip.add("Item Type: " - + ItemStack.loadItemStackFromNBT(tag.getCompoundTag("itemType")) - .getDisplayName()); + currenttip.add( + "Item Type: " + ItemStack.loadItemStackFromNBT(tag.getCompoundTag("itemType")).getDisplayName()); } else { currenttip.add("Chest Empty"); } } @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); ItemStack is = getItemStack(); if (GT_Utility.isStackInvalid(is)) return; @@ -538,29 +523,27 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setPos(7, 16) - .setSize(71, 45)) - .widget(new SlotWidget(inventoryHandler, 0) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN) - .setPos(79, 16)) - .widget(new SlotWidget(inventoryHandler, 1) - .setAccess(true, false) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT) - .setPos(79, 52)) - .widget(SlotWidget.phantom(inventoryHandler, 2) - .disableInteraction() - .setBackground(GT_UITextures.TRANSPARENT) - .setPos(59, 42)) - .widget(new TextWidget("Item Amount") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(10, 20)) - .widget(TextWidget.dynamicString(() -> GT_Utility.parseNumberToString( - this instanceof GT_MetaTileEntity_QuantumChest - ? ((GT_MetaTileEntity_QuantumChest) this).mItemCount - : 0)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(10, 30)); + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45)) + .widget( + new SlotWidget(inventoryHandler, 0) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN) + .setPos(79, 16)) + .widget( + new SlotWidget(inventoryHandler, 1).setAccess(true, false) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT) + .setPos(79, 52)) + .widget( + SlotWidget.phantom(inventoryHandler, 2).disableInteraction() + .setBackground(GT_UITextures.TRANSPARENT).setPos(59, 42)) + .widget( + new TextWidget("Item Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20)) + .widget( + TextWidget.dynamicString( + () -> GT_Utility.parseNumberToString( + this instanceof GT_MetaTileEntity_QuantumChest + ? ((GT_MetaTileEntity_QuantumChest) this).mItemCount + : 0)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30)); } } 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 278e4b3d15..15171ae747 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 @@ -3,6 +3,25 @@ package gregtech.common.tileentities.storage; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; +import java.util.List; + +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; @@ -10,6 +29,7 @@ import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; + import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.IFluidAccess; @@ -21,35 +41,26 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.modularui.widget.FluidDisplaySlotWidget; -import java.util.List; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntity_BasicTank implements IFluidLockable, IAddUIWidgets { + public boolean mOutputFluid = false, mVoidFluidPart = false, mVoidFluidFull = false, mLockFluid = false; protected String lockedFluidName = null; public boolean mAllowInputFromOutputSide = false; public GT_MetaTileEntity_DigitalTankBase(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, new String[] { - StatCollector.translateToLocalFormatted( - "GT5U.machines.digitaltank.tooltip", GT_Utility.formatNumbers(commonSizeCompute(aTier))), - StatCollector.translateToLocal("GT5U.machines.digitaltank.tooltip1"), - }); + super( + aID, + aName, + aNameRegional, + aTier, + 3, + new String[] { + StatCollector.translateToLocalFormatted( + "GT5U.machines.digitaltank.tooltip", + GT_Utility.formatNumbers(commonSizeCompute(aTier))), + StatCollector.translateToLocal("GT5U.machines.digitaltank.tooltip1"), }); } protected static int commonSizeCompute(int tier) { @@ -133,9 +144,7 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public boolean isFluidInputAllowed(FluidStack aFluid) { - return !mLockFluid - || lockedFluidName == null - || lockedFluidName.equals(aFluid.getFluid().getName()); + return !mLockFluid || lockedFluidName == null || lockedFluidName.equals(aFluid.getFluid().getName()); } @Override @@ -222,23 +231,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) { + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { if (aSide != ForgeDirection.UP.ordinal()) { if (aSide == aBaseMetaTileEntity.getFrontFacing()) { - return new ITexture[] {MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPE)}; - } else return new ITexture[] {MACHINE_CASINGS[mTier][aColorIndex + 1]}; + return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPE) }; + } else 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() - }; + return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_QTANK), + TextureFactory.builder().addIcon(OVERLAY_QTANK_GLOW).glow().build() }; } @Override @@ -252,7 +253,8 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit if (aSide == getBaseMetaTileEntity().getFrontFacing()) { mAllowInputFromOutputSide = !mAllowInputFromOutputSide; GT_Utility.sendChatToPlayer( - aPlayer, mAllowInputFromOutputSide ? GT_Utility.getTrans("095") : GT_Utility.getTrans("096")); + aPlayer, + mAllowInputFromOutputSide ? GT_Utility.getTrans("095") : GT_Utility.getTrans("096")); } } @@ -314,8 +316,8 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit getOutputSlot(), GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), 1)) { - getFillableStack().amount += - Math.min(tFluid.amount, getRealCapacity() - getFillableStack().amount); + getFillableStack().amount += Math + .min(tFluid.amount, getRealCapacity() - getFillableStack().amount); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); } } @@ -325,8 +327,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); @@ -339,11 +341,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 + if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() - || !isFluidInputAllowed(aFluid)) return 0; + || !isFluidInputAllowed(aFluid)) + return 0; if (getFillableStack() != null && !getFillableStack().isFluidEqual(aFluid)) { return 0; } @@ -373,12 +375,13 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit FluidStack tDrained = drain(commonSizeCompute(mTier) / 100, false); if (tDrained != null) { int tFilledAmount = tTank.fill( - ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); - if (tFilledAmount > 0) - tTank.fill( - ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), - drain(tFilledAmount, true), - true); + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), + tDrained, + false); + if (tFilledAmount > 0) tTank.fill( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), + drain(tFilledAmount, true), + true); } } } @@ -441,28 +444,28 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - return new FluidTankInfo[] {getInfo()}; + return new FluidTankInfo[] { getInfo() }; } @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); NBTTagCompound tag = accessor.getNBTData(); FluidStack fluid = tag.hasKey("mFluid") ? FluidStack.loadFluidStackFromNBT(tag.getCompoundTag("mFluid")) : null; if (fluid != null && fluid.amount > 0) { currenttip.remove(0); - currenttip.add( - 0, String.format("%d / %d mB %s", fluid.amount, getRealCapacity(), fluid.getLocalizedName())); + currenttip + .add(0, String.format("%d / %d mB %s", fluid.amount, getRealCapacity(), fluid.getLocalizedName())); } else { currenttip.add(0, "Tank Empty"); } } @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); FluidStack fluid = getFluid(); if (fluid != null) tag.setTag("mFluid", fluid.writeToNBT(new NBTTagCompound())); @@ -476,141 +479,117 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget(new DrawableWidget() - .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) - .setPos(7, 16) - .setSize(71, 45)) - .widget(new SlotWidget(inventoryHandler, getInputSlot()) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN) - .setPos(79, 16)) - .widget(new SlotWidget(inventoryHandler, getOutputSlot()) - .setAccess(true, false) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT) - .setPos(79, 43)) - .widget(new FluidDisplaySlotWidget(inventoryHandler, getStackDisplaySlot()) - .setFluidAccessConstructor(() -> constructFluidAccess(false)) - .setIHasFluidDisplay(this) - .setCanDrain(true) - .setCanFill(!isDrainableStackSeparate()) - .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER) - .setActionDragAndDrop(FluidDisplaySlotWidget.Action.LOCK) - .setBeforeRealClick((clickData, widget) -> { - if (NetworkUtils.isClient()) { - // propagate display item content to actual fluid stored in this tank - setDrainableStack(GT_Utility.getFluidFromDisplayStack( - widget.getMcSlot().getStack())); - } - return true; - }) - .setBackground(GT_UITextures.TRANSPARENT) - .setPos(58, 41)) - .widget(new TextWidget("Liquid Amount") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(10, 20)) - .widget(TextWidget.dynamicString( - () -> GT_Utility.parseNumberToString(mFluid != null ? mFluid.amount : 0)) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setPos(10, 30)) - .widget(new CycleButtonWidget() - .setToggle(() -> mOutputFluid, val -> { - mOutputFluid = val; - if (!mOutputFluid) { - GT_Utility.sendChatToPlayer( - buildContext.getPlayer(), - GT_Utility.trans("262", "Fluid Auto Output Disabled")); - } else { - GT_Utility.sendChatToPlayer( - buildContext.getPlayer(), GT_Utility.trans("263", "Fluid Auto Output Enabled")); - } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + builder.widget( + new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45)) + .widget( + new SlotWidget(inventoryHandler, getInputSlot()) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN) + .setPos(79, 16)) + .widget( + new SlotWidget(inventoryHandler, getOutputSlot()).setAccess(true, false) + .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT) + .setPos(79, 43)) + .widget( + new FluidDisplaySlotWidget(inventoryHandler, getStackDisplaySlot()) + .setFluidAccessConstructor(() -> constructFluidAccess(false)).setIHasFluidDisplay(this) + .setCanDrain(true).setCanFill(!isDrainableStackSeparate()) + .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER) + .setActionDragAndDrop(FluidDisplaySlotWidget.Action.LOCK) + .setBeforeRealClick((clickData, widget) -> { + if (NetworkUtils.isClient()) { + // propagate display item content to actual fluid stored in this tank + setDrainableStack( + GT_Utility.getFluidFromDisplayStack(widget.getMcSlot().getStack())); + } + return true; + }).setBackground(GT_UITextures.TRANSPARENT).setPos(58, 41)) + .widget(new TextWidget("Liquid Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20)) + .widget( + TextWidget + .dynamicString(() -> GT_Utility.parseNumberToString(mFluid != null ? mFluid.amount : 0)) + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30)) + .widget(new CycleButtonWidget().setToggle(() -> mOutputFluid, val -> { + mOutputFluid = val; + if (!mOutputFluid) { + GT_Utility.sendChatToPlayer( + buildContext.getPlayer(), + GT_Utility.trans("262", "Fluid Auto Output Disabled")); + } else { + GT_Utility.sendChatToPlayer( + buildContext.getPlayer(), + GT_Utility.trans("263", "Fluid Auto Output Enabled")); + } + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_FLUID) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.autooutput.tooltip")) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(7, 63) - .setSize(18, 18)) - .widget(new CycleButtonWidget() - .setToggle(() -> mLockFluid, val -> { - mLockFluid = val; - - String inBrackets; - if (mLockFluid) { - if (mFluid == null) { - setLockedFluidName(null); - inBrackets = GT_Utility.trans( - "264", "currently none, will be locked to the next that is put in"); - } else { - setLockedFluidName( - getDrainableStack().getFluid().getName()); - inBrackets = getDrainableStack().getLocalizedName(); - } - GT_Utility.sendChatToPlayer( - buildContext.getPlayer(), - String.format( - "%s (%s)", GT_Utility.trans("265", "1 specific Fluid"), inBrackets)); - } else { - setLockedFluidName(null); - GT_Utility.sendChatToPlayer( - buildContext.getPlayer(), GT_Utility.trans("266", "Lock Fluid Mode Disabled")); - } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(7, 63).setSize(18, 18)) + .widget(new CycleButtonWidget().setToggle(() -> mLockFluid, val -> { + mLockFluid = val; + + String inBrackets; + if (mLockFluid) { + if (mFluid == null) { + setLockedFluidName(null); + inBrackets = GT_Utility + .trans("264", "currently none, will be locked to the next that is put in"); + } else { + setLockedFluidName(getDrainableStack().getFluid().getName()); + inBrackets = getDrainableStack().getLocalizedName(); + } + GT_Utility.sendChatToPlayer( + buildContext.getPlayer(), + String.format("%s (%s)", GT_Utility.trans("265", "1 specific Fluid"), inBrackets)); + } else { + setLockedFluidName(null); + GT_Utility.sendChatToPlayer( + buildContext.getPlayer(), + GT_Utility.trans("266", "Lock Fluid Mode Disabled")); + } + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_LOCK) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.lockfluid.tooltip")) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(25, 63) - .setSize(18, 18)) - .widget(new CycleButtonWidget() - .setToggle(() -> mAllowInputFromOutputSide, val -> { - mAllowInputFromOutputSide = val; - if (!mAllowInputFromOutputSide) { - GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("096")); - } else { - GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("095")); - } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(25, 63).setSize(18, 18)) + .widget(new CycleButtonWidget().setToggle(() -> mAllowInputFromOutputSide, val -> { + mAllowInputFromOutputSide = val; + if (!mAllowInputFromOutputSide) { + GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("096")); + } else { + GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("095")); + } + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.inputfromoutput.tooltip")) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(43, 63) - .setSize(18, 18)) - .widget(new CycleButtonWidget() - .setToggle(() -> mVoidFluidPart, val -> { - mVoidFluidPart = val; - if (!mVoidFluidPart) { - GT_Utility.sendChatToPlayer( - buildContext.getPlayer(), - GT_Utility.trans("267", "Overflow Voiding Mode Disabled")); - } else { - GT_Utility.sendChatToPlayer( - buildContext.getPlayer(), - GT_Utility.trans("268", "Overflow Voiding Mode Enabled")); - } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(43, 63).setSize(18, 18)) + .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidPart, val -> { + mVoidFluidPart = val; + if (!mVoidFluidPart) { + GT_Utility.sendChatToPlayer( + buildContext.getPlayer(), + GT_Utility.trans("267", "Overflow Voiding Mode Disabled")); + } else { + GT_Utility.sendChatToPlayer( + buildContext.getPlayer(), + GT_Utility.trans("268", "Overflow Voiding Mode Enabled")); + } + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidoverflow.tooltip")) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(151, 7) - .setSize(18, 18)) - .widget(new CycleButtonWidget() - .setToggle(() -> mVoidFluidFull, val -> { - mVoidFluidFull = val; - if (!mVoidFluidFull) { - GT_Utility.sendChatToPlayer( - buildContext.getPlayer(), GT_Utility.trans("269", "Void Full Mode Disabled")); - } else { - GT_Utility.sendChatToPlayer( - buildContext.getPlayer(), GT_Utility.trans("270", "Void Full Mode Enabled")); - } - }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(151, 7).setSize(18, 18)) + .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidFull, val -> { + mVoidFluidFull = val; + if (!mVoidFluidFull) { + GT_Utility.sendChatToPlayer( + buildContext.getPlayer(), + GT_Utility.trans("269", "Void Full Mode Disabled")); + } else { + GT_Utility.sendChatToPlayer( + buildContext.getPlayer(), + GT_Utility.trans("270", "Void Full Mode Enabled")); + } + }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_ALL) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidfull.tooltip")) - .setTooltipShowUpDelay(TOOLTIP_DELAY) - .setPos(151, 25) - .setSize(18, 18)); + .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(151, 25).setSize(18, 18)); } @Override 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 b4d5345391..3d81076bc9 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 @@ -5,6 +5,10 @@ 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 net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -13,11 +17,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachi import gregtech.api.objects.GT_ItemStack; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlock { + public byte mType = 0; public GT_MetaTileEntity_Locker(int aID, String aName, String aNameRegional, int aTier) { @@ -44,30 +46,22 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {MACHINE_CASINGS[this.mTier][(i + 1)]}; + ITexture[] tmp0 = { MACHINE_CASINGS[this.mTier][(i + 1)] }; rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = {MACHINE_CASINGS[this.mTier][(i + 1)], OVERLAYS_ENERGY_IN[this.mTier]}; + ITexture[] tmp1 = { MACHINE_CASINGS[this.mTier][(i + 1)], OVERLAYS_ENERGY_IN[this.mTier] }; rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = {MACHINE_CASINGS[this.mTier][(i + 1)], TextureFactory.of(OVERLAY_LOCKER)}; + ITexture[] tmp2 = { MACHINE_CASINGS[this.mTier][(i + 1)], TextureFactory.of(OVERLAY_LOCKER) }; rTextures[2][(i + 1)] = tmp2; } 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) { 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)]; } @@ -182,8 +176,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 18d54215a1..7b00a9746c 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 @@ -1,14 +1,16 @@ package gregtech.common.tileentities.storage; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; + public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_DigitalChestBase { + public int mItemCount = 0; public ItemStack mItemStack = null; NBTTagList mInvData = null; 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 886dd676e7..d6a936c745 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 @@ -1,12 +1,14 @@ package gregtech.common.tileentities.storage; +import net.minecraft.util.EnumChatFormatting; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.util.GT_Utility; -import net.minecraft.util.EnumChatFormatting; public class GT_MetaTileEntity_QuantumTank extends GT_MetaTileEntity_DigitalTankBase { + public GT_MetaTileEntity_QuantumTank(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier); } @@ -28,22 +30,26 @@ 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[] { 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[] { - 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 - }; + 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_SuperTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java index 3b7fb8e849..5dac66e49a 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 @@ -1,12 +1,14 @@ package gregtech.common.tileentities.storage; +import net.minecraft.util.EnumChatFormatting; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.util.GT_Utility; -import net.minecraft.util.EnumChatFormatting; public class GT_MetaTileEntity_SuperTank extends GT_MetaTileEntity_DigitalTankBase { + public GT_MetaTileEntity_SuperTank(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier); } @@ -28,21 +30,25 @@ 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[] { 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[] { - 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 - }; + 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 bd17809e59..15bbaf976d 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool.java +++ b/src/main/java/gregtech/common/tools/GT_Tool.java @@ -1,10 +1,7 @@ package gregtech.common.tools; -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; @@ -18,9 +15,15 @@ import net.minecraft.util.IChatComponent; import net.minecraft.world.World; import net.minecraftforge.event.world.BlockEvent; +import gregtech.api.damagesources.GT_DamageSources; +import gregtech.api.enums.SoundResource; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.items.GT_MetaGenerated_Tool; + public abstract class GT_Tool implements IToolStats { - public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune}; - public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting}; + + public static final Enchantment[] FORTUNE_ENCHANTMENT = { Enchantment.fortune }; + public static final Enchantment[] LOOTING_ENCHANTMENT = { Enchantment.looting }; public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0]; public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0]; @@ -138,18 +141,8 @@ public abstract class GT_Tool implements IToolStats { } @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) { return 0; } @@ -179,27 +172,20 @@ public abstract class GT_Tool implements IToolStats { 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) { + 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 5155d061fe..94c4681aa3 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java @@ -1,11 +1,7 @@ package gregtech.common.tools; -import gregtech.api.GregTech_API; -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; @@ -17,7 +13,14 @@ import net.minecraft.util.IChatComponent; import net.minecraft.world.World; import net.minecraftforge.event.world.BlockEvent; +import gregtech.api.GregTech_API; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + public class GT_Tool_Axe extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -95,21 +98,10 @@ public class GT_Tool_Axe 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) { int rAmount = 0; - if ((GregTech_API.sTimber) - && (!aPlayer.isSneaking()) + 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++) { @@ -124,29 +116,25 @@ 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) { + 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++) { + 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 (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 @@ -157,18 +145,15 @@ 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]; + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -177,8 +162,12 @@ public class GT_Tool_Axe extends GT_Tool { @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 228d06d2a7..a4ea2f701d 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java @@ -1,12 +1,7 @@ package gregtech.common.tools; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -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; @@ -19,7 +14,15 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +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; + public class GT_Tool_BranchCutter extends GT_Tool { + @Override public float getBaseDamage() { return 2.5F; @@ -41,21 +44,11 @@ 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)) { @@ -87,15 +80,18 @@ public class GT_Tool_BranchCutter extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(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 ab10e40bae..a99dac9e57 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java @@ -1,8 +1,5 @@ package gregtech.common.tools; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; @@ -12,7 +9,12 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; + public class GT_Tool_ButcheryKnife extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 200; @@ -70,7 +72,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,16 +82,19 @@ public class GT_Tool_ButcheryKnife extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(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); + 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 db57a82cb8..b12b8d37ea 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java @@ -1,9 +1,5 @@ package gregtech.common.tools; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -11,7 +7,13 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; + public class GT_Tool_BuzzSaw extends GT_Tool_Saw { + @Override public int getToolDamagePerContainerCraft() { return 100; @@ -55,23 +57,25 @@ 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] + ? 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 + 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); + 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 a031fbc9da..1895eff282 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 @@ -1,10 +1,12 @@ package gregtech.common.tools; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; -import net.minecraft.item.ItemStack; public class GT_Tool_Chainsaw_HV extends GT_Tool_Chainsaw_LV { + @Override public int getToolDamagePerBlockBreak() { return 800; @@ -48,9 +50,8 @@ 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] + ? 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 f0b26eb913..5ed7647859 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 @@ -1,14 +1,8 @@ package gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.OrePrefixes; -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; @@ -22,7 +16,16 @@ import net.minecraft.world.World; import net.minecraftforge.common.IShearable; import net.minecraftforge.event.world.BlockEvent; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; + public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -99,41 +102,29 @@ public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { try { GT_Mod.achievements.issueAchievement(aPlayer, "brrrr"); GT_Mod.achievements.issueAchievement(aPlayer, "buildChainsaw"); - } catch (Exception ignored) { - } + } 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())) { - 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()) + 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)))) { int tY = aY + 1; for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) { @@ -148,51 +139,49 @@ 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) { + 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++) { + 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 (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] + ? 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 + 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 c28f89e361..863c26ac82 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 @@ -1,10 +1,12 @@ package gregtech.common.tools; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; -import net.minecraft.item.ItemStack; public class GT_Tool_Chainsaw_MV extends GT_Tool_Chainsaw_LV { + @Override public int getToolDamagePerBlockBreak() { return 200; @@ -48,9 +50,8 @@ 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] + ? 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 aeff5ecd17..a774ab7856 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java @@ -1,13 +1,7 @@ package gregtech.common.tools; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -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; @@ -16,7 +10,16 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +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; + public class GT_Tool_Crowbar extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -94,12 +97,8 @@ 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; } @@ -132,7 +131,11 @@ 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); + 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 018bf3d636..77ab501e46 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 @@ -1,12 +1,14 @@ package gregtech.common.tools; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + import gregtech.GT_Mod; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; public class GT_Tool_Drill_HV extends GT_Tool_Drill_LV { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 400 : 800; @@ -53,16 +55,14 @@ public class GT_Tool_Drill_HV extends GT_Tool_Drill_LV { try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "highpowerdrill"); GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDDrill"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } @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] + ? 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 202d9750ad..395c7753ff 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 @@ -1,11 +1,5 @@ package gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -16,7 +10,15 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.GT_Mod; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + public class GT_Tool_Drill_LV extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 25 : 50; @@ -111,16 +113,14 @@ 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] + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -135,14 +135,18 @@ public class GT_Tool_Drill_LV extends GT_Tool { try { GT_Mod.achievements.issueAchievement(aPlayer, "driltime"); GT_Mod.achievements.issueAchievement(aPlayer, "buildDrill"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } @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 b512a9d0bb..e9aa60aa69 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 @@ -1,11 +1,13 @@ package gregtech.common.tools; +import net.minecraft.item.ItemStack; + import gregtech.GT_Mod; 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 { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 100 : 200; @@ -49,9 +51,8 @@ public class GT_Tool_Drill_MV 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] + ? 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 6dfcaf685e..b642592775 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_File.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_File.java @@ -1,9 +1,5 @@ package gregtech.common.tools; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -11,7 +7,13 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + public class GT_Tool_File extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -95,16 +97,14 @@ public class GT_Tool_File extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) - .mIconSet - .mTextures[gregtech.api.enums.OrePrefixes.toolHeadFile.mTextureIndex] + ? 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 + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -113,8 +113,12 @@ public class GT_Tool_File extends GT_Tool { @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 355078497e..c8ebcf14f2 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java @@ -2,16 +2,9 @@ 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; -import gregtech.api.items.GT_MetaGenerated_Tool; -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; @@ -24,13 +17,23 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; +import gregtech.GT_Mod; +import gregtech.api.enums.SoundResource; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +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; + 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; @@ -119,31 +122,21 @@ 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) { @@ -170,18 +163,15 @@ 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]; + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -193,8 +183,12 @@ 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); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " was squashed by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } @Override @@ -202,7 +196,6 @@ public class GT_Tool_HardHammer extends GT_Tool { super.onToolCrafted(aStack, aPlayer); try { GT_Mod.achievements.issueAchievement(aPlayer, "tools"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } } 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 84dbdba266..a108e7014c 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java @@ -1,9 +1,5 @@ package gregtech.common.tools; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; -import gregtech.common.items.behaviors.Behaviour_Hoe; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -14,7 +10,13 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; +import gregtech.common.items.behaviors.Behaviour_Hoe; + public class GT_Tool_Hoe extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -94,18 +96,15 @@ 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]; + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -122,8 +121,12 @@ 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 220ac01aba..aad96098fa 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java @@ -1,12 +1,7 @@ package gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.enums.Textures; -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; @@ -17,7 +12,15 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; +import gregtech.GT_Mod; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_ToolHarvestHelper; +import gregtech.api.util.GT_Utility; + public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 200 : 400; @@ -67,29 +70,19 @@ public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { 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) { @@ -113,8 +106,7 @@ public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { super.onToolCrafted(aStack, aPlayer); try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "hammertime"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } @Override @@ -124,8 +116,12 @@ 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 c211e1ac27..8354840ed7 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Knife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Knife.java @@ -1,7 +1,5 @@ package gregtech.common.tools; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -9,7 +7,11 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; + public class GT_Tool_Knife extends GT_Tool_Sword { + @Override public int getToolDamagePerBlockBreak() { return 100; @@ -57,9 +59,18 @@ 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 1042ab6344..e7aae56c05 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java @@ -1,9 +1,5 @@ package gregtech.common.tools; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -11,7 +7,13 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; + public class GT_Tool_Mortar extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -108,7 +110,11 @@ public class GT_Tool_Mortar extends GT_Tool { @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); + 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 ce7707b4c2..58394491eb 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java @@ -1,9 +1,5 @@ package gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -14,7 +10,13 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.GT_Mod; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + public class GT_Tool_Pickaxe extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 25 : 50; @@ -99,18 +101,15 @@ 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]; + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -124,14 +123,17 @@ public class GT_Tool_Pickaxe extends GT_Tool { aPlayer.triggerAchievement(AchievementList.buildBetterPickaxe); try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "flintpick"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } @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); + 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 dcf5c2675e..97b7092e36 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java @@ -1,9 +1,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; @@ -17,12 +15,17 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + 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; } @@ -38,18 +41,8 @@ public class GT_Tool_Plow 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) { int rConversions = 0; if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { this.sIsHarvestingRightNow.set(this); @@ -57,14 +50,12 @@ public class GT_Tool_Plow extends GT_Tool { 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))) { + && (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++; } } @@ -78,25 +69,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]; + ? 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 + 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 a8f557045f..b08e76dca3 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java @@ -1,5 +1,12 @@ package gregtech.common.tools; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + import gregtech.api.enums.SoundResource; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; @@ -9,14 +16,9 @@ import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.api.util.GT_Utility; import gregtech.common.items.behaviors.Behaviour_Plunger_Fluid; import gregtech.common.items.behaviors.Behaviour_Plunger_Item; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; public class GT_Tool_Plunger extends GT_Tool { + @Override public float getBaseDamage() { return 1.25F; @@ -54,8 +56,7 @@ public class GT_Tool_Plunger extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -73,14 +74,17 @@ public class GT_Tool_Plunger extends GT_Tool { if ((tObject instanceof IItemBehaviour)) { aItem.addItemBehavior(aID, (IItemBehaviour) tObject); } - } catch (Throwable ignored) { - } + } catch (Throwable ignored) {} } @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 3b554c39a4..ca9b9d3fa8 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java @@ -1,9 +1,5 @@ package gregtech.common.tools; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -11,7 +7,13 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; + public class GT_Tool_RollingPin extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -57,8 +59,12 @@ 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 881ed6f61f..8fa1494a7e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java @@ -1,11 +1,8 @@ package gregtech.common.tools; -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; @@ -18,7 +15,13 @@ import net.minecraft.util.IChatComponent; import net.minecraftforge.common.IShearable; import net.minecraftforge.event.world.BlockEvent; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + public class GT_Tool_Saw extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -75,23 +78,13 @@ 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; @@ -99,11 +92,11 @@ public class GT_Tool_Saw extends GT_Tool { aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0); } 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; - } + aDrops.add(new ItemStack(aBlock, 1, aMetaData)); + aPlayer.worldObj.setBlockToAir(aX, aY, aZ); + aEvent.dropChance = 1.0F; + return 1; + } return 0; } @@ -128,16 +121,14 @@ 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] + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -146,8 +137,12 @@ public class GT_Tool_Saw extends GT_Tool { @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 06423f2d45..f0ad65d838 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java @@ -1,5 +1,13 @@ package gregtech.common.tools; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; @@ -8,15 +16,9 @@ import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.common.items.behaviors.Behaviour_None; import gregtech.common.items.behaviors.Behaviour_Scoop; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; public class GT_Tool_Scoop extends GT_Tool { + public static Material sBeeHiveMaterial; @Override @@ -102,8 +104,7 @@ public class GT_Tool_Scoop extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -118,8 +119,12 @@ public class GT_Tool_Scoop extends GT_Tool { @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 1007c81f9f..42542bb75d 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java @@ -1,13 +1,8 @@ package gregtech.common.tools; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -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; @@ -20,7 +15,15 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; +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; + public class GT_Tool_Screwdriver extends GT_Tool { + public static final List<String> mEffectiveList = Arrays.asList( EntityCaveSpider.class.getName(), EntitySpider.class.getName(), @@ -30,8 +33,8 @@ public class GT_Tool_Screwdriver extends GT_Tool { "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; @@ -126,16 +129,14 @@ 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] + ? 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 + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -147,7 +148,12 @@ 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 + ")"); + 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 4243e9549f..acb032b26e 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 @@ -1,11 +1,13 @@ package gregtech.common.tools; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; -import net.minecraft.item.ItemStack; public class GT_Tool_Screwdriver_LV extends GT_Tool_Screwdriver { + @Override public float getMaxDurabilityMultiplier() { return 1.0F; @@ -19,16 +21,14 @@ 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] + ? 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 + 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 18245a7897..dd6cae9aaf 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java @@ -1,10 +1,7 @@ package gregtech.common.tools; -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; @@ -16,7 +13,13 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; +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; + public class GT_Tool_Sense extends GT_Tool { + private ThreadLocal<Object> sIsHarvestingRightNow = new ThreadLocal(); @Override @@ -36,18 +39,8 @@ public class GT_Tool_Sense 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) { int rConversions = 0; if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { this.sIsHarvestingRightNow.set(this); @@ -55,14 +48,12 @@ public class GT_Tool_Sense extends GT_Tool { 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))) { + && (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++; } } @@ -76,18 +67,15 @@ 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]; + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -98,8 +86,12 @@ 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 1cd88bf281..91a0802c3d 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java @@ -1,8 +1,5 @@ package gregtech.common.tools; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -11,7 +8,12 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + public class GT_Tool_Shovel extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -81,7 +83,12 @@ public class GT_Tool_Shovel extends GT_Tool { 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); + aBlock, + Material.sand, + Material.grass, + Material.ground, + Material.snow, + Material.clay); } @Override @@ -92,18 +99,15 @@ 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]; + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -113,7 +117,11 @@ public class GT_Tool_Shovel extends GT_Tool { @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); + 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 09e4174c96..0745359227 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java @@ -1,10 +1,5 @@ package gregtech.common.tools; -import gregtech.api.enums.SoundResource; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; -import gregtech.common.items.behaviors.Behaviour_SoftHammer; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -13,7 +8,14 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.SoundResource; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; +import gregtech.common.items.behaviors.Behaviour_SoftHammer; + public class GT_Tool_SoftHammer extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -107,18 +109,15 @@ 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]; + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -129,8 +128,12 @@ 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 2d4728e4da..d9ffb86059 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 @@ -1,13 +1,8 @@ package gregtech.common.tools; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -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; @@ -20,7 +15,15 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; +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; + public class GT_Tool_Soldering_Iron extends GT_Tool { + public static final List<String> mEffectiveList = Arrays.asList( EntityCaveSpider.class.getName(), EntitySpider.class.getName(), @@ -30,8 +33,8 @@ public class GT_Tool_Soldering_Iron extends GT_Tool { "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; @@ -120,15 +123,13 @@ 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] + 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 + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -139,8 +140,13 @@ 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 baafab6136..bb8222d221 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java @@ -1,16 +1,18 @@ package gregtech.common.tools; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.stats.AchievementList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + public class GT_Tool_Sword extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 200; @@ -107,16 +109,14 @@ 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] + ? 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 + 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_Turbine.java b/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java index dd5d2b424e..12d4d79884 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java @@ -1,7 +1,5 @@ package gregtech.common.tools; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -9,7 +7,11 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; + public abstract class GT_Tool_Turbine extends GT_Tool { + @Override public abstract float getBaseDamage(); @@ -30,9 +32,15 @@ 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_Turbine_Huge.java b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Huge.java index c4bb45c778..46b0de72d9 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Huge.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Huge.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; public class GT_Tool_Turbine_Huge extends GT_Tool_Turbine { + @Override public float getSpeedMultiplier() { return 4.0F; diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Large.java b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Large.java index d8bff76ca8..7e8307f6b0 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Large.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Large.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; public class GT_Tool_Turbine_Large extends GT_Tool_Turbine { + @Override public float getSpeedMultiplier() { return 3.0F; diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Normal.java b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Normal.java index a4ff2368d9..ac2fc29a89 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Normal.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Normal.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; public class GT_Tool_Turbine_Normal extends GT_Tool_Turbine { + @Override public float getSpeedMultiplier() { return 2.0F; diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java index d9517525c2..fab527386e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; public class GT_Tool_Turbine_Small extends GT_Tool_Turbine { + @Override public float getSpeedMultiplier() { return 1.0F; 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 b534ef2d23..1038c60dc4 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java @@ -1,10 +1,5 @@ package gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; -import gregtech.common.items.behaviors.Behaviour_Crowbar; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -15,7 +10,14 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.GT_Mod; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; +import gregtech.common.items.behaviors.Behaviour_Crowbar; + public class GT_Tool_UniversalSpade extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; @@ -119,18 +121,15 @@ 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]; + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -145,14 +144,17 @@ public class GT_Tool_UniversalSpade extends GT_Tool { aPlayer.triggerAchievement(AchievementList.buildSword); try { GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } @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 dedf87a553..2080d435ee 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java @@ -1,10 +1,5 @@ package gregtech.common.tools; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ToolHarvestHelper; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -12,7 +7,14 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ToolHarvestHelper; + public class GT_Tool_WireCutter extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 100; @@ -95,8 +97,7 @@ public class GT_Tool_WireCutter extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @@ -105,8 +106,12 @@ public class GT_Tool_WireCutter extends GT_Tool { @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 77aac357e8..955765287f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java @@ -1,13 +1,8 @@ package gregtech.common.tools; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -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; @@ -20,13 +15,21 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; +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; + 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; @@ -136,8 +139,12 @@ 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 e0ccdfde4f..812c29dcec 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 @@ -1,11 +1,13 @@ package gregtech.common.tools; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; -import net.minecraft.item.ItemStack; public class GT_Tool_Wrench_HV extends GT_Tool_Wrench_LV { + @Override public int getToolDamagePerBlockBreak() { return 800; @@ -54,16 +56,14 @@ 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] + ? 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 + 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 999d26ae9e..1ee87b442c 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 @@ -1,16 +1,18 @@ package gregtech.common.tools; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; + 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; } @@ -62,16 +64,14 @@ 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] + ? 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 + 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 fe2f0611ab..b8218eb3df 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 @@ -1,11 +1,13 @@ package gregtech.common.tools; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; -import net.minecraft.item.ItemStack; public class GT_Tool_Wrench_MV extends GT_Tool_Wrench_LV { + @Override public int getToolDamagePerBlockBreak() { return 200; @@ -54,16 +56,14 @@ 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] + ? 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 + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } diff --git a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_BranchCutter.java b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_BranchCutter.java index 0265fc899a..b831306df9 100644 --- a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_BranchCutter.java +++ b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_BranchCutter.java @@ -1,13 +1,15 @@ package gregtech.common.tools.pocket; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.behaviors.Behaviour_Switch_Metadata; import gregtech.common.tools.GT_Tool_BranchCutter; -import net.minecraft.item.ItemStack; public class GT_Tool_Pocket_BranchCutter extends GT_Tool_BranchCutter { + public final int mSwitchIndex; public GT_Tool_Pocket_BranchCutter(int aSwitchIndex) { diff --git a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_File.java b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_File.java index eb114ef6a1..84372b1d98 100644 --- a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_File.java +++ b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_File.java @@ -1,13 +1,15 @@ package gregtech.common.tools.pocket; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.behaviors.Behaviour_Switch_Metadata; import gregtech.common.tools.GT_Tool_File; -import net.minecraft.item.ItemStack; public class GT_Tool_Pocket_File extends GT_Tool_File { + public final int mSwitchIndex; public GT_Tool_Pocket_File(int aSwitchIndex) { diff --git a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Knife.java b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Knife.java index 8073b3449a..2b43984c51 100644 --- a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Knife.java +++ b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Knife.java @@ -1,13 +1,15 @@ package gregtech.common.tools.pocket; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.behaviors.Behaviour_Switch_Metadata; import gregtech.common.tools.GT_Tool_Knife; -import net.minecraft.item.ItemStack; public class GT_Tool_Pocket_Knife extends GT_Tool_Knife { + public final int mSwitchIndex; public GT_Tool_Pocket_Knife(int aSwitchIndex) { diff --git a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Multitool.java b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Multitool.java index c071b6b072..16ab9229c6 100644 --- a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Multitool.java +++ b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Multitool.java @@ -1,14 +1,16 @@ package gregtech.common.tools.pocket; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.behaviors.Behaviour_Switch_Metadata; import gregtech.common.tools.GT_Tool; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; public class GT_Tool_Pocket_Multitool extends GT_Tool { + public final int mSwitchIndex; public GT_Tool_Pocket_Multitool(int aSwitchIndex) { diff --git a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Saw.java b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Saw.java index 2bcbc1513e..579f809f2a 100644 --- a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Saw.java +++ b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Saw.java @@ -1,13 +1,15 @@ package gregtech.common.tools.pocket; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.behaviors.Behaviour_Switch_Metadata; import gregtech.common.tools.GT_Tool_Saw; -import net.minecraft.item.ItemStack; public class GT_Tool_Pocket_Saw extends GT_Tool_Saw { + public final int mSwitchIndex; public GT_Tool_Pocket_Saw(int aSwitchIndex) { diff --git a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Screwdriver.java b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Screwdriver.java index 0ac6782a3b..ce04ba2d15 100644 --- a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Screwdriver.java +++ b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_Screwdriver.java @@ -1,13 +1,15 @@ package gregtech.common.tools.pocket; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.behaviors.Behaviour_Switch_Metadata; import gregtech.common.tools.GT_Tool_Screwdriver; -import net.minecraft.item.ItemStack; public class GT_Tool_Pocket_Screwdriver extends GT_Tool_Screwdriver { + public final int mSwitchIndex; public GT_Tool_Pocket_Screwdriver(int aSwitchIndex) { diff --git a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_WireCutter.java b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_WireCutter.java index 13bfe896d1..6907ff6735 100644 --- a/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_WireCutter.java +++ b/src/main/java/gregtech/common/tools/pocket/GT_Tool_Pocket_WireCutter.java @@ -1,13 +1,15 @@ package gregtech.common.tools.pocket; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.behaviors.Behaviour_Switch_Metadata; import gregtech.common.tools.GT_Tool_WireCutter; -import net.minecraft.item.ItemStack; public class GT_Tool_Pocket_WireCutter extends GT_Tool_WireCutter { + public final int mSwitchIndex; public GT_Tool_Pocket_WireCutter(int aSwitchIndex) { diff --git a/src/main/java/gregtech/crossmod/GregtechWailaDataProvider.java b/src/main/java/gregtech/crossmod/GregtechWailaDataProvider.java index 3347cb7e10..2cc2e1a002 100644 --- a/src/main/java/gregtech/crossmod/GregtechWailaDataProvider.java +++ b/src/main/java/gregtech/crossmod/GregtechWailaDataProvider.java @@ -1,31 +1,35 @@ 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; + import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import gregtech.api.interfaces.tileentity.IGregtechWailaProvider; + public class GregtechWailaDataProvider implements IWailaDataProvider { + @Override public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) { return null; } @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); @@ -35,21 +39,15 @@ public class GregtechWailaDataProvider implements IWailaDataProvider { } @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) { + 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); } diff --git a/src/main/java/gregtech/crossmod/Waila.java b/src/main/java/gregtech/crossmod/Waila.java index 32b2906a94..a4ac168a05 100644 --- a/src/main/java/gregtech/crossmod/Waila.java +++ b/src/main/java/gregtech/crossmod/Waila.java @@ -1,13 +1,14 @@ package gregtech.crossmod; +import mcp.mobius.waila.api.IWailaDataProvider; +import mcp.mobius.waila.api.IWailaRegistrar; import cpw.mods.fml.common.event.FMLInterModComms; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.multitileentity.base.BaseMultiTileEntity; -import mcp.mobius.waila.api.IWailaDataProvider; -import mcp.mobius.waila.api.IWailaRegistrar; public class Waila { + public static void callbackRegister(IWailaRegistrar register) { final IWailaDataProvider multiBlockProvider = new GregtechWailaDataProvider(); diff --git a/src/main/java/gregtech/loaders/ExtraIcons.java b/src/main/java/gregtech/loaders/ExtraIcons.java index ff867cce25..42d5c1ec7c 100644 --- a/src/main/java/gregtech/loaders/ExtraIcons.java +++ b/src/main/java/gregtech/loaders/ExtraIcons.java @@ -2,12 +2,14 @@ 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 cpw.mods.fml.common.eventhandler.SubscribeEvent; + public class ExtraIcons { + public static IIcon steelLargeCellInner; public static IIcon aluminiumLargeCellInner; public static IIcon stainlesssteelLargeCellInner; @@ -24,10 +26,10 @@ public class ExtraIcons { 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_CoverBehaviorLoader.java b/src/main/java/gregtech/loaders/load/GT_CoverBehaviorLoader.java index 01987f8b47..37f626ef90 100644 --- a/src/main/java/gregtech/loaders/load/GT_CoverBehaviorLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_CoverBehaviorLoader.java @@ -3,6 +3,7 @@ package gregtech.loaders.load; import gregtech.api.util.GT_Log; public class GT_CoverBehaviorLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Adding Cover Behaviors"); diff --git a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java index 580223f444..470924053f 100644 --- a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java @@ -1,5 +1,9 @@ package gregtech.loaders.load; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -9,24 +13,22 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; 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.sGreenVitriol = - GT_Mod.gregtechproxy.addFluid("solution.greenvitriol", "Green Vitriol 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.sGreenVitriol = GT_Mod.gregtechproxy + .addFluid("solution.greenvitriol", "Green Vitriol 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), @@ -39,8 +41,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.NaquadahEnriched, 1L) }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadah, 1L) }, null, null, null, @@ -49,8 +51,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NaquadahEnriched, 1L) }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadah, 1L) }, null, null, null, @@ -59,8 +61,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahEnriched, 1L) }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Naquadah, 1L) }, null, null, null, @@ -69,8 +71,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadria, 1L) }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadah, 1L) }, null, null, null, @@ -79,8 +81,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadria, 1L) }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadah, 1L) }, null, null, null, @@ -89,8 +91,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NaquadahEnriched, 1L) }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadah, 1L) }, null, null, null, @@ -101,8 +103,8 @@ public class GT_FuelLoader implements Runnable { // 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)}, + new ItemStack[] { GT_ModHandler.getModItem("AWWayofTime", "reinforcedSlate", 1L) }, + new ItemStack[] { GT_ModHandler.getModItem("AWWayofTime", "blankSlate", 1L) }, null, null, null, @@ -111,8 +113,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_ModHandler.getModItem("AWWayofTime", "imbuedSlate", 1L) }, + new ItemStack[] { GT_ModHandler.getModItem("AWWayofTime", "reinforcedSlate", 1L) }, null, null, null, @@ -121,8 +123,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_ModHandler.getModItem("AWWayofTime", "demonicSlate", 1L) }, + new ItemStack[] { GT_ModHandler.getModItem("AWWayofTime", "imbuedSlate", 1L) }, null, null, null, @@ -131,8 +133,8 @@ public class GT_FuelLoader implements Runnable { 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)}, + new ItemStack[] { GT_ModHandler.getModItem("AWWayofTime", "bloodMagicBaseItems", 1L, 27) }, + new ItemStack[] { GT_ModHandler.getModItem("AWWayofTime", "demonicSlate", 1L) }, null, null, null, diff --git a/src/main/java/gregtech/loaders/load/GT_ItemIterator.java b/src/main/java/gregtech/loaders/load/GT_ItemIterator.java index 3e1cf72c06..e894acf4be 100644 --- a/src/main/java/gregtech/loaders/load/GT_ItemIterator.java +++ b/src/main/java/gregtech/loaders/load/GT_ItemIterator.java @@ -1,5 +1,15 @@ package gregtech.loaders.load; +import mods.railcraft.api.core.items.IToolCrowbar; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.IFluidContainerItem; + import buildcraft.api.tools.IToolWrench; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; @@ -14,64 +24,62 @@ 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 mods.railcraft.api.core.items.IToolCrowbar; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.IFluidContainerItem; public class GT_ItemIterator implements Runnable { + @Override public void run() { 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))) { + 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); + 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); + 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))) { + 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), @@ -79,17 +87,16 @@ public class GT_ItemIterator implements Runnable { 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))) { + 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), @@ -98,10 +105,19 @@ public class GT_ItemIterator implements Runnable { 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)"); @@ -144,7 +160,7 @@ public class GT_ItemIterator implements Runnable { GT_Log.out.println("GT_Mod: Scanning ItemList."); try { - /*(tName.equals("tile.sedimentaryStone")) ||**/ + /* (tName.equals("tile.sedimentaryStone")) || **/ for (Object o : Item.itemRegistry) { Object tObject; if (((tObject = o) instanceof Item) && (!(tObject instanceof GT_Generic_Item))) { @@ -155,9 +171,9 @@ public class GT_ItemIterator implements Runnable { if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { if ((GregTech_API.sRecipeFile.get( - ConfigCategories.Recipes.disabledrecipes, - "infiniteDurabilityRCCrowbars", - false)) + ConfigCategories.Recipes.disabledrecipes, + "infiniteDurabilityRCCrowbars", + false)) && (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { GT_Log.out.println("GT_Mod: Removed infinite RC Crowbar: " + tName); } @@ -169,9 +185,9 @@ public class GT_ItemIterator implements Runnable { if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { if ((GregTech_API.sRecipeFile.get( - ConfigCategories.Recipes.disabledrecipes, - "infiniteDurabilityBCWrenches", - false)) + ConfigCategories.Recipes.disabledrecipes, + "infiniteDurabilityBCWrenches", + false)) && (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { GT_Log.out.println("GT_Mod: Removed infinite BC Wrench: " + tName); } @@ -194,8 +210,7 @@ public class GT_ItemIterator implements Runnable { } } } - if (((tItem instanceof ItemFood)) - && (tItem != ItemList.IC2_Food_Can_Filled.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) { @@ -283,124 +298,122 @@ 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)); + 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.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, 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")) + 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, 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)); } } @@ -408,8 +421,8 @@ 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)); } } } diff --git a/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java b/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java index d067cf74d5..ce66b80a55 100644 --- a/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java @@ -1,13 +1,15 @@ package gregtech.loaders.load; -import gregtech.GT_Mod; -import gregtech.api.enums.SoundResource; -import gregtech.api.util.GT_Log; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import gregtech.GT_Mod; +import gregtech.api.enums.SoundResource; +import gregtech.api.util.GT_Log; + public class GT_SonictronLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Loading Sonictron Sounds"); @@ -110,8 +112,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 d8fc898cf4..fe8ff8c12d 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java @@ -7,6 +7,7 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.TextureSet; public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandler { + public ProcessingConfig() { new GTNH_ExtraMaterials(); Materials.add(this); @@ -17,9 +18,8 @@ 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, @@ -54,25 +54,26 @@ public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandle @Override public void onComponentInit() { /** This is just left here as an example of how to add components. **/ - /* Enabling specific components: - OrePrefixes.spring.enableComponent(Materials.Cobalt); - OrePrefixes.ingotDouble.enableComponent(Materials.Cobalt); - OrePrefixes.ingotTriple.enableComponent(Materials.Cobalt); - OrePrefixes.ingotQuadruple.enableComponent(Materials.Cobalt); - OrePrefixes.ingotQuintuple.enableComponent(Materials.Cobalt); - OrePrefixes.plateDouble.enableComponent(Materials.Cobalt); - OrePrefixes.plateTriple.enableComponent(Materials.Cobalt); - OrePrefixes.plateQuadruple.enableComponent(Materials.Cobalt); - OrePrefixes.plateQuintuple.enableComponent(Materials.Cobalt); - OrePrefixes.plateDense.enableComponent(Materials.Cobalt); */ + /* + * Enabling specific components: OrePrefixes.spring.enableComponent(Materials.Cobalt); + * OrePrefixes.ingotDouble.enableComponent(Materials.Cobalt); + * OrePrefixes.ingotTriple.enableComponent(Materials.Cobalt); + * OrePrefixes.ingotQuadruple.enableComponent(Materials.Cobalt); + * OrePrefixes.ingotQuintuple.enableComponent(Materials.Cobalt); + * OrePrefixes.plateDouble.enableComponent(Materials.Cobalt); + * OrePrefixes.plateTriple.enableComponent(Materials.Cobalt); + * OrePrefixes.plateQuadruple.enableComponent(Materials.Cobalt); + * OrePrefixes.plateQuintuple.enableComponent(Materials.Cobalt); + * OrePrefixes.plateDense.enableComponent(Materials.Cobalt); + */ } @Override public void onComponentIteration(Materials aMaterial) { /** This is just left here as an example of how to add components. **/ - /*Enabling/Disabling components depending on the current Materials values: - if ((aMaterial.mTypes & 0x40) != 0) { //This material can be made into tool heads - OrePrefixes.plateQuadruple.mDisabledItems.remove(aMaterial); - } */ + /* + * Enabling/Disabling components depending on the current Materials values: if ((aMaterial.mTypes & 0x40) != 0) + * { //This material can be made into tool heads OrePrefixes.plateQuadruple.mDisabledItems.remove(aMaterial); } + */ } } diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java index d1c7d48f3a..58808e2162 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java @@ -8,6 +8,7 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; 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; public static boolean aEnableThaumcraftMats = Loader.isModLoaded("Thaumcraft") || aTGregSupport; diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index 4d5de34782..58f56cbd70 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -1,5 +1,19 @@ package gregtech.loaders.misc; +import java.util.concurrent.ConcurrentHashMap; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import net.minecraft.stats.AchievementList; +import net.minecraft.stats.StatBase; +import net.minecraftforge.common.AchievementPage; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.EntityItemPickupEvent; +import net.minecraftforge.fluids.FluidStack; + +import thaumcraft.api.ThaumcraftApiHelper; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -15,20 +29,9 @@ 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; -import net.minecraft.stats.Achievement; -import net.minecraft.stats.AchievementList; -import net.minecraft.stats.StatBase; -import net.minecraftforge.common.AchievementPage; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.EntityItemPickupEvent; -import net.minecraftforge.fluids.FluidStack; -import thaumcraft.api.ThaumcraftApiHelper; public class GT_Achievements { + public static int oreReg = -1; public static int assReg = -1; public ConcurrentHashMap<String, Achievement> achievementList; @@ -64,8 +67,8 @@ public class GT_Achievements { "tools", 0, 4, - GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.HARDHAMMER, 1, Materials.Iron, Materials.Wood, null), + GT_MetaGenerated_Tool_01.INSTANCE + .getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, Materials.Iron, Materials.Wood, null), "flintpick", false); registerAchievement( @@ -73,7 +76,11 @@ public class GT_Achievements { 2, 4, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.DRILL_LV, 1, Materials.BlueSteel, Materials.StainlessSteel, null), + GT_MetaGenerated_Tool_01.DRILL_LV, + 1, + Materials.BlueSteel, + Materials.StainlessSteel, + null), "tools", false); registerAchievement( @@ -81,7 +88,11 @@ public class GT_Achievements { 2, 6, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.CHAINSAW_LV, 1, Materials.BlueSteel, Materials.StainlessSteel, null), + GT_MetaGenerated_Tool_01.CHAINSAW_LV, + 1, + Materials.BlueSteel, + Materials.StainlessSteel, + null), "driltime", false); registerAchievement( @@ -89,7 +100,11 @@ public class GT_Achievements { 3, 5, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.DRILL_HV, 1, Materials.TungstenSteel, Materials.TungstenSteel, null), + GT_MetaGenerated_Tool_01.DRILL_HV, + 1, + Materials.TungstenSteel, + Materials.TungstenSteel, + null), "driltime", false); registerAchievement( @@ -97,7 +112,11 @@ public class GT_Achievements { 3, 7, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.JACKHAMMER, 1, Materials.TungstenSteel, Materials.TungstenSteel, null), + 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); @@ -107,13 +126,22 @@ public class GT_Achievements { -2, 4, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, Materials.Steel, Materials.Iron, null), + 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); + "crushed", + 0, + 6, + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Tin, 1L), + "tools", + false); registerAchievement( "cleandust", 0, @@ -147,7 +175,12 @@ public class GT_Achievements { 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); + "bronze", + 2, + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 1L), + "flintpick", + false); registerAchievement( "simplyeco", 2, @@ -170,9 +203,19 @@ public class GT_Achievements { 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); + "gtquantumprocessor", + -13, + -12, + ItemList.Circuit_Quantumprocessor.get(1), + "energyflow", + false); registerAchievement( - "gtcrystalprocessor", -11, -12, ItemList.Circuit_Crystalprocessor.get(1), "gtquantumprocessor", false); + "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); @@ -185,10 +228,20 @@ public class GT_Achievements { registerAchievement("luck", 2, -6, ItemList.ZPM.get(1), "", false); registerAchievement( - "steel", 4, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), "bronze", false); + "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); + "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", @@ -238,7 +291,12 @@ public class GT_Achievements { 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); + "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); @@ -254,7 +312,12 @@ public class GT_Achievements { "upgrade2", false); registerAchievement( - "osmium", 16, -2, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium, 1L), "upgrade2", false); + "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); @@ -271,7 +334,12 @@ public class GT_Achievements { 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); + "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", @@ -314,18 +382,21 @@ public class GT_Achievements { } 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; } @@ -342,14 +413,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(); } @@ -372,8 +447,8 @@ public class GT_Achievements { return null; } if (recipe.getOutput(0) == null) { - GT_Mod.GT_FML_LOGGER.error( - "Invalid achievement registration attempt for recipe with null output", new Exception()); + GT_Mod.GT_FML_LOGGER + .error("Invalid achievement registration attempt for recipe with null output", new Exception()); return null; } if (this.achievementList.get(recipe.getOutput(0).getUnlocalizedName()) == null) { @@ -571,30 +646,38 @@ 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")) { - issueAchievement(player, "magic"); - } 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"); - } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.massfab.tier.")) { - issueAchievement(player, "universal"); - issueAchievement(player, "buildMassFab"); - } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicgenerator.naquadah.tier.")) { - issueAchievement(player, "alienpower"); - } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.replicator.tier.")) { - issueAchievement(player, "replication"); - } else if (stack.getUnlocalizedName().equals("gt.blockmachines.basicgenerator.plasmagenerator.tier.07")) { - issueAchievement(player, "fullefficiency"); - } else if (stack.getUnlocalizedName().equals("gt.blockmachines.multimachine.largeturbine")) { - issueAchievement(player, "muchsteam"); - } else if (stack.getUnlocalizedName().equals("gt.blockmachines.multimachine.largehpturbine")) { - issueAchievement(player, "efficientsteam"); - } else if (stack.getUnlocalizedName().equals("gt.blockmachines.multimachine.cleanroom")) { - issueAchievement(player, "gtcleanroom"); - } + } 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")) { + issueAchievement(player, "highmage"); + } else + if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.amplifab.tier.")) { + issueAchievement(player, "amplifier"); + } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.massfab.tier.")) { + issueAchievement(player, "universal"); + issueAchievement(player, "buildMassFab"); + } else + if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicgenerator.naquadah.tier.")) { + issueAchievement(player, "alienpower"); + } else if (stack.getUnlocalizedName() + .startsWith("gt.blockmachines.basicmachine.replicator.tier.")) { + issueAchievement(player, "replication"); + } else + if (stack.getUnlocalizedName() + .equals("gt.blockmachines.basicgenerator.plasmagenerator.tier.07")) { + issueAchievement(player, "fullefficiency"); + } else + if (stack.getUnlocalizedName().equals("gt.blockmachines.multimachine.largeturbine")) { + issueAchievement(player, "muchsteam"); + } else if (stack.getUnlocalizedName() + .equals("gt.blockmachines.multimachine.largehpturbine")) { + issueAchievement(player, "efficientsteam"); + } else + if (stack.getUnlocalizedName().equals("gt.blockmachines.multimachine.cleanroom")) { + issueAchievement(player, "gtcleanroom"); + } } else if (stack.getUnlocalizedName().equals("gt.neutronreflector")) { issueAchievement(player, "reflect"); } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.1")) { @@ -663,17 +746,16 @@ 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") + } 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 == + issueAchievement(player, "steel"); + } + // } else if (data.mPrefix == OrePrefixes.circuit && data.mMaterial.mMaterial == // Materials.Advanced) { - // issueAchievement(player, "stepforward"); + // 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": @@ -764,27 +846,32 @@ public class GT_Achievements { || (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"); - } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.1")) { - issueAchievement(player, "upgrade"); - } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.2")) { - issueAchievement(player, "upgrade2"); - } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.3")) { - issueAchievement(player, "upgrade3"); - } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.4")) { - issueAchievement(player, "upgrade4"); - } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.5")) { - issueAchievement(player, "upgrade5"); - } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.6")) { - issueAchievement(player, "over9000"); - } else if (stack.getUnlocalizedName().equals("gt.blockcasings.15")) { - issueAchievement(player, "conducting"); - } - if (player.capabilities.isCreativeMode - && stack.getUnlocalizedName() - .equals("gt.metaitem.01.32761")) { // Debug Scanner pickup shows all assline recipes. + issueAchievement(player, "buildQArmor"); + } else + if (stack.getUnlocalizedName().equals("ic2.itemPartCircuitAdv")) { + issueAchievement(player, "stepforward"); + } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.1")) { + issueAchievement(player, "upgrade"); + } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.2")) { + issueAchievement(player, "upgrade2"); + } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.3")) { + issueAchievement(player, "upgrade3"); + } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.4")) { + issueAchievement(player, "upgrade4"); + } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.5")) { + issueAchievement(player, "upgrade5"); + } else if (stack.getUnlocalizedName().equals("gt.blockcasings5.6")) { + issueAchievement(player, "over9000"); + } else if (stack.getUnlocalizedName().equals("gt.blockcasings.15")) { + issueAchievement(player, "conducting"); + } + 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; diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java index 55089c37d1..2ad9274c43 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -8,6 +8,18 @@ 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 java.awt.*; +import java.util.Arrays; +import java.util.Locale; +import java.util.function.Consumer; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +import org.apache.commons.lang3.text.WordUtils; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import forestry.api.apiculture.*; @@ -32,20 +44,12 @@ 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.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import org.apache.commons.lang3.text.WordUtils; /** * Bride Class for Lambdas */ class GT_BeeDefinitionReference { + protected static final byte FORESTRY = 0; protected static final byte EXTRABEES = 1; protected static final byte GENDUSTRY = 2; @@ -56,229 +60,154 @@ class GT_BeeDefinitionReference { } public enum GT_BeeDefinition implements IBeeDefinition { + // 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("BiomesOPlenty", "mudball", 1, 0), 0.05f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { - AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); - 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), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.STICKY), 0.05f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - if (Loader.isModLoaded("TConstruct")) { - beeSpecies.addProduct(GT_ModHandler.getModItem("TConstruct", "strangeFood", 1, 0), 0.10f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("TConstruct", "slime.gel", 1, 2), 0.02f); - } - }, - template -> { - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.MUSHROOMS); - AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "water")); - }, - dis -> { - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "peat", 1, 0), 0.15f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "mulch", 1, 0), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.WHEAT); - 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), + 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem("BiomesOPlenty", "mudball", 1, 0), 0.05f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> { + AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); + 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), 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.STICKY), 0.05f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + if (Loader.isModLoaded("TConstruct")) { + beeSpecies.addProduct(GT_ModHandler.getModItem("TConstruct", "strangeFood", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem("TConstruct", "slime.gel", 1, 2), 0.02f); + } + }, template -> { + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.MUSHROOMS); + AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "water")); + }, dis -> { + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "peat", 1, 0), 0.15f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "mulch", 1, 0), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.WHEAT); + 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), 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); beeSpecies.addSpecialty(ItemList.IC2_Resin.get(1), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); - }, - dis -> { + }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(SLIMEBALL, PEAT, 15); tMutation.requireResource("logRubber"); }), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.CACTI); - AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.DOWN_1); - AlleleHelper.instance.set(template, NOCTURNAL, true); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectCreeper); - }, - 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), - 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); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); - AlleleHelper.instance.set(template, NOCTURNAL, true); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.NORMAL); - AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); - beeSpecies.addSpecialty(ItemList.Food_Sliced_Cucumber.get(1), 0.05f); - beeSpecies.addSpecialty(ItemList.Food_Sliced_Onion.get(1), 0.05f); - beeSpecies.addSpecialty(ItemList.Food_Sliced_Tomato.get(1), 0.05f); - beeSpecies.addSpecialty(ItemList.Food_Sliced_Cheese.get(1), 0.05f); - beeSpecies.addSpecialty(new ItemStack(Items.cooked_porkchop, 1, 0), 0.05f); - beeSpecies.addSpecialty(new ItemStack(Items.cooked_beef, 1, 0), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOW); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_2); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectFertile); - AlleleHelper.instance.set(template, TERRITORY, Territory.LARGE); - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ASH), 0.15f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.NORMAL); - AlleleHelper.instance.set(template, TERRITORY, Territory.LARGE); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.WHEAT); - AlleleHelper.instance.set(template, FLOWERING, Flowering.FASTER); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(COAL, CLAY, 10); - tMutation.restrictTemperature(HELLISH); - }), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(WARM); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FASTEST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.WHEAT); - AlleleHelper.instance.set(template, FLOWERING, Flowering.FASTER); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "rock")); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(ASH, COAL, 10); - tMutation.requireResource("blockApatite"); - }), - FERTILIZER( - GT_BranchDefinition.ORGANIC, - "Fertilizer", - true, - new Color(0x7fcef5), - new Color(0x654525), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> { + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.CACTI); + AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.DOWN_1); + AlleleHelper.instance.set(template, NOCTURNAL, true); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectCreeper); + }, 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), 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); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); + AlleleHelper.instance.set(template, NOCTURNAL, true); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.NORMAL); + AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); + 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), beeSpecies -> { + beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); + beeSpecies.addSpecialty(ItemList.Food_Sliced_Cucumber.get(1), 0.05f); + beeSpecies.addSpecialty(ItemList.Food_Sliced_Onion.get(1), 0.05f); + beeSpecies.addSpecialty(ItemList.Food_Sliced_Tomato.get(1), 0.05f); + beeSpecies.addSpecialty(ItemList.Food_Sliced_Cheese.get(1), 0.05f); + beeSpecies.addSpecialty(new ItemStack(Items.cooked_porkchop, 1, 0), 0.05f); + beeSpecies.addSpecialty(new ItemStack(Items.cooked_beef, 1, 0), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOW); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_2); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectFertile); + AlleleHelper.instance.set(template, TERRITORY, Territory.LARGE); + 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), beeSpecies -> { + beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ASH), 0.15f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.NORMAL); + AlleleHelper.instance.set(template, TERRITORY, Territory.LARGE); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.WHEAT); + AlleleHelper.instance.set(template, FLOWERING, Flowering.FASTER); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(COAL, CLAY, 10); + tMutation.restrictTemperature(HELLISH); + }), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(WARM); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FASTEST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.WHEAT); + AlleleHelper.instance.set(template, FLOWERING, Flowering.FASTER); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "rock")); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(ASH, COAL, 10); + tMutation.requireResource("blockApatite"); + }), + 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); @@ -287,260 +216,152 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.addSpecialty(ItemList.IC2_Fertilizer.get(1), 0.3f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(WARM); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.FASTEST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); 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), + 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 -> { + }, 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); }), // Tea bee, Humidity: normal, Parents: Ash and Fertilizer, Mutationrate: 10%, combrate: 10% - TEA( - GT_BranchDefinition.ORGANIC, - "Tea", - false, - new Color(0x65D13A), - new Color(0x9a9679), - beeSpecies -> { - beeSpecies.addProduct( - GT_ModHandler.getModItem("harvestcraft", "tealeafItem", 1, ItemList.Crop_Drop_TeaLeaf.get(1)), - 0.10f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + TEA(GT_BranchDefinition.ORGANIC, "Tea", false, new Color(0x65D13A), new Color(0x9a9679), beeSpecies -> { + beeSpecies.addProduct( + GT_ModHandler.getModItem("harvestcraft", "tealeafItem", 1, ItemList.Crop_Drop_TeaLeaf.get(1)), + 0.10f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(NORMAL); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> dis.registerMutation(FERTILIZER, ASH, 10)), // 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDSTONE), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.RAREEARTH), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LAPIS), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CERTUS), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.FLUIX), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DIAMOND), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(HOT); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(CERTUS, COAL, 3); - tMutation.requireResource("blockDiamond"); - }), - 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); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.REDGARNET), 0.05f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, DIAMOND, 5); - tMutation.requireResource("blockRuby"); - }), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OLIVINE), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MAGNESIUM), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.RAREEARTH), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LAPIS), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CERTUS), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.FLUIX), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DIAMOND), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(HOT); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(CERTUS, COAL, 3); + tMutation.requireResource("blockDiamond"); + }), + 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); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.REDGARNET), 0.05f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, DIAMOND, 5); + tMutation.requireResource("blockRuby"); + }), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OLIVINE), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MAGNESIUM), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.EMERALD), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ALUMINIUM), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(OLIVINE, DIAMOND, 4); - tMutation.requireResource("blockEmerald"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.PYROPE), 0.05f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(WARM); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FAST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(DIAMOND, RUBY, 4); - tMutation.requireResource("blockGarnetRed"); - }), - YELLOWGARNET( - GT_BranchDefinition.GEM, - "YellowGarnet", - false, - new Color(0xA3A341), - new Color(0xEDEDCE), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ALUMINIUM), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(OLIVINE, DIAMOND, 4); + tMutation.requireResource("blockEmerald"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.PYROPE), 0.05f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(WARM); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FAST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(DIAMOND, RUBY, 4); + tMutation.requireResource("blockGarnetRed"); + }), + 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); @@ -548,848 +369,522 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(WARM); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.FAST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { + }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(EMERALD, REDGARNET, 3); tMutation.requireResource("blockGarnetYellow"); }), - 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); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(WARM); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FAST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - AlleleHelper.instance.set(template, NOCTURNAL, true); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, RUBY, 4); - tMutation.requireResource("blockFirestone"); - }), + 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); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(WARM); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FAST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + AlleleHelper.instance.set(template, NOCTURNAL, true); + }, 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.COPPER), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.GOLD), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TIN), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ZINC), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LEAD), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SULFUR), 0.05f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(WARM); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(COAL, COPPER, 13); - tMutation.requireResource("blockLead"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.TIN), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(TIN, COPPER, 13); - tMutation.requireResource("blockIron"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.IRON), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(WARM); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NICKEL), 0.15f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.02f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(IRON, COPPER, 13); - tMutation.requireResource("blockNickel"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.GALLIUM), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(IRON, TIN, 13); - tMutation.requireResource("blockZinc"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SULFUR), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(LEAD, TIN, 10); - tMutation.requireResource("blockSilver"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SILVER), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(WARM); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.FASTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(LEAD, SILVER, 9); - tMutation.requireResource("blockCryolite"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.NICKEL), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(WARM); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ARSENIC), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(WARM); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(ZINC, SILVER, 10); - tMutation.requireResource("blockArsenic"); - }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.GOLD), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TIN), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ZINC), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LEAD), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SULFUR), 0.05f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(WARM); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(COAL, COPPER, 13); + tMutation.requireResource("blockLead"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.TIN), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(TIN, COPPER, 13); + tMutation.requireResource("blockIron"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.IRON), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(WARM); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NICKEL), 0.15f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.02f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(IRON, COPPER, 13); + tMutation.requireResource("blockNickel"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.GALLIUM), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(IRON, TIN, 13); + tMutation.requireResource("blockZinc"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SULFUR), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(LEAD, TIN, 10); + tMutation.requireResource("blockSilver"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SILVER), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(WARM); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.FASTEST), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(LEAD, SILVER, 9); + tMutation.requireResource("blockCryolite"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.NICKEL), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(WARM); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ARSENIC), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(WARM); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), + 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); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.BAUXITE), 0.05f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { IBeeMutationCustom tMutation = dis.registerMutation(NICKEL, ZINC, 9); tMutation.requireResource("blockAluminium"); }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ALMANDINE), 0.05f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - 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), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ALMANDINE), 0.05f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), + }, 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), + 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 -> { + }, 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MAGNESIUM), 0.05f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - 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), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MAGNESIUM), 0.05f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MANGANESE), 0.15f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.IRON), 0.05f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TUNGSTEN), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MOLYBDENUM), 0.05f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.IRIDIUM), 0.02f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(DIAMOND, CHROME, 5); - tMutation.requireResource("blockNickel"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OSMIUM), 0.05f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OSMIUM), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.IRIDIUM), 0.05f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(COLD); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SALT), 0.35f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LITHIUM), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(WARM); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(CLAY, ALUMINIUM, 5); - tMutation.requireResource("blockSalt"); - }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SALT), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(SALTY, ALUMINIUM, 5); - tMutation.requireResource("frameGtLithium"); - }), - ELECTROTINE( - GT_BranchDefinition.RAREMETAL, - "Electrotine", - false, - new Color(0x1E90FF), - new Color(0x3CB4C8), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MOLYBDENUM), 0.05f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.IRIDIUM), 0.02f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(DIAMOND, CHROME, 5); + tMutation.requireResource("blockNickel"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OSMIUM), 0.05f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OSMIUM), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.IRIDIUM), 0.05f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(COLD); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SALT), 0.35f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LITHIUM), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(WARM); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(CLAY, ALUMINIUM, 5); + tMutation.requireResource("blockSalt"); + }), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SALT), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(SALTY, ALUMINIUM, 5); + tMutation.requireResource("frameGtLithium"); + }), + 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); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDSTONE), 0.05f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> { + }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), 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, - "Sulfur", - 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), + SULFUR(GT_BranchDefinition.RAREMETAL, "Sulfur", 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, - "Indium", - 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.SLOWEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(LEAD, OSMIUM, 1); - tMutation.requireResource("blockIndium"); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(39, "Venus")); // Venus Dim - }), + INDIUM(GT_BranchDefinition.RAREMETAL, "Indium", 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.SLOWEST), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(LEAD, OSMIUM, 1); + 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(COLD); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOW); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.SNOW); - 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); - tMutation.restrictTemperature(ICY); - }), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(WARM); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); - AlleleHelper.instance.set(template, NOCTURNAL, true); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.NETHER); - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LAPIS), 0.20f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LAPOTRON), 0.10f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(ICY); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); - 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(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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.20f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.PYROTHEUM), 0.15f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FASTEST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.NONE); - AlleleHelper.instance.set(template, NOCTURNAL, true); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.NETHER); - AlleleHelper.instance.set(template, FLOWERING, Flowering.AVERAGE); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, ENERGY, 4); - tMutation.restrictTemperature(HELLISH); - }), - CRYOTHEUM( - GT_BranchDefinition.IC2, - "Cryotheum", - false, - new Color(0x2660ff), - new Color(0x5af7ff), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BLIZZ), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CRYOTHEUM), 0.20f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(ICY); - 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(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(GameRegistry.findBlock("IC2", "blockITNT"), 0); - }), + 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(COLD); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOW); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.SNOW); + 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); + tMutation.restrictTemperature(ICY); + }), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(WARM); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); + AlleleHelper.instance.set(template, NOCTURNAL, true); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.NETHER); + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LAPIS), 0.20f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LAPOTRON), 0.10f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(ICY); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); + 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(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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.20f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.PYROTHEUM), 0.15f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FASTEST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.NONE); + AlleleHelper.instance.set(template, NOCTURNAL, true); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.NETHER); + AlleleHelper.instance.set(template, FLOWERING, Flowering.AVERAGE); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, ENERGY, 4); + tMutation.restrictTemperature(HELLISH); + }), + CRYOTHEUM(GT_BranchDefinition.IC2, "Cryotheum", false, new Color(0x2660ff), new Color(0x5af7ff), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BLIZZ), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CRYOTHEUM), 0.20f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(ICY); + 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(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(GameRegistry.findBlock("IC2", "blockITNT"), 0); + }), // 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(COPPER, REDSTONE, 10); - tMutation.requireResource("blockRedAlloy"); - }), - REDSTONEALLOY( - GT_BranchDefinition.GTALLOY, - "RedStoneAlloy", - false, - new Color(0xA50808), - new Color(0xE80000), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(COPPER, REDSTONE, 10); + tMutation.requireResource("blockRedAlloy"); + }), + 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); - }, - dis -> { + }, 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); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(WARM); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.FAST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { + }, 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); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.FAST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { + }, 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); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); AlleleHelper.instance.set(template, FLOWERING, Flowering.FAST); - }, - dis -> { - IBeeMutationCustom tMutation = - dis.registerMutation(ENERGETICALLOY, getSpecies(FORESTRY, "Phantasmal"), 6); + }, dis -> { + 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); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); - }, - dis -> { + }, 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), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FAST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { - IBeeMutationCustom tMutation = - dis.registerMutation(ELECTRICALSTEEL, getSpecies(FORESTRY, "Demonic"), 7); - tMutation.requireResource("blockDarkSteel"); - }), - PULSATINGIRON( - GT_BranchDefinition.GTALLOY, - "PulsatingIron", - false, - new Color(0x6DD284), - new Color(0x006600), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FAST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(ELECTRICALSTEEL, getSpecies(FORESTRY, "Demonic"), 7); + tMutation.requireResource("blockDarkSteel"); + }), + 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); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.FAST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { + }, 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); @@ -1397,254 +892,179 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CHROME), 0.05f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(HOT); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.FAST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); - }, - dis -> { + }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(CHROME, STEEL, 9); tMutation.requireResource("blockStainlessSteel"); }), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CHROME), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(HOT); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, GT_Bees.speedBlinding); - AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "teleport")); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - 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), + 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CHROME), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(HOT); + }, template -> { + AlleleHelper.instance.set(template, SPEED, GT_Bees.speedBlinding); + AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "teleport")); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, 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 -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOW); AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "gravity")); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { + }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(Explosive, DIAMOND, 2); if (Loader.isModLoaded("ExtraUtilities")) tMutation.requireResource(GameRegistry.findBlock("ExtraUtilities", "block_bedrockium"), 0); }), // thaumic - THAUMIUMDUST( - GT_BranchDefinition.THAUMIC, - "ThaumiumDust", - true, - new Color(0x7A007A), - new Color(0x5C005C), + 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_2); AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectExploration); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.UP_1); AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.JUNGLE); - }, - dis -> { - IBeeMutationCustom tMutation = - dis.registerMutation(getSpecies(MAGICBEES, "TCFire"), getSpecies(FORESTRY, "Edenic"), 10); + }, dis -> { + 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 + tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(192, "Magical Forest")); // magical + // forest }), - THAUMIUMSHARD( - GT_BranchDefinition.THAUMIC, - "ThaumiumShard", - true, - new Color(0x9966FF), - new Color(0xAD85FF), + 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.SNOW); AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectGlacial); - }, - dis -> { + }, 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), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.NONE); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(THAUMIUMDUST, STICKYRESIN, 10); - tMutation.requireResource("blockAmber"); - }), - QUICKSILVER( - GT_BranchDefinition.THAUMIC, - "Quicksilver", - true, - new Color(0x7A007A), - new Color(0x5C005C), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.NONE); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(THAUMIUMDUST, STICKYRESIN, 10); + tMutation.requireResource("blockAmber"); + }), + 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.UP_1); 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.UP_1); AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.JUNGLE); AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectMiasmic); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); - }, - dis -> { + }, 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), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, NOCTURNAL, true); - AlleleHelper.instance.set(template, CAVE_DWELLING, true); - AlleleHelper.instance.set(template, TOLERANT_FLYER, true); - AlleleHelper.instance.set(template, FERTILITY, Fertility.LOW); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "rock")); - }, - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.20f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MITHRIL), 0.125f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { - AlleleHelper.instance.set(template, NOCTURNAL, true); - AlleleHelper.instance.set(template, CAVE_DWELLING, true); - AlleleHelper.instance.set(template, TOLERANT_FLYER, true); - AlleleHelper.instance.set(template, FERTILITY, Fertility.LOW); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "rock")); - }, - new Consumer<GT_BeeDefinition>() { - @Override - 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 - } - }), - ASTRALSILVER( - GT_BranchDefinition.THAUMIC, - "AstralSilver", - true, - new Color(0xAFEEEE), - new Color(0xE6E6FF), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, NOCTURNAL, true); + AlleleHelper.instance.set(template, CAVE_DWELLING, true); + AlleleHelper.instance.set(template, TOLERANT_FLYER, true); + AlleleHelper.instance.set(template, FERTILITY, Fertility.LOW); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "rock")); + }, 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.20f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MITHRIL), 0.125f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, template -> { + AlleleHelper.instance.set(template, NOCTURNAL, true); + AlleleHelper.instance.set(template, CAVE_DWELLING, true); + AlleleHelper.instance.set(template, TOLERANT_FLYER, true); + AlleleHelper.instance.set(template, FERTILITY, Fertility.LOW); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "rock")); + }, new Consumer<GT_BeeDefinition>() { + + @Override + 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 + } + }), + 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, NOCTURNAL, true); AlleleHelper.instance.set(template, CAVE_DWELLING, true); AlleleHelper.instance.set(template, TOLERANT_FLYER, true); @@ -1653,119 +1073,82 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "rock")); - }, - dis -> { + }, 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); - }, - template -> { + }, 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 -> { 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); - }, - template -> { + }, 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, TEMPERATURE_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(template, NOCTURNAL, true); - }, - dis -> { - IBeeMutationCustom tMutation = - dis.registerMutation(getSpecies(MAGICBEES, "TCChaos"), getSpecies(MAGICBEES, "TCVoid"), 6); + }, 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), - beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 61), 0.20f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DIVIDED), 0.125f); - 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 -> { - 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), + 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); + 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 -> { + 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), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("MagicBees", "miscResources", 1, 3), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SPARKELING), 0.125f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); AlleleHelper.instance.set(template, NOCTURNAL, true); AlleleHelper.instance.set(template, CAVE_DWELLING, true); @@ -1773,65 +1156,43 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectAggressive); AlleleHelper.instance.set(template, FLOWERING, Flowering.AVERAGE); - }, - dis -> { - IBeeMutationCustom tMutation = - dis.registerMutation(getSpecies(MAGICBEES, "Withering"), getSpecies(MAGICBEES, "Draconic"), 1); + }, dis -> { + 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 }), - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.URANIUM), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - beeSpecies.setNocturnal(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); - }, - 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), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + beeSpecies.setNocturnal(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); + }, 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), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LEAD), 0.15f); @@ -1839,21 +1200,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); - }, - dis -> { + }, 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); @@ -1861,21 +1215,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); - }, - dis -> { + }, 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); @@ -1884,87 +1231,56 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); - }, - dis -> { + }, 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), - 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); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.THORIUM), 0.75f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - beeSpecies.setNocturnal(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); - }, - dis -> { - 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), + 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); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.THORIUM), 0.75f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + beeSpecies.setNocturnal(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); + }, dis -> { + 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), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LUTETIUM), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); - }, - dis -> { + }, dis -> { 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.addSpecialty(GT_Bees.combs.getStackForType(CombType.AMERICIUM), 0.075f); beeSpecies.setHumidity(EnumHumidity.NORMAL); @@ -1973,480 +1289,320 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setHasEffect(); // Makes it only work in the Mega Apiary NOTE: COMB MUST BE SPECIALITY COMB beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); - }, - dis -> { - IMutationCustom tMutation = - dis.registerMutation(LUTETIUM, CHROME, 5, 4).setIsSecret(); + }, dis -> { + 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); beeSpecies.setTemperature(HELLISH); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); AlleleHelper.instance.set(template, NOCTURNAL, true); - }, - dis -> { - IMutationCustom tMutation = - dis.registerMutation(NAQUADRIA, AMERICIUM, 2, 2).setIsSecret(); + }, dis -> { + 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.02f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.NAGA), 0.10f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FAST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.04f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LICH), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FAST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.06f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.HYDRA), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FAST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.08f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.URGHAST), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - beeSpecies.setNocturnal(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FAST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(HYDRA, THAUMIUMDUST, 5); - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.15f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SNOWQUEEN), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(ICY); - beeSpecies.setHasEffect(); - beeSpecies.setNocturnal(); - }, - template -> {}, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(URGHAST, SALISMUNDUS, 4); - if (Loader.isModLoaded("thaumicbases")) - tMutation.requireResource(GameRegistry.findBlock("thaumicbases", "blockSalisMundus"), 0); - tMutation.restrictTemperature(ICY); - }), + 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); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FAST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.04f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LICH), 0.10f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FAST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.06f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.HYDRA), 0.10f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FAST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.08f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.URGHAST), 0.10f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + beeSpecies.setNocturnal(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FAST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(HYDRA, THAUMIUMDUST, 5); + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SNOWQUEEN), 0.10f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(ICY); + beeSpecies.setHasEffect(); + beeSpecies.setNocturnal(); + }, 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.NORMAL), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Ended"), STAINLESSSTEEL, 8); + 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.NORMAL), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Ended"), STAINLESSSTEEL, 8); - 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), - 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); - beeSpecies.addSpecialty(GT_Bees.propolis.getStackForType(PropolisType.Endium), 0.15f); - beeSpecies.addSpecialty(GT_Bees.drop.getStackForType(DropType.ENDERGOO), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.NORMAL), - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, GT_Bees.speedBlinding); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Ended"), ZINC, 8); - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Ended"), ENDDUST, 5); - 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.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), 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); + beeSpecies.addSpecialty(GT_Bees.propolis.getStackForType(PropolisType.Endium), 0.15f); + beeSpecies.addSpecialty(GT_Bees.drop.getStackForType(DropType.ENDERGOO), 0.10f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.NORMAL), 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, SPEED, GT_Bees.speedBlinding); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOWER); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Ended"), ZINC, 8); + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Ended"), ENDDUST, 5); + 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), 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); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { 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 -> { + }, 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), + 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); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectBeatific); AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_3); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_3); - }, - dis -> { + }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(ECTOPLASMA, ARCANESHARDS, 4); 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.ELONGATED); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_3); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.DOWN_3); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(FIRESTONE, ARCANESHARDS, 4); - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); - AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "teleport")); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.UP_1); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(ENDERIUM, STARDUST, 4); - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); - AlleleHelper.instance.set(template, EFFECT, getEffect(MAGICBEES, "SlowSpeed")); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.DOWN_1); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(ECTOPLASMA, STARDUST, 5); - 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), - 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); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.RUNEII), 0.0125f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, LIFESPAN, GT_Bees.superLife); - 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(); - tMutation.restrictHumidity(ARID); - if (Loader.isModLoaded("EnderStorage")) - tMutation.requireResource(GameRegistry.findBlock("EnderStorage", "enderChest"), 0); - 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.ELONGATED); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_3); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.DOWN_3); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(FIRESTONE, ARCANESHARDS, 4); + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); + AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "teleport")); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.UP_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.UP_1); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(ENDERIUM, STARDUST, 4); + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); + AlleleHelper.instance.set(template, EFFECT, getEffect(MAGICBEES, "SlowSpeed")); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.DOWN_1); + }, dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(ECTOPLASMA, STARDUST, 5); + 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), 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); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.RUNEII), 0.0125f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, template -> { + AlleleHelper.instance.set(template, LIFESPAN, GT_Bees.superLife); + 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(); + tMutation.restrictHumidity(ARID); + if (Loader.isModLoaded("EnderStorage")) + tMutation.requireResource(GameRegistry.findBlock("EnderStorage", "enderChest"), 0); + 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); - }), + 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 -> {}, - dis -> { - 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), + 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 -> {}, dis -> { + 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), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.04f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.METEORICIRON), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); beeSpecies.setNocturnal(); - }, - template -> {}, - dis -> { + }, 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.06f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DESH), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition), + 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectIgnition), new Consumer<GT_BeeDefinition>() { + @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(MARS, TITANIUM, 9); @@ -2454,21 +1610,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(29, "Mars")); // Mars Dim } }), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "freezing")), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "freezing")), new Consumer<GT_BeeDefinition>() { + @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(CALLISTO, LEAD, 7); @@ -2477,107 +1627,76 @@ public enum GT_BeeDefinition implements IBeeDefinition { 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); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(ICY); beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "freezing")), + }, template -> AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "freezing")), new Consumer<GT_BeeDefinition>() { + @Override public void accept(GT_BeeDefinition dis) { 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 - } - }), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - 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(45, "Callisto")); // Callisto + // Dim } }), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - 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 - } - }), - 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); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(COLD); - beeSpecies.setHasEffect(); - }, - 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 - } - }), - MYSTERIOUSCRYSTAL( - GT_BranchDefinition.SPACE, - "MysteriousCrystal", - false, - new Color(0x3CB371), - new Color(0x16856C), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, 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 + } + }), + 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, 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 + } + }), + 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); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(COLD); + beeSpecies.setHasEffect(); + }, 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 + } + }), + 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); @@ -2585,24 +1704,18 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); - }, - template -> {}, - new Consumer<GT_BeeDefinition>() { + }, 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); @@ -2610,9 +1723,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setTemperature(HELLISH); beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); - }, - template -> {}, - new Consumer<GT_BeeDefinition>() { + }, template -> {}, new Consumer<GT_BeeDefinition>() { + @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(PLUTO, PLUTONIUM, 2); @@ -2621,780 +1733,476 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(49, "Pluto")); // Pluto Dim } }), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, SPEED, GT_Bees.speedBlinding), - new Consumer<GT_BeeDefinition>() { - @Override - 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 - } - }), + 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, SPEED, GT_Bees.speedBlinding), new Consumer<GT_BeeDefinition>() { + + @Override + 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 + } + }), // 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)) - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MoonStoneDust", 1, 0), 0.10f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MARS), 0.25f); - if (Loader.isModLoaded(MOD_ID_DC)) - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.PhobosStoneDust", 1, 0), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoIceDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.IoStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.GanymedeStoneDust", 1, 0), 0.05f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, getSpecies(EXTRABEES, "volcanic"), 15); - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1, 0), 0.10f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, IRON, 15); - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(COLD); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoIceDust", 1, 0), 0.10f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusIceDust", 1, 0), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusIceDust", 1, 0), 0.10f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.OberonStoneDust", 1, 0), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(ICY); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TritonStoneDust", 1, 0), 0.05f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(COLD); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(COLD); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoIceDust", 1, 0), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(ICY); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - new Consumer<GT_BeeDefinition>() { - @Override - public void accept(GT_BeeDefinition dis) { - 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 - } - }), - 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); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - 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); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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 - }), + 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)) + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MoonStoneDust", 1, 0), 0.10f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MARS), 0.25f); + if (Loader.isModLoaded(MOD_ID_DC)) + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.PhobosStoneDust", 1, 0), 0.10f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoIceDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.IoStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.GanymedeStoneDust", 1, 0), 0.05f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, getSpecies(EXTRABEES, "volcanic"), 15); + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1, 0), 0.10f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, IRON, 15); + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(COLD); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoIceDust", 1, 0), 0.10f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusIceDust", 1, 0), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusIceDust", 1, 0), 0.10f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.OberonStoneDust", 1, 0), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(ICY); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TritonStoneDust", 1, 0), 0.05f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(COLD); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(COLD); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoIceDust", 1, 0), 0.10f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(ICY); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), new Consumer<GT_BeeDefinition>() { + + @Override + public void accept(GT_BeeDefinition dis) { + 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 + } + }), + 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); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), 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); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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 + }), // 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), - 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); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaFStoneDust", 1, 0), 0.05f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.25f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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 - } - }), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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 - } - }), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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 - } - }), - 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); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(COLD); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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 - } - }), - 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)) - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.VegaBStoneDust", 1, 0), 0.10f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(COLD); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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 - } - }), - 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); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.VENUS), 0.35f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - 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 - }), + 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); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaFStoneDust", 1, 0), 0.05f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.25f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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 + } + }), + 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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 + } + }), + 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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 + } + }), + 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); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(COLD); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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 + } + }), + 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)) + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.VegaBStoneDust", 1, 0), 0.10f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(COLD); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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 + } + }), + 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); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.VENUS), 0.35f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + 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 + }), // Infinity Line - COSMICNEUTRONIUM( - GT_BranchDefinition.PLANET, - "CosmicNeutronium", - false, - new Color(0x484848), - new Color(0x323232), + COSMICNEUTRONIUM(GT_BranchDefinition.PLANET, "CosmicNeutronium", false, new Color(0x484848), new Color(0x323232), beeSpecies -> { beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.COSMICNEUTRONIUM), 0.375f); beeSpecies.setHumidity(DAMP); @@ -3403,19 +2211,12 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setHasEffect(); // Makes it only work in the Mega Apiary NOTE: COMB MUST BE SPECIALITY COMB beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { 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.addSpecialty(GT_Bees.combs.getStackForType(CombType.INFINITYCATALYST), 0.015f); beeSpecies.setHumidity(DAMP); @@ -3424,422 +2225,257 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setHasEffect(); // Makes it only work in the Mega Apiary NOTE: COMB MUST BE SPECIALITY COMB beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); - }, - template -> { + }, template -> { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "blindness")); - }, - dis -> { - IMutationCustom tMutation = - dis.registerMutation(DOB, COSMICNEUTRONIUM, 3, 10).setIsSecret(); + }, dis -> { + 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), - beeSpecies -> { - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.INFINITY), 0.015f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - // Makes it only work in the Mega Apiary NOTE: COMB MUST BE SPECIALITY COMB - beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(INFINITYCATALYST, COSMICNEUTRONIUM, 1, 10); - if (Loader.isModLoaded("avaritiaddons")) - tMutation.requireResource(GameRegistry.findBlock("avaritiaddons", "InfinityChest"), 0); - }), - KEVLAR( - GT_BranchDefinition.IC2, - "kevlar", - false, - new Color(0x2d542f), - new Color(0xa2baa3), - beeSpecies -> { - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.KEVLAR), 0.075f); - beeSpecies.addSpecialty(MaterialsKevlar.Kevlar.getNuggets(1), 0.01f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(COLD); - beeSpecies.setHasEffect(); - beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); - }, - 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(OIL, INFINITY, 4); - tMutation.requireResource("frameGtKevlar"); - }), + INFINITY(GT_BranchDefinition.PLANET, "Infinity", false, new Color(0xFFFFFF), new Color(0xFFFFFF), beeSpecies -> { + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.INFINITY), 0.015f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + // Makes it only work in the Mega Apiary NOTE: COMB MUST BE SPECIALITY COMB + beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(INFINITYCATALYST, COSMICNEUTRONIUM, 1, 10); + if (Loader.isModLoaded("avaritiaddons")) + tMutation.requireResource(GameRegistry.findBlock("avaritiaddons", "InfinityChest"), 0); + }), + KEVLAR(GT_BranchDefinition.IC2, "kevlar", false, new Color(0x2d542f), new Color(0xa2baa3), beeSpecies -> { + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.KEVLAR), 0.075f); + beeSpecies.addSpecialty(MaterialsKevlar.Kevlar.getNuggets(1), 0.01f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(COLD); + beeSpecies.setHasEffect(); + beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); + }, 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(OIL, INFINITY, 4); + tMutation.requireResource("frameGtKevlar"); + }), // 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), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.HELIUM), 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(getSpecies(MAGICBEES, "Watery"), ENDDUST, 10); - tMutation.restrictTemperature(ICY); - // if (Loader.isModLoaded("TwilightForest")) - // tMutation.requireResource(GameRegistry.findBlock("TwilightForest", "Aurora Block"), 0); - }), + 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); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), 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); + }), // 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.addSpecialty(GT_Bees.combs.getStackForType(CombType.XENON), 0.525f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - // Makes it only work in the Mega Apiary NOTE: COMB MUST BE SPECIALITY COMB - beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); - }, - 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.addSpecialty(GT_Bees.combs.getStackForType(CombType.XENON), 0.525f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + // Makes it only work in the Mega Apiary NOTE: COMB MUST BE SPECIALITY COMB + beeSpecies.setJubilanceProvider(GT_JubilanceMegaApiary.instance); + }, 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); - }), + 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(DAMP); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = - dis.registerMutation(getSpecies(MAGICBEES, "Supernatural"), getSpecies(MAGICBEES, "Windy"), 15); - tMutation.restrictTemperature(HOT); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); - }), - FIRE( - GT_BranchDefinition.INFUSEDSHARD, - "Fire", - false, - new Color(0xED3801), - new Color(0x3B0E00), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDIGNIS), 0.30f); - beeSpecies.setHumidity(ARID); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Supernatural"), AIR, 15); - tMutation.restrictTemperature(HELLISH); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 1); - }), - WATER( - GT_BranchDefinition.INFUSEDSHARD, - "Water", - 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"), 2); - }), - EARTH( - GT_BranchDefinition.INFUSEDSHARD, - "Earth", - 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(WARM); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 3); - }), - ORDER( - GT_BranchDefinition.INFUSEDSHARD, - "Order", - 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"), 4); - }), - CHAOS( - GT_BranchDefinition.INFUSEDSHARD, - "Chaos", - 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"), 5); - }), - NETHERSHARD( - GT_BranchDefinition.INFUSEDSHARD, - "Nethershard", - false, - new Color(0xBE0135), - new Color(0x350211), + 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(DAMP); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + IBeeMutationCustom tMutation = dis + .registerMutation(getSpecies(MAGICBEES, "Supernatural"), getSpecies(MAGICBEES, "Windy"), 15); + tMutation.restrictTemperature(HOT); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); + }), + FIRE(GT_BranchDefinition.INFUSEDSHARD, "Fire", false, new Color(0xED3801), new Color(0x3B0E00), beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDIGNIS), 0.30f); + beeSpecies.setHumidity(ARID); + beeSpecies.setHasEffect(); + }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Supernatural"), AIR, 15); + tMutation.restrictTemperature(HELLISH); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 1); + }), + WATER(GT_BranchDefinition.INFUSEDSHARD, "Water", 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"), 2); + }), + EARTH(GT_BranchDefinition.INFUSEDSHARD, "Earth", 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(WARM); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 3); + }), + ORDER(GT_BranchDefinition.INFUSEDSHARD, "Order", 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"), 4); + }), + CHAOS(GT_BranchDefinition.INFUSEDSHARD, "Chaos", 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"), 5); + }), + 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 -> { + }, 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), + 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 -> { + }, 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), + 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), + }, 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), + JAEGERMEISTER(GT_BranchDefinition.ENDGAME, "JaegerMeister", false, new Color(0x05AD18), new Color(0xE7DAC3), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("berriespp", "BppPotions", 1L, 8), 0.01f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { + }, 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 + 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; @@ -3848,14 +2484,8 @@ 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, + 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; @@ -3870,7 +2500,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { this.branch = branch; this.species = new GT_AlleleBeeSpecies( - uid, dominant, name, "GTNH", description, branch.getBranch(), binomial, primary, secondary); + uid, + dominant, + name, + "GTNH", + description, + branch.getBranch(), + binomial, + primary, + secondary); } public static void initBees() { @@ -3994,26 +2632,27 @@ 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 + * 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 386ac995a7..3b3849f588 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Bees.java +++ b/src/main/java/gregtech/loaders/misc/GT_Bees.java @@ -2,6 +2,9 @@ package gregtech.loaders.misc; import static gregtech.api.enums.GT_Values.MOD_ID_FR; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; + import cpw.mods.fml.common.Loader; import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.core.IClimateProvider; @@ -14,8 +17,6 @@ import gregtech.common.items.ItemComb; import gregtech.common.items.ItemDrop; import gregtech.common.items.ItemPollen; import gregtech.common.items.ItemPropolis; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; public class GT_Bees { @@ -78,6 +79,7 @@ public class GT_Bees { } private static class AlleleFloat extends Allele implements IAlleleFloat { + private float value; public AlleleFloat(String id, float val, boolean isDominant) { @@ -114,7 +116,7 @@ public class GT_Bees { public AlleleArea(String id, int rangeXZ, int rangeY, boolean isDominant) { super("gregtech." + id, "gregtech." + id, isDominant); - this.value = new int[] {rangeXZ, rangeY, rangeXZ}; + this.value = new int[] { rangeXZ, rangeY, rangeXZ }; AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.TERRITORY); } @@ -135,16 +137,8 @@ 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) { + 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; } @@ -166,16 +160,8 @@ 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) { + 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; } diff --git a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java index 0d1a164992..ff44ae8591 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java @@ -7,16 +7,18 @@ 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 java.util.Arrays; +import java.util.function.Consumer; + 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; public enum GT_BranchDefinition { + ORGANIC("Fuelis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(alleles, HUMIDITY_TOLERANCE, Tolerance.BOTH_2); diff --git a/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java b/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java index 7caf0b24aa..d393dbc831 100644 --- a/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java +++ b/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java @@ -3,21 +3,25 @@ package gregtech.loaders.misc; import static gregtech.api.enums.Textures.BlockIcons.VENT_ADVANCED; import static gregtech.api.enums.Textures.BlockIcons.VENT_NORMAL; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.common.covers.GT_Cover_Vent; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; 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)); + 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), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java index 5767332ee7..bdd1109a93 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java @@ -1,18 +1,20 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + 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) { + 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 a66d17293f..6c1d1896b1 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingArrows.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingArrows.java @@ -1,23 +1,25 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; 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.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.item.ItemStack; public class ProcessingArrows implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingArrows() { OrePrefixes.arrowGtWood.add(this); OrePrefixes.arrowGtPlastic.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) { ItemStack tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); GT_Utility.ItemNBT.addEnchantment( @@ -57,7 +59,14 @@ public class ProcessingArrows implements gregtech.api.interfaces.IOreRecipeRegis 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.copyAmount(1L, aStack), + Materials.Blaze.getMolten(18L), + tOutput, + null, + null, + null, + 100, + 2); tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); @@ -66,53 +75,48 @@ public class ProcessingArrows implements gregtech.api.interfaces.IOreRecipeRegis 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.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) + 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.copyAmount(1L, aStack), + Materials.Mercury.getFluid(25L), + tOutput, + null, + null, + null, + 100, + 2); - if ((aMaterial.mUnificatable) - && (aMaterial.mMaterialInto == aMaterial) + 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) - }); + 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) - }); + 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 35af7d302f..9fdf755c8a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java @@ -1,22 +1,24 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingBeans implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingBeans() { OrePrefixes.beans.add(this); } @Override - 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)); + 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)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java index a4619d2ea2..4043ea02aa 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java @@ -2,30 +2,29 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingBlock() { OrePrefixes.block.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 (aMaterial != Materials.Clay && aMaterial != Materials.Basalt) { if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { GT_Values.RA.addCutterRecipe( GT_Utility.copyAmount(1L, aStack), - aMaterial == MaterialsBotania.Livingrock - || aMaterial == MaterialsBotania.Livingwood - || aMaterial == MaterialsBotania.Dreamwood - ? GT_Utility.getIntegratedCircuit(3) - : null, + aMaterial == MaterialsBotania.Livingrock || aMaterial == MaterialsBotania.Livingwood + || aMaterial == MaterialsBotania.Dreamwood ? GT_Utility.getIntegratedCircuit(3) : null, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9L), null, (int) Math.max(aMaterial.getMass() * 10L, 1L), @@ -39,15 +38,21 @@ 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); - if (tStack2 != null) - GT_ModHandler.removeRecipeDelayed( - tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2); + if (tStack1 != null) 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); if (tStack3 != null) { GT_ModHandler.removeRecipeDelayed( - tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3); + tStack3, + tStack3, + tStack3, + tStack3, + tStack3, + tStack3, + tStack3, + tStack3, + tStack3); } if (aMaterial.mStandardMoltenFluid != null) { @@ -66,18 +71,16 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist 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)}); - if (tStack2 != null) - GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), - new Object[] {"XXX", "XXX", "XXX", 'X', OrePrefixes.gem.get(aMaterial)}); + 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) }); + if (tStack2 != null) 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)}); + new Object[] { "XXX", "XXX", "XXX", 'X', OrePrefixes.ingot.get(aMaterial) }); } } if (tStack1 != null) tStack1.stackSize = 9; @@ -90,11 +93,11 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist 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)) { diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java index a758148e5f..96acfa1f17 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java @@ -1,26 +1,28 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; -import net.minecraft.item.ItemStack; public class ProcessingBolt implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingBolt() { OrePrefixes.bolt.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 (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { - if ((aMaterial.mUnificatable) - && (aMaterial.mMaterialInto == aMaterial) + 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) - }); + 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 04e456a189..aa478a5560 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java @@ -1,5 +1,9 @@ package gregtech.loaders.oreprocessing; +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -9,18 +13,17 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import java.util.ArrayList; -import net.minecraft.item.ItemStack; public class ProcessingCell implements IOreRecipeRegistrator { + public ProcessingCell() { OrePrefixes.cell.add(this); OrePrefixes.cellPlasma.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 (aPrefix) { case cell: if (aMaterial == Materials.Empty) { @@ -44,10 +47,10 @@ public class ProcessingCell implements IOreRecipeRegistrator { tAllAmount = (int) (tAllAmount + tMat2.mAmount); } 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) { @@ -57,8 +60,8 @@ 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 @@ -68,26 +71,20 @@ public class ProcessingCell implements IOreRecipeRegistrator { tStack.stackSize = ((int) (tStack.stackSize * tDensityMultiplier)); while ((tStack.stackSize > 64) && (tCapsuleCount - + GT_ModHandler.getCapsuleCellContainerCount( - tStack) - * 64L - < 0L - ? tList.size() < 5 - : tList.size() < 6) + + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64L < 0L + ? tList.size() < 5 + : tList.size() < 6) && (tCapsuleCount - + GT_ModHandler.getCapsuleCellContainerCount(tStack) - * 64L + + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64L <= 64L)) { tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64L; tList.add(GT_Utility.copyAmount(64L, tStack)); tStack.stackSize -= 64; } - int tThisCapsuleCount = - GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize( - tStack); + int tThisCapsuleCount = GT_ModHandler + .getCapsuleCellContainerCountMultipliedWithStackSize(tStack); if (tStack.stackSize > 0 && tCapsuleCount + tThisCapsuleCount <= 64L) { - if (tCapsuleCount + tThisCapsuleCount < 0L - ? tList.size() < 5 + if (tCapsuleCount + tThisCapsuleCount < 0L ? tList.size() < 5 : tList.size() < 6) { tCapsuleCount += tThisCapsuleCount; tList.add(tStack); @@ -110,8 +107,7 @@ public class ProcessingCell implements IOreRecipeRegistrator { 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 + 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); @@ -125,8 +121,7 @@ public class ProcessingCell implements IOreRecipeRegistrator { 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 + tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : tCellBalance < 0 ? ItemList.Cell_Empty.get(-tCellBalance) : null, (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); @@ -141,8 +136,7 @@ public class ProcessingCell implements IOreRecipeRegistrator { 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 + tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java index 32e7d9b7ac..643d6af903 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java @@ -1,20 +1,22 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.item.ItemStack; public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingCircuit() { OrePrefixes.circuit.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 (gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack) && aModName.equals("gregtech")) return; switch (aMaterial.mName) { case "Good": @@ -34,24 +36,17 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi 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.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)}); + 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 7c17c7ca27..86478eb3d7 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java @@ -1,24 +1,28 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; -import net.minecraft.item.ItemStack; public class ProcessingCompressed implements IOreRecipeRegistrator { + public ProcessingCompressed() { OrePrefixes.compressed.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.removeRecipeByOutputDelayed(aStack); GregTech_API.registerCover( - aStack, TextureFactory.of(aMaterial.mIconSet.mTextures[72], aMaterial.mRGBa, false), null); + 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 48d9708f4a..84fbf9c05d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java @@ -2,6 +2,9 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.enums.GT_Values.MOD_ID_DC; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -9,17 +12,16 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; 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( diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java index 042580144b..79c5ca9874 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java @@ -1,13 +1,15 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; 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; public class ProcessingCrate implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingCrate() { OrePrefixes.crateGtDust.add(this); OrePrefixes.crateGtIngot.add(this); @@ -16,10 +18,9 @@ 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) + 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: @@ -35,11 +36,10 @@ public class ProcessingCrate implements gregtech.api.interfaces.IOreRecipeRegist 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)}); + 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( @@ -54,11 +54,10 @@ public class ProcessingCrate implements gregtech.api.interfaces.IOreRecipeRegist 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)}); + 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( @@ -73,11 +72,10 @@ public class ProcessingCrate implements gregtech.api.interfaces.IOreRecipeRegist 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)}); + 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( @@ -92,11 +90,10 @@ public class ProcessingCrate implements gregtech.api.interfaces.IOreRecipeRegist 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)}); + 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; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java index ceb7aee979..9062533d93 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java @@ -1,27 +1,26 @@ package gregtech.loaders.oreprocessing; +import net.minecraftforge.fluids.FluidRegistry; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraftforge.fluids.FluidRegistry; public class ProcessingCrop implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingCrop() { OrePrefixes.crop.add(this); } @Override - public void registerOre( - OrePrefixes aPrefix, - Materials aMaterial, - String aOreDictName, - String aModName, + 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)); + 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); @@ -33,7 +32,10 @@ public class ProcessingCrop implements gregtech.api.interfaces.IOreRecipeRegistr break; case "cropGrape": GT_Values.RA.addBrewingRecipe( - aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.grapejuice"), false); + aStack, + FluidRegistry.WATER, + FluidRegistry.getFluid("potion.grapejuice"), + false); GT_Values.RA.addBrewingRecipe( aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), @@ -42,19 +44,32 @@ public class ProcessingCrop implements gregtech.api.interfaces.IOreRecipeRegistr break; case "cropChilipepper": GT_ModHandler.addPulverisationRecipe( - aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L)); + aStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L)); break; case "cropCoffee": GT_ModHandler.addPulverisationRecipe( - aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L)); + 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); + 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); + 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); + aStack, + FluidRegistry.WATER, + FluidRegistry.getFluid("potion.potatojuice"), + true); GT_Values.RA.addBrewingRecipe( aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), @@ -63,9 +78,16 @@ public class ProcessingCrop implements gregtech.api.interfaces.IOreRecipeRegistr break; case "cropLemon": GT_Values.RA.addSlicerRecipe( - aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Lemon.get(4L), 64, 4); + 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); + aStack, + FluidRegistry.WATER, + FluidRegistry.getFluid("potion.lemonjuice"), + false); GT_Values.RA.addBrewingRecipe( aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), @@ -79,15 +101,27 @@ public class ProcessingCrop implements gregtech.api.interfaces.IOreRecipeRegistr break; case "cropTomato": GT_Values.RA.addSlicerRecipe( - aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Tomato.get(4L), 64, 4); + 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); + 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); + 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 e9b954f52e..77d20209b8 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java @@ -1,22 +1,24 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingCrushedOre implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingCrushedOre() { OrePrefixes.crushedCentrifuged.add(this); OrePrefixes.crushedPurified.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 (aPrefix) { case crushedCentrifuged: GT_Values.RA.addForgeHammerRecipe( @@ -37,7 +39,7 @@ public class ProcessingCrushedOre implements gregtech.api.interfaces.IOreRecipeR case crushedPurified: GT_ModHandler.addThermalCentrifugeRecipe( GT_Utility.copyAmount(1L, aStack), - new int[] {10000, 1111}, + new int[] { 10000, 1111 }, (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), GT_OreDictUnificator.get( OrePrefixes.crushedCentrifuged, @@ -71,14 +73,12 @@ public class ProcessingCrushedOre implements gregtech.api.interfaces.IOreRecipeR 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}, + 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; @@ -86,14 +86,12 @@ public class ProcessingCrushedOre implements gregtech.api.interfaces.IOreRecipeR 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}, + 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); } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java index ccd11b5d88..df2284a95c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java @@ -1,22 +1,24 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingCrystallized implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingCrystallized() { OrePrefixes.crystal.add(this); OrePrefixes.crystalline.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_Values.RA.addForgeHammerRecipe( GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java index cc0b25345c..e9a1b0425c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java @@ -10,6 +10,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingDirty() { OrePrefixes.clump.add(this); OrePrefixes.shard.add(this); @@ -18,11 +19,7 @@ public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre( - OrePrefixes aPrefix, - Materials aMaterial, - String aOreDictName, - String aModName, + 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), @@ -44,7 +41,7 @@ public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegist false); GT_ModHandler.addOreWasherRecipe( GT_Utility.copyAmount(1L, aStack), - new int[] {10000, 1111, 10000}, + new int[] { 10000, 1111, 10000 }, 1000, GT_OreDictUnificator.get( aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, @@ -57,7 +54,7 @@ public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegist GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); GT_ModHandler.addThermalCentrifugeRecipe( GT_Utility.copyAmount(1L, aStack), - new int[] {10000, 1111, 10000}, + new int[] { 10000, 1111, 10000 }, (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), GT_OreDictUnificator.get( aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedCentrifuged : OrePrefixes.dust, @@ -69,86 +66,79 @@ public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegist 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); - if (aMaterial.contains(SubTag.WASHING_MERCURY)) - GT_Values.RA.addChemicalBathRecipe( + 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); + 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); + 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); + 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, aMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), - new int[] {10000, 7000, 4000}, + new int[] { 10000, 7000, 4000 }, 800, 8); - if (aMaterial.contains(SubTag.WASHING_MERCURY_99_PERCENT)) - GT_Values.RA.addChemicalBathRecipe( + 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, aMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), - new int[] {10000, 9900, 4000}, + new int[] { 10000, 9900, 4000 }, 800, 8); - if (aMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE)) - GT_Values.RA.addChemicalBathRecipe( + 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, aMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), - new int[] {10000, 7000, 4000}, + 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); - 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); - 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); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java index 3d4c13ecaa..75ba5cc4af 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java @@ -1,5 +1,10 @@ package gregtech.loaders.oreprocessing; +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -11,11 +16,9 @@ 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; public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingDust() { OrePrefixes.dust.add(this); OrePrefixes.dustPure.add(this); @@ -26,13 +29,12 @@ 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 (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( @@ -67,8 +69,8 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr null, null, aMaterial.mBlastFurnaceTemp > 1750 - ? GT_OreDictUnificator.get( - OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) + ? GT_OreDictUnificator + .get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, tDustStack), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, @@ -87,7 +89,7 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr } // This is so disgustingly bad. if (((OrePrefixes.block.isIgnored(aMaterial)) - || (null == GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))) + || (null == GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))) && (aMaterial != Materials.GraniteRed) && (aMaterial != Materials.GraniteBlack) && (aMaterial != Materials.Basalt) @@ -107,49 +109,41 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr 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) { - if (tMat.mMaterial == Materials.Air) { - tDustStack = ItemList.Cell_Air.get(tMat.mAmount / 2L); - } else { - tDustStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat.mMaterial, tMat.mAmount); - if (tDustStack == null) - tDustStack = - GT_OreDictUnificator.get(OrePrefixes.cell, tMat.mMaterial, tMat.mAmount); - } - 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)) { - 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); - tList.add(tDustStack); - } + for (MaterialStack tMat : aMaterial.mMaterialList) if (tMat.mAmount > 0L) { + if (tMat.mMaterial == Materials.Air) { + tDustStack = ItemList.Cell_Air.get(tMat.mAmount / 2L); + } else { + tDustStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat.mMaterial, tMat.mAmount); + if (tDustStack == null) + tDustStack = GT_OreDictUnificator.get(OrePrefixes.cell, tMat.mMaterial, tMat.mAmount); + } + 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)) { + 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); + tList.add(tDustStack); } } } + } tItemAmount = (tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + tItemAmount * tDensityMultiplier / aMaterial.getDensity(); if (tList.size() > 0) { @@ -160,27 +154,26 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr && ((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); + 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); if ((aMaterial.mExtraData & 0x2) != 0) { GT_Values.RA.addCentrifugeRecipe( GT_Utility.copyAmount(tItemAmount, aStack), @@ -234,7 +227,8 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr break; case "Glass": GT_ModHandler.addSmeltingRecipe( - GT_Utility.copyAmount(1L, aStack), new ItemStack(net.minecraft.init.Blocks.glass)); + GT_Utility.copyAmount(1L, aStack), + new ItemStack(net.minecraft.init.Blocks.glass)); break; case "NetherQuartz": case "Quartz": @@ -242,7 +236,8 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr if (gregtech.api.GregTech_API.sRecipeFile.get( gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, "QuartzDustSmeltingIntoAESilicon", - true)) GT_ModHandler.removeFurnaceSmelting(aStack); + true)) + GT_ModHandler.removeFurnaceSmelting(aStack); break; case "MeatRaw": GT_ModHandler.addSmeltingRecipe( @@ -254,11 +249,11 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr case "Oilsands": GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe( true, - new ItemStack[] {GT_Utility.copyAmount(1L, aStack)}, + new ItemStack[] { GT_Utility.copyAmount(1L, aStack) }, null, null, null, - new FluidStack[] {Materials.OilHeavy.getFluid(1000)}, + new FluidStack[] { Materials.OilHeavy.getFluid(1000) }, 660, 8, 0); @@ -324,7 +319,7 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr 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}, + new int[] { 10000, 4000, 2000 }, 400, 24); if (aMaterial.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON)) @@ -333,7 +328,7 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr 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}, + new int[] { 10000, 4000, 2000 }, 400, 24); if (aMaterial.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM)) { @@ -342,7 +337,7 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr 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}, + new int[] { 10000, 4000, 2000 }, 400, 24); } @@ -474,7 +469,7 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr null, null, null, - new int[] {10000, 1111}, + new int[] { 10000, 1111 }, (int) Math.max(1L, aMaterial.getMass() * 8L), 5); } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java index 573081b6cc..42b5571b2b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java @@ -1,5 +1,11 @@ package gregtech.loaders.oreprocessing; +import java.util.Locale; + +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; + import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -8,19 +14,16 @@ 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; 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( diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java index 046bcf5cda..941191132d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java @@ -1,5 +1,7 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.SubTag; @@ -7,25 +9,25 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_RecipeRegistrator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; -import net.minecraft.item.ItemStack; public class ProcessingFineWire implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingFineWire() { OrePrefixes.wireFine.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 (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMASHING)) { GT_RecipeRegistrator.registerWiremillRecipes(aMaterial, 100, 4); } - if ((aMaterial.mUnificatable) - && (aMaterial.mMaterialInto == 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) - }); + 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 ae25bcee98..31f7051c3d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java @@ -2,6 +2,8 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -10,22 +12,24 @@ import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingFoil implements IOreRecipeRegistrator { + public ProcessingFoil() { OrePrefixes.foil.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_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), calculateRecipeEU(aMaterial, 24)); GregTech_API.registerCover( - aStack, TextureFactory.of(aMaterial.mIconSet.mTextures[70], aMaterial.mRGBa, false), null); + 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 905bb58fe7..bfd85af1a4 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java @@ -1,5 +1,7 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -7,26 +9,30 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingFood implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingFood() { OrePrefixes.food.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 "foodCheese": GT_Values.RA.addSlicerRecipe( - aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Cheese.get(4L), 64, 4); + 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, diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java index 606d3f0245..c1e767b9b5 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java @@ -2,23 +2,25 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; 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.init.Blocks; -import net.minecraft.item.ItemStack; public class ProcessingGear implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingGear() { OrePrefixes.gearGt.add(this); OrePrefixes.gearGtSmall.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 (aPrefix) { case gearGt: GT_ModHandler.removeRecipeByOutputDelayed(aStack); @@ -31,52 +33,30 @@ public class ProcessingGear implements gregtech.api.interfaces.IOreRecipeRegistr 128, calculateRecipeEU(aMaterial, 8)); } - if (aMaterial.mUnificatable - && (aMaterial.mMaterialInto == aMaterial) + 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) - }); + 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) - }); + new Object[] { "SPS", "PfP", "SPS", 'P', OrePrefixes.stoneSmooth, 'S', + new ItemStack(Blocks.stone_button, 1, 32767) }); break; default: if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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) - }); + new Object[] { "SPS", "PwP", "SPS", 'P', OrePrefixes.plate.get(aMaterial), 'S', + OrePrefixes.stick.get(aMaterial) }); } } } @@ -91,36 +71,28 @@ public class ProcessingGear implements gregtech.api.interfaces.IOreRecipeRegistr 16, calculateRecipeEU(aMaterial, 8)); } - if (aMaterial.mUnificatable - && (aMaterial.mMaterialInto == aMaterial) + 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)}); + 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}); + new Object[] { "P ", " f", 'P', OrePrefixes.stoneSmooth }); break; default: if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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) - }); + new Object[] { " S ", "hPx", " S ", 'S', OrePrefixes.stick.get(aMaterial), 'P', + OrePrefixes.plate.get(aMaterial) }); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java index 929ad579ad..0a3315a259 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java @@ -2,17 +2,19 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; 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 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); @@ -22,8 +24,8 @@ public class ProcessingGem } @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); @@ -36,7 +38,10 @@ public class ProcessingGem case gem: if (aFuelPower) { GT_Values.RA.addFuel( - GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 2, aMaterial.mFuelType); + GT_Utility.copyAmount(1L, aStack), + null, + aMaterial.mFuelPower * 2, + aMaterial.mFuelType); } if (!OrePrefixes.block.isIgnored(aMaterial)) { GT_ModHandler.addCompressionRecipe( @@ -50,7 +55,10 @@ public class ProcessingGem } if (aNoSmashing) { GT_Values.RA.addForgeHammerRecipe( - aStack, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 2L), 64, 16); + aStack, + GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 2L), + 64, + 16); } else { GT_Values.RA.addForgeHammerRecipe( GT_Utility.copyAmount(1L, aStack), @@ -103,22 +111,20 @@ public class ProcessingGem GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 2L), GT_Proxy.tBits, - new Object[] {"h", "X", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); + 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)}); - if (aSpecialRecipeReq) - GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), - GT_Proxy.tBits, - new Object[] {"X", "m", 'X', OrePrefixes.gem.get(aMaterial)}); + 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) }); + 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_RecipeRegistrator.registerUsagesForMaterials(OrePrefixes.plate.get(aMaterial).toString(), @@ -153,8 +159,9 @@ public class ProcessingGem 2000, 30); } - for (ItemStack is : OreDictionary.getOres( - "craftingLens" + aMaterial.mColor.mName.replace(" ", ""))) { // Engraver Recipe adder + 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), @@ -165,9 +172,11 @@ public class ProcessingGem } break; case gemChipped: - if (aFuelPower) - GT_Values.RA.addFuel( - GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower / 2, aMaterial.mFuelType); + if (aFuelPower) 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), @@ -184,16 +193,16 @@ public class ProcessingGem 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)}); + 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) }); } } - for (ItemStack is : OreDictionary.getOres( - "craftingLens" + aMaterial.mColor.mName.replace(" ", ""))) { // Engraver Recipe adder + 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), @@ -204,24 +213,27 @@ public class ProcessingGem } break; case gemExquisite: - if (aFuelPower) - GT_Values.RA.addFuel( - GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 8, aMaterial.mFuelType); + if (aFuelPower) 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)}); + 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_Values.RA.addForgeHammerRecipe( - aStack, GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), 64, 16); + 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); + if (aFuelPower) 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), @@ -238,18 +250,21 @@ public class ProcessingGem 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)}); + 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_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 + 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), @@ -260,15 +275,18 @@ public class ProcessingGem } break; case gemFlawless: - if (aFuelPower) - GT_Values.RA.addFuel( - GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 4, aMaterial.mFuelType); + if (aFuelPower) 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), + aMaterial, + aPrefix.mMaterialAmount - OrePrefixes.stickLong.mMaterialAmount), (int) Math.max(aMaterialMass * 5L, 1L), 16); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) { @@ -280,18 +298,18 @@ public class ProcessingGem 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)}); + 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_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 + 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), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java index aa8964f9be..bc2534204a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java @@ -2,6 +2,8 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; @@ -9,9 +11,9 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_RecipeRegistrator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; -import net.minecraft.item.ItemStack; public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingIngot() { OrePrefixes.ingot.add(this); OrePrefixes.ingotDouble.add(this); @@ -22,20 +24,22 @@ 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) + 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_Utility.copyAmount(1L, aStack), + null, + aMaterial.mFuelPower, + aMaterial.mFuelType); } if (aMaterial.mStandardMoltenFluid != null) { if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { @@ -48,11 +52,16 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist } } 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_Utility.copyAmount(1L, aStack), + aMaterial, + aPrefix.mMaterialAmount, + null, + null, + null); } ItemStack tStack; if ((null != (tStack = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L))) @@ -60,16 +69,14 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.removeFurnaceSmelting(tStack); } - if (aMaterial.mUnificatable - && (aMaterial.mMaterialInto == aMaterial) + 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.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), - GT_Proxy.tBits, - new Object[] {ToolDictNames.craftingToolMortar, OrePrefixes.ingot.get(aMaterial)}); + 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.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { ToolDictNames.craftingToolMortar, OrePrefixes.ingot.get(aMaterial) }); } if (!aNoSmashing) { @@ -134,13 +141,12 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist // Enable crafting with hammer if tier is < IV. if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { - if (aSpecialRecipeReq - && GregTech_API.sRecipeFile.get( - ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + 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)}); + new Object[] { "I", "I", "h", 'I', OrePrefixes.ingot.get(aMaterial) }); } } } @@ -158,21 +164,13 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist (int) Math.max(aMaterialMass * 3L, 1L), calculateRecipeEU(aMaterial, 96)); if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { - if (aSpecialRecipeReq - && GregTech_API.sRecipeFile.get( - ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + 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) - }); + new Object[] { "I", "B", "h", 'I', OrePrefixes.ingotDouble.get(aMaterial), 'B', + OrePrefixes.ingot.get(aMaterial) }); } } } @@ -187,21 +185,13 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist // If tier < IV add manual crafting. if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { - if (aSpecialRecipeReq - && GregTech_API.sRecipeFile.get( - ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + 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) - }); + new Object[] { "I", "B", "h", 'I', OrePrefixes.ingotTriple.get(aMaterial), 'B', + OrePrefixes.ingot.get(aMaterial) }); } } } @@ -215,21 +205,13 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist calculateRecipeEU(aMaterial, 96)); if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { - if (aSpecialRecipeReq - && GregTech_API.sRecipeFile.get( - ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + 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) - }); + new Object[] { "I", "B", "h", 'I', OrePrefixes.ingotQuadruple.get(aMaterial), 'B', + OrePrefixes.ingot.get(aMaterial) }); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java index 5ed2c203aa..46bcc170f1 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java @@ -1,21 +1,22 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.objects.ItemData; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.item.ItemStack; public class ProcessingItem implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingItem() { OrePrefixes.item.add(this); } @Override - public void registerOre( - OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if (GT_OreDictUnificator.getItemData(aStack) == null - && !aOreDictName.equals("itemCertusQuartz") + 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": diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java index c1771c4cee..6e3a8eac00 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java @@ -1,5 +1,7 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -8,16 +10,16 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.item.ItemStack; public class ProcessingLens implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingLens() { OrePrefixes.lens.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 (aMaterial.mName) { case "Diamond": case "Glass": @@ -54,8 +56,8 @@ public class ProcessingLens implements gregtech.api.interfaces.IOreRecipeRegistr GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), 2400, 30); - final ITexture lensCoverTexture = - TextureFactory.of(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false); + final ITexture lensCoverTexture = TextureFactory + .of(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false); GregTech_API.registerCover( aStack, TextureFactory.of(Textures.BlockIcons.MACHINE_CASINGS[2][0], lensCoverTexture), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java index 01d9fd63df..43b4e8b98f 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java @@ -1,22 +1,24 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingLog() { OrePrefixes.log.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.equals("logRubber")) { GT_Values.RA.addCentrifugeRecipe( GT_Utility.copyAmount(1L, aStack), @@ -29,7 +31,7 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), GT_Values.NI, GT_Values.NI, - new int[] {5000, 3750, 2500, 2500}, + new int[] { 5000, 3750, 2500, 2500 }, 200, 20); GT_ModHandler.addSawmillRecipe( @@ -72,7 +74,7 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra 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)}); + 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), @@ -110,8 +112,8 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra 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)); } } @@ -120,8 +122,8 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra 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)); } } @@ -153,17 +155,20 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra 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 + .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), + tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), + tStack), GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {new ItemStack(aStack.getItem(), 1, i)}); + new Object[] { new ItemStack(aStack.getItem(), 1, i) }); } } } else { @@ -171,8 +176,8 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra 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)); } } @@ -200,15 +205,17 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra 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 + .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_Utility + .copyAmount(tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), + new Object[] { GT_Utility.copyAmount(1L, aStack) }); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java index 1a8e5011f1..d62da2e857 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java @@ -2,26 +2,27 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_RecipeRegistrator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingNugget implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingNugget() { OrePrefixes.nugget.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_Values.RA.addAlloySmelterRecipe( GT_Utility.copyAmount(9L, aStack), - aMaterial.contains(SubTag.SMELTING_TO_GEM) - ? ItemList.Shape_Mold_Ball.get(0L) + 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, @@ -41,8 +42,8 @@ public class ProcessingNugget implements gregtech.api.interfaces.IOreRecipeRegis } 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), @@ -54,7 +55,7 @@ public class ProcessingNugget implements gregtech.api.interfaces.IOreRecipeRegis GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L), GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {"sI ", 'I', OrePrefixes.ingot.get(aMaterial)}); + 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 7764ded2db..0bc88296da 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java @@ -1,5 +1,9 @@ package gregtech.loaders.oreprocessing; +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -8,26 +12,24 @@ import gregtech.api.enums.SubTag; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -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) + if ((tPrefix.name().startsWith("ore")) && (tPrefix != OrePrefixes.orePoor) && (tPrefix != OrePrefixes.oreSmall) && (tPrefix != OrePrefixes.oreRich) - && (tPrefix != OrePrefixes.oreNormal)) tPrefix.add(this); + && (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) + 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) @@ -45,7 +47,7 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra null, null, null, - new int[] {tIsRich ? 2000 : 4000}, + new int[] { tIsRich ? 2000 : 4000 }, tIsRich ? 600 : 300, 30); } else { @@ -54,20 +56,22 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra aMaterial, GT_Utility.copyAmount(1L, aStack), Math.max( - 1, - gregtech.api.GregTech_API.sOPStuff.get( - gregtech.api.enums.ConfigCategories.Materials.oreprocessingoutputmultiplier, - aMaterial.toString(), - 1)) + 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) { + 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); + GT_Utility.getBlockFromStack(aOreStack), + aOreStack.getItemDamage(), + aMaterial.mOreValue); Materials tMaterial = aMaterial.mOreReplacement; Materials tPrimaryByMaterial = null; aMultiplier = Math.max(1, aMultiplier); @@ -76,28 +80,28 @@ 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, + ItemStack tSmeltInto = tIngot + == null ? null + : aMaterial.contains(SubTag.SMELTING_TO_GEM) + ? GT_OreDictUnificator.get( + OrePrefixes.gem, tMaterial.mDirectSmelting, GT_OreDictUnificator.get( - OrePrefixes.gem, - tMaterial, - GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial, 1L), + OrePrefixes.crystal, + tMaterial.mDirectSmelting, + GT_OreDictUnificator.get( + OrePrefixes.gem, + tMaterial, + GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial, 1L), + 1L), 1L), - 1L), - 1L) - : tIngot; + 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) { @@ -116,20 +120,18 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra if (tPrimaryByProduct == null) { 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); + 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.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); + if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null) 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ore, aMaterial, aOreStack, 1L) }, (ItemStack[]) tByProductStacks.toArray(new ItemStack[0]), null, null, @@ -149,7 +151,8 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra GT_ModHandler.removeFurnaceSmelting(aOreStack); } else { tHasSmelting = GT_ModHandler.addSmeltingRecipe( - aOreStack, GT_Utility.copyAmount(aMultiplier * aMaterial.mSmeltingMultiplier, tSmeltInto)); + aOreStack, + GT_Utility.copyAmount(aMultiplier * aMaterial.mSmeltingMultiplier, tSmeltInto)); } if (aMaterial.contains(SubTag.BLASTFURNACE_CALCITE_TRIPLE)) { @@ -160,8 +163,8 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra null, null, GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, tSmeltInto), - ItemList.TE_Slag.get( - 1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), + ItemList.TE_Slag + .get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); @@ -171,8 +174,8 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra null, null, GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, tSmeltInto), - ItemList.TE_Slag.get( - 1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), + ItemList.TE_Slag + .get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); @@ -185,8 +188,8 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra null, null, GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, tSmeltInto), - ItemList.TE_Slag.get( - 1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), + ItemList.TE_Slag + .get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); @@ -196,8 +199,8 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra null, null, GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, tSmeltInto), - ItemList.TE_Slag.get( - 1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), + ItemList.TE_Slag + .get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); @@ -216,7 +219,10 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra if (tCrushed != null) { GT_Values.RA.addForgeHammerRecipe( - aOreStack, GT_Utility.copy(GT_Utility.copyAmount(tCrushed.stackSize, tGem), tCrushed), 16, 10); + aOreStack, + GT_Utility.copy(GT_Utility.copyAmount(tCrushed.stackSize, tGem), tCrushed), + 16, + 10); GT_ModHandler.addPulverisationRecipe( aOreStack, GT_Utility.mul(2L, tCrushed), @@ -235,8 +241,7 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra tPrimaryByMaterial, GT_Utility.copyAmount(1L, tPrimaryByProduct), 1L), - tPrimaryByProduct == null - ? 0 + tPrimaryByProduct == null ? 0 : tPrimaryByProduct.stackSize * 10 * aMultiplier * aMaterial.mByProductMultiplier, GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), 50, diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java index c6be18cd1f..11c7fb0a3c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java @@ -1,14 +1,16 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingOrePoor implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingOrePoor() { OrePrefixes.orePoor.add(this); OrePrefixes.oreSmall.add(this); @@ -17,8 +19,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: @@ -52,10 +54,9 @@ public class ProcessingOrePoor implements gregtech.api.interfaces.IOreRecipeRegi 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)); + 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)); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java index ce1bedac21..55f1e6265a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java @@ -1,31 +1,27 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.GT_Mod; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -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)) { @@ -36,13 +32,11 @@ public class ProcessingOreSmelting implements gregtech.api.interfaces.IOreRecipe 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), + 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, @@ -162,11 +156,10 @@ public class ProcessingOreSmelting implements gregtech.api.interfaces.IOreRecipe 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); + if (tStack == null) 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 62b623a8b1..45ecc36230 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java @@ -3,13 +3,15 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.enums.GT_Values.RA; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingPipe implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingPipe() { OrePrefixes.pipeHuge.add(this); OrePrefixes.pipeLarge.add(this); @@ -26,8 +28,8 @@ 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: @@ -39,71 +41,44 @@ public class ProcessingPipe implements gregtech.api.interfaces.IOreRecipeRegistr 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)}); + 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 - }); + 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 - }); + 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 - }); + 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)}); + new Object[] { "DhD", "D D", "DwD", 'D', OrePrefixes.plateDouble.get(aMaterial) }); } break; case pipeRestrictiveHuge: @@ -127,9 +102,8 @@ public class ProcessingPipe implements gregtech.api.interfaces.IOreRecipeRegistr GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, aMaterial, 1), GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { - "MM ", "MM ", " ", 'M', GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 1) - }); + new Object[] { "MM ", "MM ", " ", 'M', + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 1) }); } RA.addAssemblerRecipe( @@ -145,14 +119,8 @@ public class ProcessingPipe implements gregtech.api.interfaces.IOreRecipeRegistr 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) - }); + new Object[] { "PPP", "PPP", "PPP", 'P', GT_OreDictUnificator + .get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 1L, false, true) }); } RA.addAssemblerRecipe( diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java index 56b30c5486..921491237a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java @@ -1,5 +1,9 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -7,18 +11,16 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingPlank() { OrePrefixes.plank.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("plankWood")) { GT_Values.RA.addLatheRecipe( GT_Utility.copyAmount(1L, aStack), @@ -120,7 +122,7 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.addCraftingRecipe( GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {"sP", 'P', tStack}); + new Object[] { "sP", 'P', tStack }); } if ((tStack == null) && (i >= 16)) break; } @@ -139,7 +141,7 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.addCraftingRecipe( GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {"sP", 'P', aStack}); + 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 7be8375605..73410bb80b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java @@ -10,6 +10,11 @@ import static gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLIS import static gregtech.api.util.GT_Utility.calculateRecipeEU; import static gregtech.common.GT_Proxy.tBits; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.render.TextureFactory; @@ -17,12 +22,9 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_RecipeRegistrator; import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingPlate() { OrePrefixes.plate.add(this); OrePrefixes.plateDouble.add(this); @@ -45,8 +47,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); @@ -112,14 +114,14 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 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), 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) { @@ -131,49 +133,30 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 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) }); } } @@ -184,14 +167,14 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.addShapelessCraftingRecipe( aMaterial.getDust(1), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[] {ToolDictNames.craftingToolMortar, OrePrefixes.plate.get(aMaterial)}); + new Object[] { ToolDictNames.craftingToolMortar, 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); @@ -214,24 +197,19 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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 + // GT_ModHandler.addShapelessCraftingRecipe( + // GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new // Object[] { - // gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, aPlateStack, + // gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, aPlateStack, // aPlateStack - // }); + // }); } RA.addBenderRecipe( @@ -252,8 +230,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist } } - 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); @@ -277,23 +255,16 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 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 }); } } @@ -321,23 +292,18 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 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), - (int) Math.max(aMaterialMass * 2L, 1L), - 30); + if (!aNoWorking) RA.addCNCRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), + (int) Math.max(aMaterialMass * 2L, 1L), + 30); if (!aNoSmashing) { @@ -350,24 +316,16 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 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 }); } } @@ -389,8 +347,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist } } - 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); @@ -407,25 +365,16 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 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 }); } } @@ -447,8 +396,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist } } - 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); @@ -464,8 +413,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist } } - 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); @@ -479,8 +428,7 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist calculateRecipeEU(aMaterial, 8)); } - if (aMaterial.mUnificatable - && aMaterial.mMaterialInto == aMaterial + if (aMaterial.mUnificatable && aMaterial.mMaterialInto == aMaterial && !aNoSmashing && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { @@ -488,15 +436,14 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 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) }); } } @@ -589,8 +536,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,14 +545,10 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist GregTech_API.registerCover( aStack, // If there is an ItemStack of Block for Materials - 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() + 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() : // or copy Block texture TextureFactory.of(Block.getBlockFromItem(tStack.getItem()), tStack.getItemDamage()), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java index dfda2cd0f3..25c2810a94 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java @@ -1,14 +1,16 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingPure implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingPure() { OrePrefixes.crushedPurified.add(this); OrePrefixes.cleanGravel.add(this); @@ -16,8 +18,8 @@ public class ProcessingPure 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) { GT_Values.RA.addForgeHammerRecipe( GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java index 69957bd909..3f06f0676d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java @@ -1,14 +1,16 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.SubTag; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingRecycling implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingRecycling() { for (OrePrefixes tPrefix : OrePrefixes.values()) if ((tPrefix.mIsMaterialBased) && (tPrefix.mMaterialAmount > 0L) && (tPrefix.mIsContainer)) @@ -16,10 +18,9 @@ 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) + 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, diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java index f150c073fa..6f05d874e0 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java @@ -2,23 +2,24 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; 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; public class ProcessingRotor implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingRotor() { OrePrefixes.rotor.add(this); } @Override - public void registerOre( - OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if ((aMaterial.mUnificatable) - && (aMaterial.mMaterialInto == 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)) { ItemStack tPlate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L); ItemStack tRing = GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L); @@ -27,37 +28,30 @@ public class ProcessingRotor implements gregtech.api.interfaces.IOreRecipeRegist if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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_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)}, + new ItemStack[] { tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4) }, Materials.Tin.getMolten(32), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), (int) Math.max(aMaterial.getMass(), 1L), calculateRecipeEU(aMaterial, 24)); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] {tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4)}, + new ItemStack[] { tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4) }, Materials.Lead.getMolten(48), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), (int) Math.max(aMaterial.getMass(), 1L), calculateRecipeEU(aMaterial, 24)); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] {tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4)}, + new ItemStack[] { tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4) }, Materials.SolderingAlloy.getMolten(16), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), (int) Math.max(aMaterial.getMass(), 1L), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java index c621450e80..fd9ab7dbad 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java @@ -1,5 +1,7 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import appeng.core.Api; import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; @@ -10,16 +12,16 @@ 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; public class ProcessingRound implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingRound() { OrePrefixes.round.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 (!aMaterial.contains(SubTag.NO_WORKING)) { GT_Values.RA.addLatheRecipe( GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), @@ -31,17 +33,15 @@ public class ProcessingRound implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), GT_Proxy.tBits, - new Object[] {"fX", "Xh", 'X', OrePrefixes.nugget.get(aMaterial)}); + 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)}); + new Object[] { "fXh", 'X', OrePrefixes.ingot.get(aMaterial) }); } } if (GT_Mod.gregtechproxy.mAE2Integration) { - Api.INSTANCE - .registries() - .matterCannon() + 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 53887e2788..2e91eef9f5 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java @@ -1,21 +1,23 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; public class ProcessingSand implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingSand() { OrePrefixes.sand.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.equals("sandOil")) { GT_Values.RA.addCentrifugeRecipe( GT_Utility.copyAmount(2L, aStack), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java index 4e65e501b3..5ce42c6f45 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java @@ -1,5 +1,7 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -7,20 +9,20 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingSaplings implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingSaplings() { OrePrefixes.treeSapling.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_Values.RA.addPulveriserRecipe( GT_Utility.copyAmount(1L, aStack), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)}, - new int[] {10000}, + 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)); diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java index 4682394199..65564437e4 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java @@ -2,21 +2,23 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; 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; public class ProcessingScrew implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingScrew() { OrePrefixes.screw.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 (!aMaterial.contains(SubTag.NO_WORKING)) { GT_Values.RA.addLatheRecipe( GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), @@ -29,7 +31,7 @@ public class ProcessingScrew implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), GT_Proxy.tBits, - new Object[] {"fX", "X ", 'X', OrePrefixes.bolt.get(aMaterial)}); + 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 b131b9273c..3afc8201c6 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java @@ -2,24 +2,26 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; 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.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingShaping() { OrePrefixes.ingot.add(this); OrePrefixes.dust.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 (((aMaterial == Materials.Glass) || (GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null)) && (!aMaterial.contains(SubTag.NO_SMELTING))) { long aMaterialMass = aMaterial.getMass(); @@ -207,20 +209,18 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi calculateRecipeEU(aMaterial, 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), - calculateRecipeEU(aMaterial, 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), - calculateRecipeEU(aMaterial, 8 * 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), + calculateRecipeEU(aMaterial, 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), + calculateRecipeEU(aMaterial, 8 * tVoltageMultiplier)); if (tAmount * 4 <= 64) { GT_Values.RA.addExtruderRecipe( GT_Utility.copyAmount(1L, aStack), @@ -228,8 +228,7 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial.mSmeltInto, tAmount * 4), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), calculateRecipeEU(aMaterial, 6 * tVoltageMultiplier)); - if ((aMaterial.mUnificatable) - && (aMaterial.mMaterialInto == aMaterial) + if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_SMASHING)) // If material tier < IV then add manual recipe. @@ -237,7 +236,7 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), GT_Proxy.tBits, - new Object[] {"h ", "fX", 'X', OrePrefixes.stick.get(aMaterial)}); + new Object[] { "h ", "fX", 'X', OrePrefixes.stick.get(aMaterial) }); } } @@ -349,20 +348,18 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi 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); - 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); + 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); + 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); break; case "Iron": case "WroughtIron": @@ -372,27 +369,24 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi 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); - 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); - 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); + 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); + 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); + 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); break; case "Tin": GT_Values.RA.addExtruderRecipe( @@ -401,85 +395,75 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi 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); - 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); + 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); + 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); 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); - 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); + 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); + 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); 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); - 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); + 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); + 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); 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); - 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); + 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); + 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); 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); - 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); + 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); + 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); break; case "Polytetrafluoroethylene": // Recipe for cells from PTFE, why is it here? GT_Values.RA.addExtruderRecipe( diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java index 29a990aedc..1b7440b2af 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java @@ -2,22 +2,24 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.enums.GT_Values.MOD_ID_RC; +import net.minecraft.item.ItemStack; + import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; 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( diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java index 69d7366c83..3e7470b5f7 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java @@ -2,31 +2,32 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; 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; public class ProcessingStick implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingStick() { OrePrefixes.stick.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 (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {" s ", "fPx", 'P', OrePrefixes.stick.get(aMaterial)}); + 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) + 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), @@ -43,11 +44,11 @@ public class ProcessingStick implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), GT_Proxy.tBits, - new Object[] {"s", "X", 'X', OrePrefixes.stickLong.get(aMaterial)}); + 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)}); + new Object[] { "f ", " X", 'X', OrePrefixes.ingot.get(aMaterial) }); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java index 0558310751..e586922891 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java @@ -2,26 +2,28 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; 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; public class ProcessingStickLong implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingStickLong() { OrePrefixes.stickLong.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 (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {" s ", "fSx", " S ", 'S', OrePrefixes.stickLong.get(aMaterial)}); + new Object[] { " s ", "fSx", " S ", 'S', OrePrefixes.stickLong.get(aMaterial) }); } if (!aMaterial.contains(SubTag.NO_WORKING)) { GT_Values.RA.addCutterRecipe( @@ -35,11 +37,11 @@ public class ProcessingStickLong implements gregtech.api.interfaces.IOreRecipeRe GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_Proxy.tBits, - new Object[] {"sf", "G ", 'G', OrePrefixes.gemFlawless.get(aMaterial)}); + 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)}); + new Object[] { "sf", "G ", 'G', OrePrefixes.gemExquisite.get(aMaterial) }); } } } @@ -54,7 +56,7 @@ public class ProcessingStickLong implements gregtech.api.interfaces.IOreRecipeRe GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_Proxy.tBits, - new Object[] {"ShS", 'S', OrePrefixes.stick.get(aMaterial)}); + 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 fcd604ef3b..72239056cd 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java @@ -1,5 +1,10 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -8,19 +13,16 @@ import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; 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": @@ -34,7 +36,11 @@ public class ProcessingStone implements IOreRecipeRegistrator { break; case "Sand": GT_ModHandler.addPulverisationRecipe( - GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.sand, 1, 0), null, 10, false); + GT_Utility.copyAmount(1L, aStack), + new ItemStack(Blocks.sand, 1, 0), + null, + 10, + false); break; case "Endstone": GT_ModHandler.addPulverisationRecipe( @@ -87,7 +93,8 @@ public class ProcessingStone implements IOreRecipeRegistrator { 100, 30); GT_ModHandler.addPulverisationRecipe( - GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)); + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)); break; case "Rhyolite": GT_ModHandler.addPulverisationRecipe( diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java index 4e78aaf72f..fad83fe171 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java @@ -1,23 +1,25 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class ProcessingStoneCobble implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingStoneCobble() { OrePrefixes.stoneCobble.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_Values.RA.addAssemblerRecipe( GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java index 539e0513e0..1bab13c5b5 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java @@ -1,13 +1,15 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; public class ProcessingStoneVarious implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingStoneVarious() { OrePrefixes.stone.add(this); OrePrefixes.stoneCobble.add(this); @@ -20,12 +22,8 @@ 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), diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java index 25ebbe793c..31260c1308 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java @@ -2,16 +2,18 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; 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); @@ -33,13 +35,11 @@ public class ProcessingToolHead } @Override - public void registerOre( - OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - boolean aSpecialRecipeReq1 = aMaterial.mUnificatable - && (aMaterial.mMaterialInto == aMaterial) + 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) + boolean aSpecialRecipeReq2 = aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING); boolean aNoWorking = aMaterial.contains(SubTag.NO_WORKING); switch (aPrefix) { @@ -57,858 +57,489 @@ public class ProcessingToolHead GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, aMaterial, 1L), GT_Proxy.tBits, - new Object[] {"Xf", 'X', OrePrefixes.gemChipped.get(aMaterial)}); + 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) - }); + 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_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) - }, + 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), + 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)}); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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 + 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) - }); + 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 + 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) - }); + 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 + 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)}); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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 + 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) - }); + 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 + 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) - }); + 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 + 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) - }); + 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[] { - 100_000L, 32L, 1L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_LV, + 1, + aMaterial, + Materials.Steel, + new long[] { 100_000L, 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) - }); + 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[] { - 75_000L, 32L, 1L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_LV, + 1, + aMaterial, + Materials.Steel, + new long[] { 75_000L, 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) - }); + 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[] { - 50_000L, 32L, 1L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_LV, + 1, + aMaterial, + Materials.Steel, + new long[] { 50_000L, 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) - }); + 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[] { - 400_000L, 128L, 2L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_MV, + 1, + aMaterial, + Materials.Aluminium, + new long[] { 400_000L, 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) - }); + 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[] { - 300_000L, 128L, 2L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_MV, + 1, + aMaterial, + Materials.Aluminium, + new long[] { 300_000L, 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) - }); + 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[] { - 200_000L, 128L, 2L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_MV, + 1, + aMaterial, + Materials.Aluminium, + new long[] { 200_000L, 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) - }); + 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[] { - 1_600_000L, 512L, 3L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] { 1_600_000L, 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) - }); + 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[] { - 1_200_000L, 512L, 3L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] { 1_200_000L, 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) - }); + 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[] { - 800_000L, 512L, 3L, -1L - }), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + GT_MetaGenerated_Tool_01.DRILL_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] { 800_000L, 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) - }); + 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[] {1_600_000L, 512L, 3L, -1L}), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + new long[] { 1_600_000L, 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) - }); + 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[] {1_200_000L, 512L, 3L, -1L}), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + new long[] { 1_200_000L, 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) - }); + 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[] {800_000L, 512L, 3L, -1L}), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + new long[] { 800_000L, 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) - }); + 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) - }); + new Object[] { "XSX", "XSX", "ShS", 'X', OrePrefixes.plate.get(aMaterial), 'S', + OrePrefixes.plate.get(Materials.Steel) }); if (aMaterial.getMolten(1) != null) { GT_Values.RA.addFluidSolidifierRecipe( ItemList.Shape_Mold_ToolHeadDrill.get(0), @@ -931,8 +562,12 @@ public class ProcessingToolHead if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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_MetaGenerated_Tool_01.FILE, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + new Object[] { aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial) }); if ((!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.BOUNCY))) { if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { @@ -946,28 +581,23 @@ public class ProcessingToolHead 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) - }); + new Object[] { "P", "P", "S", 'P', OrePrefixes.plate.get(aMaterial), 'S', + 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) - }, + 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), + GT_MetaGenerated_Tool_01.FILE, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), 200, calculateRecipeEU(aMaterial, 120)); @@ -976,75 +606,71 @@ public class ProcessingToolHead if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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_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) - }, + 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), + GT_MetaGenerated_Tool_01.HOE, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), 200, calculateRecipeEU(aMaterial, 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)}); + 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: if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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_MetaGenerated_Tool_01.PICKAXE, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + new Object[] { aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial) }); - 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 (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)}); + 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_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), - GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), - GT_Utility.getIntegratedCircuit(5) - }, + 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), + GT_MetaGenerated_Tool_01.PICKAXE, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), 200, 120); @@ -1054,31 +680,35 @@ public class ProcessingToolHead 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_MetaGenerated_Tool_01.PLOW, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + new Object[] { aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial) }); - 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 (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)}); + 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_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), - GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), - GT_Utility.getIntegratedCircuit(6) - }, + 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), + GT_MetaGenerated_Tool_01.PLOW, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), 200, calculateRecipeEU(aMaterial, 120)); @@ -1088,38 +718,36 @@ public class ProcessingToolHead 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_MetaGenerated_Tool_01.SAW, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + new Object[] { aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial) }); - 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 (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)}); + if (!aNoWorking) GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { "GGf", 'G', OrePrefixes.gem.get(aMaterial) }); } 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) - }, + 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), + GT_MetaGenerated_Tool_01.SAW, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), 200, calculateRecipeEU(aMaterial, 120)); @@ -1129,38 +757,36 @@ public class ProcessingToolHead 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_MetaGenerated_Tool_01.SENSE, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + new Object[] { aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial) }); - 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 (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)}); + 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_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), - GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), - GT_Utility.getIntegratedCircuit(8) - }, + 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), + GT_MetaGenerated_Tool_01.SENSE, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), 200, calculateRecipeEU(aMaterial, 120)); @@ -1168,583 +794,371 @@ public class ProcessingToolHead 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_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) - }, + 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), + 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)}); + 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: if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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_MetaGenerated_Tool_01.SWORD, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + new Object[] { aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial) }); - 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 (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)}); + 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_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), - GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), - GT_Utility.getIntegratedCircuit(10) - }, + 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), + GT_MetaGenerated_Tool_01.SWORD, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), 200, calculateRecipeEU(aMaterial, 120)); 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_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) - }, + 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), + 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)}); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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 + 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) - }); + 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 + 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) - }); + 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 + 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) - }); + 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)) @@ -1767,7 +1181,7 @@ public class ProcessingToolHead aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + 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)) @@ -1778,17 +1192,10 @@ public class ProcessingToolHead 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) - }); + 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)) @@ -1799,32 +1206,16 @@ public class ProcessingToolHead 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) - }); + 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 (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) }); break; case turbineBlade: GT_Values.RA.addAssemblerRecipe( @@ -1857,19 +1248,10 @@ public class ProcessingToolHead 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) - }); + 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( diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java index d50fa96967..59a9e6a479 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java @@ -1,206 +1,132 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; public class ProcessingToolOther implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingToolOther() { OrePrefixes.toolHeadHammer.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 ((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_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) - }); + 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)) + 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_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)}); + 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_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}); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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_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) - }); + 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.AnySyntheticRubber, - new long[] {1600000L, 512L, 3L, -1L}), + 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.AnySyntheticRubber), - 'S', - OrePrefixes.stick.get(Materials.StainlessSteel), - 'L', - ItemList.Battery_RE_HV_Lithium.get(1L) - }); + new Object[] { "LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', + OrePrefixes.plate.get(Materials.AnySyntheticRubber), 'S', + OrePrefixes.stick.get(Materials.StainlessSteel), 'L', + ItemList.Battery_RE_HV_Lithium.get(1L) }); GT_ModHandler.addCraftingRecipe( (GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.POCKET_MULTITOOL, 1, aMaterial, aMaterial, null)), + GT_MetaGenerated_Tool_01.POCKET_MULTITOOL, + 1, + aMaterial, + aMaterial, + null)), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { - "ABC", - "DEF", - "CFG", - 'A', - OrePrefixes.stickLong.get(aMaterial), - 'B', - OrePrefixes.toolHeadSaw.get(aMaterial), - 'C', - OrePrefixes.ring.get(aMaterial), - 'D', - OrePrefixes.toolHeadFile.get(aMaterial), - 'E', - OrePrefixes.plate.get(aMaterial), - 'F', - OrePrefixes.toolHeadSword.get(aMaterial), - 'G', - Dyes.dyeBlue - }); + new Object[] { "ABC", "DEF", "CFG", 'A', OrePrefixes.stickLong.get(aMaterial), 'B', + OrePrefixes.toolHeadSaw.get(aMaterial), 'C', OrePrefixes.ring.get(aMaterial), 'D', + OrePrefixes.toolHeadFile.get(aMaterial), 'E', OrePrefixes.plate.get(aMaterial), 'F', + OrePrefixes.toolHeadSword.get(aMaterial), 'G', Dyes.dyeBlue }); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java index 217781f61a..1d0fa1c3bb 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java @@ -1,30 +1,33 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -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); + || (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)), + Materials.SeedOil + .getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 120L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, @@ -33,8 +36,8 @@ public class ProcessingTransforming implements IOreRecipeRegistrator { 8); GT_Values.RA.addChemicalBathRecipe( GT_Utility.copyAmount(1L, aStack), - Materials.SeedOilLin.getFluid( - GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), + Materials.SeedOilLin + .getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, @@ -43,8 +46,8 @@ public class ProcessingTransforming implements IOreRecipeRegistrator { 8); GT_Values.RA.addChemicalBathRecipe( GT_Utility.copyAmount(1L, aStack), - Materials.SeedOilHemp.getFluid( - GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), + Materials.SeedOilHemp + .getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, @@ -55,8 +58,8 @@ public class ProcessingTransforming implements IOreRecipeRegistrator { case "Iron": GT_Values.RA.addChemicalBathRecipe( GT_Utility.copyAmount(1L, aStack), - Materials.FierySteel.getFluid( - GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 250L, true)), + Materials.FierySteel + .getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 250L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, @@ -72,8 +75,8 @@ public class ProcessingTransforming implements IOreRecipeRegistrator { case "WroughtIron": GT_Values.RA.addChemicalBathRecipe( GT_Utility.copyAmount(1L, aStack), - Materials.FierySteel.getFluid( - GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 225L, true)), + Materials.FierySteel + .getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 225L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, @@ -89,8 +92,8 @@ public class ProcessingTransforming implements IOreRecipeRegistrator { case "Steel": GT_Values.RA.addChemicalBathRecipe( GT_Utility.copyAmount(1L, aStack), - Materials.FierySteel.getFluid( - GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 200L, true)), + Materials.FierySteel + .getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 200L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java index 315e8a7549..6b6580885e 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java @@ -1,19 +1,21 @@ package gregtech.loaders.oreprocessing; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class ProcessingWax implements gregtech.api.interfaces.IOreRecipeRegistrator { + public ProcessingWax() { OrePrefixes.wax.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.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 ae1b476b94..9b136ad29b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java @@ -2,6 +2,10 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Utility.calculateRecipeEU; +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; + import appeng.api.config.TunnelType; import appeng.core.Api; import cpw.mods.fml.common.Optional; @@ -12,14 +16,12 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; -import java.util.ArrayList; -import net.minecraft.item.ItemStack; public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistrator { - private Materials[] dielectrics = {Materials.PolyvinylChloride, Materials.Polydimethylsiloxane}; - private Materials[] rubbers = {Materials.Rubber, Materials.StyreneButadieneRubber, Materials.Silicone}; - private Materials[] syntheticRubbers = {Materials.StyreneButadieneRubber, Materials.Silicone}; + private Materials[] dielectrics = { Materials.PolyvinylChloride, Materials.Polydimethylsiloxane }; + private Materials[] rubbers = { Materials.Rubber, Materials.StyreneButadieneRubber, Materials.Silicone }; + private Materials[] syntheticRubbers = { Materials.StyreneButadieneRubber, Materials.Silicone }; private static Object tt; @@ -33,8 +35,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 { @@ -64,14 +66,13 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr 200, calculateRecipeEU(aMaterial, 8)); } - if (aMaterial.mUnificatable - && (aMaterial.mMaterialInto == aMaterial) + if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_Proxy.tBits, - new Object[] {"Xx", 'X', OrePrefixes.plate.get(aMaterial)}); + new Object[] { "Xx", 'X', OrePrefixes.plate.get(aMaterial) }); } } GT_Values.RA.addAssemblerRecipe( @@ -110,10 +111,11 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr correspondingCable = OrePrefixes.cableGt02; if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { GT_ModHandler.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), new Object[] {aOreDictName}); + 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)}); + new Object[] { OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial) }); } break; case wireGt04: @@ -121,16 +123,15 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr correspondingCable = OrePrefixes.cableGt04; if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 4L), + new Object[] { aOreDictName }); GT_ModHandler.addShapelessCraftingRecipe( GT_Utility.copyAmount(1L, aStack), - new Object[] {OrePrefixes.wireGt02.get(aMaterial), OrePrefixes.wireGt02.get(aMaterial)}); + 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: @@ -138,20 +139,17 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr correspondingCable = OrePrefixes.cableGt08; if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { 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_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 8L), + new Object[] { aOreDictName }); GT_ModHandler.addShapelessCraftingRecipe( GT_Utility.copyAmount(1L, aStack), - new Object[] {OrePrefixes.wireGt04.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); + 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: @@ -160,10 +158,10 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { GT_ModHandler.addShapelessCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 12L), - new Object[] {aOreDictName}); + new Object[] { aOreDictName }); GT_ModHandler.addShapelessCraftingRecipe( GT_Utility.copyAmount(1L, aStack), - new Object[] {OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); + new Object[] { OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial) }); } break; case wireGt16: @@ -173,13 +171,13 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr GT_ModHandler.addShapelessCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 16L), - new Object[] {aOreDictName}); + new Object[] { aOreDictName }); GT_ModHandler.addShapelessCraftingRecipe( GT_Utility.copyAmount(1L, aStack), - new Object[] {OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt08.get(aMaterial)}); + 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)}); + new Object[] { OrePrefixes.wireGt12.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial) }); if (GT_Mod.gregtechproxy.mAE2Integration) { AE2addNewAttunement(aStack); @@ -187,8 +185,10 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr } 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; } @@ -207,7 +207,8 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr craftingListRubber.add(OrePrefixes.plate.get(Materials.Rubber)); } GT_ModHandler.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), craftingListRubber.toArray()); + 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), @@ -272,13 +273,14 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { GT_Values.RA.addAssemblerRecipe( - new ItemStack[] {GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, + 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)}, + new ItemStack[] { aStack, dielectric.getDustSmall(costMultiplier) }, syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, @@ -310,13 +312,14 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { GT_Values.RA.addAssemblerRecipe( - new ItemStack[] {GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, + 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)}, + new ItemStack[] { aStack, dielectric.getDustSmall(costMultiplier) }, syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, @@ -350,15 +353,14 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier) - }, + new ItemStack[] { GT_Utility.copyAmount(4, aStack), + dielectric.getDust(costMultiplier) }, syntheticRubber.getMolten(costMultiplier * 144), GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), 400, calculateRecipeEU(aMaterial, 8)); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] {aStack, dielectric.getDustSmall(costMultiplier)}, + new ItemStack[] { aStack, dielectric.getDustSmall(costMultiplier) }, syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, @@ -367,66 +369,60 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr } } else { GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - aStack, - GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, costMultiplier), - GT_Utility.getIntegratedCircuit(24) - }, + 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, calculateRecipeEU(aMaterial, 8)); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - aStack, - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.PolyphenyleneSulfide, costMultiplier), - GT_Utility.getIntegratedCircuit(24) - }, + 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, calculateRecipeEU(aMaterial, 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, + calculateRecipeEU(aMaterial, 8)); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(4, aStack), - dielectric.getDust(costMultiplier), - GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, costMultiplier * 4) - }, + 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, calculateRecipeEU(aMaterial, 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, + calculateRecipeEU(aMaterial, 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, - calculateRecipeEU(aMaterial, 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, - calculateRecipeEU(aMaterial, 8)); - GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - aStack, - dielectric.getDustSmall(costMultiplier), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.PolyphenyleneSulfide, costMultiplier) - }, + 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, @@ -466,9 +462,7 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr @Optional.Method(modid = "appliedenergistics2") private void AE2AddNetAttunementCable(ItemStack aStack, OrePrefixes correspondingCable, Materials aMaterial) { Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, (TunnelType) tt); - Api.INSTANCE - .registries() - .p2pTunnel() + Api.INSTANCE.registries().p2pTunnel() .addNewAttunement(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), (TunnelType) tt); } // 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 39f6830555..2045172eec 100644 --- a/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java @@ -1,14 +1,17 @@ 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 gregtech.GT_Mod; +import gregtech.api.util.GT_Utility; + public class GT_BlockResistanceLoader implements Runnable { + @Override public void run() { if (GT_Mod.gregtechproxy.mHardRock) { diff --git a/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java b/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java index c518dea6fa..d661fb4452 100644 --- a/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java @@ -1,17 +1,19 @@ package gregtech.loaders.postload; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; + import gregtech.GT_Mod; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraftforge.common.ChestGenHooks; public class GT_BookAndLootLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Adding worldgenerated Chest Content."); @@ -47,140 +49,227 @@ 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_Holy_Water.get(1L), 4, 8, 20)); - ChestGenHooks.addItem( - "dungeonChest", new WeightedRandomChestContent(ItemList.Bottle_Purple_Drink.get(1L), 8, 16, 80)); + "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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + "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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + "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)); + 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)); + 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)); + 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)); + 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)); + 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)); + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), + 2, + 8, + 4)); ChestGenHooks.addItem( "pyramidJungleDispenser", @@ -188,136 +277,228 @@ public class GT_BookAndLootLoader implements Runnable { ChestGenHooks.addItem( "pyramidJungleDispenser", new WeightedRandomChestContent( - GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, Materials.DamascusSteel, 1L), 8, 16, 20)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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(ItemList.McGuffium_239.get(1L), 1, 1, 1)); ChestGenHooks.addItem( "villageBlacksmith", new WeightedRandomChestContent( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), 1, 4, 6)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.DamascusSteel, 1L), + 4, + 12, + 1)); ChestGenHooks.addItem( - "strongholdCrossing", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 6)); + "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)); + "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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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 c81d4d7a0f..7a5b960b3a 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -1,5 +1,16 @@ package gregtech.loaders.postload; +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; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -16,23 +27,14 @@ 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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; 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 + 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"; @@ -42,11 +44,12 @@ public class GT_CraftingRecipeLoader implements Runnable { 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)}); + 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)) { @@ -55,17 +58,8 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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)) { @@ -74,17 +68,8 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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)) { @@ -93,40 +78,21 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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))) { + 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" - }); + 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)) { @@ -136,33 +102,16 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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) - }); + 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)) { @@ -171,17 +120,8 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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); @@ -191,7 +131,7 @@ public class GT_CraftingRecipeLoader implements Runnable { 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)}); + new Object[] { aTextIron2, aTextIron2, 'X', OrePrefixes.plate.get(Materials.Rubber) }); } } GT_ModHandler.removeRecipeByOutputDelayed(ItemList.Bottle_Empty.get(1L)); @@ -214,623 +154,588 @@ 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)}); + 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), + GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize / 2 : tStack.stackSize, + tStack), bits_no_remove_buffered, - new Object[] {"P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); + 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}); + 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}); + 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.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)}); + 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)}); + 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) - }); + 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)}); + 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)}); + 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 - }); + 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 - }); + 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 + 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}); + 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 + 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}); + 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 + 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) - }); + 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 + 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) - }); + 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 + 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)}); + 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 + 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)}); + 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 + 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)}); + 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 + 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)}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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) - }); + 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)}); + 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)}); + 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)}); + 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}); + new Object[] { "foodDough", ToolDictNames.craftingToolRollingPin }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Food_Raw_Bun.get(1L), bits_no_remove_buffered, new Object[] {"foodDough"}); + 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"}); + 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 - }); + 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)}); + 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}); + 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}); + 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}); + 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}); + 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 - }); + 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}); + 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 - }); + 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 - }); + 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)}); + 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}); + 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 - }); + 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 - }); + 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) - }); + 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}); + 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 - }); + 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 - }); + 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)}); + 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)}); + 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 - }); + 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 - }); + 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) - }); + 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) - }); + 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 - }); + 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 - }); + 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) - }); + 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) - }); + 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 - }); + 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 - }); + 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) - }); + 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) - }); + 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 - }); + 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 - }); + 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)}); + 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"}); + 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"}); + 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"}); + 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"}); + 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) - }); + 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)}); + 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)}); + 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 - }); + 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)); + 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 + 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"); } @@ -856,15 +761,8 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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, @@ -877,1149 +775,571 @@ public class GT_CraftingRecipeLoader implements Runnable { tStack, tStack), GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { - "SSS", - "SAS", - "SSS", - 'A', - OrePrefixes.dust.get(Materials.Apatite), - 'S', - OrePrefixes.dust.get(Materials.Ash) - }); + 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.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) - }); + 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) - }); + 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) - }); + 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) - }); + 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_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.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) - }); + 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) - }); + 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)}); + 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) - }); + 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, @@ -2065,7 +1385,7 @@ public class GT_CraftingRecipeLoader implements Runnable { // 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 + // 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 @@ -2077,7 +1397,7 @@ public class GT_CraftingRecipeLoader implements Runnable { // 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 + // 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), @@ -2086,51 +1406,34 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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)}); + 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), @@ -2179,7 +1482,7 @@ public class GT_CraftingRecipeLoader implements Runnable { // 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 + // 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 @@ -2191,7 +1494,7 @@ public class GT_CraftingRecipeLoader implements Runnable { // 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 + // 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), @@ -2199,51 +1502,34 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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)}); + 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), @@ -2252,43 +1538,27 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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), @@ -2315,17 +1585,11 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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)}); @@ -2348,83 +1612,52 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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) - }); + 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_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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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)}); @@ -2434,30 +1667,21 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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) - }); + 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) - }); + 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), @@ -2473,27 +1697,21 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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)}); + 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)}); + 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), @@ -2505,117 +1723,79 @@ public class GT_CraftingRecipeLoader implements Runnable { 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) - }); + 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) - }); + 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)}); + 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)}); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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()); + 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()); if (Loader.isModLoaded("NotEnoughItems")) { iToRemoveAndHide.forEach(item -> { @@ -2624,403 +1804,182 @@ 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); + 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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) - }); + 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.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")) { @@ -3032,105 +1991,52 @@ public class GT_CraftingRecipeLoader implements Runnable { 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.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) - }); + 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) - }); + 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) - }); + 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) - }); + 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)}); + 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), @@ -3138,33 +2044,17 @@ public class GT_CraftingRecipeLoader implements Runnable { 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.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.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), @@ -3213,179 +2103,96 @@ public class GT_CraftingRecipeLoader implements Runnable { 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.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.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.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.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.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.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.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.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.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.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.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( @@ -3400,21 +2207,13 @@ public class GT_CraftingRecipeLoader implements Runnable { 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); @@ -3427,42 +2226,28 @@ public class GT_CraftingRecipeLoader implements Runnable { GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 2), GT_ModHandler.RecipeBits.BUFFERED, - new Object[] {"SSS", " m ", 'S', new ItemStack(Items.reeds)}); + 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)}); + 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) - }); + 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.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)) { @@ -3470,7 +2255,7 @@ public class GT_CraftingRecipeLoader implements Runnable { 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"}); + new Object[] { "S ", " F", 'F', new ItemStack(Items.flint, 1), 'S', "nuggetSteel" }); } GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("diamondDrill", 1L)); @@ -3502,7 +2287,7 @@ public class GT_CraftingRecipeLoader implements Runnable { 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', + // 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)}); @@ -3527,71 +2312,40 @@ public class GT_CraftingRecipeLoader implements Runnable { 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)); + 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)); + 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) - }); + 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)}); + 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(); @@ -3605,15 +2359,12 @@ public class GT_CraftingRecipeLoader implements Runnable { 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 5af34bf413..409bdb4bfe 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CropLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CropLoader.java @@ -1,31 +1,27 @@ package gregtech.loaders.postload; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_BaseCrop; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class GT_CropLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Register Crops to IC2."); try { - /*Tags: - * Vines = Tendrilly - * Edible = Food - * + /* + * Tags: Vines = Tendrilly Edible = Food */ - 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) - }; + 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) }; new GT_BaseCrop( 124, "Indigo", @@ -41,7 +37,7 @@ public class GT_CropLoader implements Runnable { 0, 4, 0, - new String[] {"Flower", "Blue", "Ingredient"}, + new String[] { "Flower", "Blue", "Ingredient" }, ItemList.Crop_Drop_Indigo.get(1L), null); new GT_BaseCrop( @@ -59,7 +55,7 @@ public class GT_CropLoader implements Runnable { 2, 0, 1, - new String[] {"Silk", "Tendrilly", "Addictive"}, + new String[] { "Silk", "Tendrilly", "Addictive" }, new ItemStack(Items.string, 1), null); new GT_BaseCrop( @@ -77,7 +73,7 @@ public class GT_CropLoader implements Runnable { 2, 1, 12, - new String[] {"Fire", "Dark", "Reed", "Rotten", "Coal", "Oil"}, + new String[] { "Fire", "Dark", "Reed", "Rotten", "Coal", "Oil" }, ItemList.Crop_Drop_OilBerry.get(1L), null); new GT_BaseCrop( @@ -95,10 +91,10 @@ public class GT_CropLoader implements Runnable { 8, 2, 9, - new String[] {"Shiny", "Tendrilly", "Emerald", "Berylium", "Crystal"}, + new String[] { "Shiny", "Tendrilly", "Emerald", "Berylium", "Crystal" }, Materials.Emerald, ItemList.Crop_Drop_BobsYerUncleRanks.get(1L), - new ItemStack[] {new ItemStack(Items.emerald, 1)}); + new ItemStack[] { new ItemStack(Items.emerald, 1) }); new GT_BaseCrop( 128, "Diareed", @@ -114,10 +110,10 @@ public class GT_CropLoader implements Runnable { 10, 2, 10, - new String[] {"Fire", "Shiny", "Reed", "Coal", "Diamond", "Crystal"}, + 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 ItemStack[] { new ItemStack(Items.diamond, 1) }); new GT_BaseCrop( 129, "Withereed", @@ -133,10 +129,10 @@ public class GT_CropLoader implements Runnable { 4, 1, 3, - new String[] {"Fire", "Undead", "Reed", "Coal", "Rotten", "Wither"}, + 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 ItemStack[] { new ItemStack(Items.coal, 1), new ItemStack(Items.coal, 1) }); new GT_BaseCrop( 130, "Blazereed", @@ -152,9 +148,9 @@ public class GT_CropLoader implements Runnable { 1, 0, 0, - new String[] {"Fire", "Blaze", "Reed", "Sulfur"}, + new String[] { "Fire", "Blaze", "Reed", "Sulfur" }, new ItemStack(Items.blaze_powder, 1), - new ItemStack[] {new ItemStack(Items.blaze_rod, 1)}); + new ItemStack[] { new ItemStack(Items.blaze_rod, 1) }); new GT_BaseCrop( 131, "Eggplant", @@ -170,14 +166,10 @@ public class GT_CropLoader implements Runnable { 1, 0, 0, - new String[] {"Chicken", "Egg", "Food", "Feather", "Flower", "Addictive"}, + 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 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", @@ -193,7 +185,7 @@ public class GT_CropLoader implements Runnable { 3, 1, 0, - new String[] {"Cow", "Silk", "Tendrilly"}, + new String[] { "Cow", "Silk", "Tendrilly" }, new ItemStack(Items.leather, 1), null); new GT_BaseCrop( @@ -211,11 +203,10 @@ public class GT_CropLoader implements Runnable { 1, 0, 3, - new String[] {"Toxic", "Undead", "Tendrilly", "Food", "Rotten"}, + 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 ItemStack[] { ItemList.Dye_Bonemeal.get(1L), ItemList.Dye_Bonemeal.get(1L), + new ItemStack(Items.bone, 1) }); new GT_BaseCrop( 134, "Creeperweed", @@ -231,7 +222,7 @@ public class GT_CropLoader implements Runnable { 5, 1, 3, - new String[] {"Creeper", "Tendrilly", "Explosive", "Fire", "Sulfur", "Saltpeter", "Coal"}, + new String[] { "Creeper", "Tendrilly", "Explosive", "Fire", "Sulfur", "Saltpeter", "Coal" }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), null); new GT_BaseCrop( @@ -249,13 +240,10 @@ public class GT_CropLoader implements Runnable { 2, 1, 6, - new String[] {"Ender", "Flower", "Shiny"}, + 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 ItemStack[] { new ItemStack(Items.ender_pearl, 1), new ItemStack(Items.ender_pearl, 1), + new ItemStack(Items.ender_eye, 1) }); new GT_BaseCrop( 136, "Meatrose", @@ -271,14 +259,10 @@ public class GT_CropLoader implements Runnable { 1, 3, 0, - new String[] {"Food", "Flower", "Cow", "Fish", "Chicken", "Pig"}, + 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 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", @@ -294,7 +278,7 @@ public class GT_CropLoader implements Runnable { 0, 1, 0, - new String[] {"Food", "Milk", "Cow"}, + new String[] { "Food", "Milk", "Cow" }, ItemList.Crop_Drop_MilkWart.get(1L), null); new GT_BaseCrop( @@ -312,7 +296,7 @@ public class GT_CropLoader implements Runnable { 0, 0, 2, - new String[] {"Slime", "Bouncy", "Sticky", "Bush"}, + new String[] { "Slime", "Bouncy", "Sticky", "Bush" }, new ItemStack(Items.slime_ball, 1), null); new GT_BaseCrop( @@ -330,9 +314,9 @@ public class GT_CropLoader implements Runnable { 4, 1, 3, - new String[] {"Toxic", "Silk", "Spider", "Flower", "Ingredient", "Addictive"}, + 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 ItemStack[] { new ItemStack(Items.spider_eye, 1), new ItemStack(Blocks.web, 1) }); new GT_BaseCrop( 140, "Tearstalks", @@ -348,7 +332,7 @@ public class GT_CropLoader implements Runnable { 0, 0, 0, - new String[] {"Healing", "Nether", "Ingredient", "Reed", "Ghast"}, + new String[] { "Healing", "Nether", "Ingredient", "Reed", "Ghast" }, new ItemStack(Items.ghast_tear, 1), null); new GT_BaseCrop( @@ -366,7 +350,7 @@ public class GT_CropLoader implements Runnable { 3, 0, 0, - new String[] {"Shiny", "Metal", "Pine", "Tin", "Bush"}, + new String[] { "Shiny", "Metal", "Pine", "Tin", "Bush" }, Materials.Tin, ItemList.Crop_Drop_Tine.get(1L), null); @@ -385,7 +369,7 @@ public class GT_CropLoader implements Runnable { 1, 1, 1, - new String[] {"Shiny", "Metal", "Cotton", "Copper", "Bush"}, + new String[] { "Shiny", "Metal", "Cotton", "Copper", "Bush" }, Materials.Copper, ItemList.Crop_Drop_Coppon.get(1L), null); @@ -404,7 +388,7 @@ public class GT_CropLoader implements Runnable { 0, 0, 2, - new String[] {"Food", "Mushroom", "Ingredient"}, + new String[] { "Food", "Mushroom", "Ingredient" }, new ItemStack(Blocks.brown_mushroom, 1), null); new GT_BaseCrop( @@ -422,7 +406,7 @@ public class GT_CropLoader implements Runnable { 3, 0, 2, - new String[] {"Toxic", "Mushroom", "Ingredient"}, + new String[] { "Toxic", "Mushroom", "Ingredient" }, new ItemStack(Blocks.red_mushroom, 1), null); new GT_BaseCrop( @@ -440,7 +424,7 @@ public class GT_CropLoader implements Runnable { 1, 0, 0, - new String[] {"Shiny", "Metal", "Silver", "Reed"}, + new String[] { "Shiny", "Metal", "Silver", "Reed" }, Materials.Silver, ItemList.Crop_Drop_Argentia.get(1L), null); @@ -459,7 +443,7 @@ public class GT_CropLoader implements Runnable { 3, 1, 1, - new String[] {"Heavy", "Metal", "Lead", "Reed"}, + new String[] { "Heavy", "Metal", "Lead", "Reed" }, Materials.Lead, ItemList.Crop_Drop_Plumbilia.get(1L), null); @@ -478,9 +462,9 @@ public class GT_CropLoader implements Runnable { 7, 2, 8, - new String[] {"Metal", "Tendrilly", "Iron"}, + new String[] { "Metal", "Tendrilly", "Iron" }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steeleaf, 1L), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steeleaf, 1L)}); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steeleaf, 1L) }); new GT_BaseCrop( 148, "Liveroots", @@ -496,9 +480,9 @@ public class GT_CropLoader implements Runnable { 5, 2, 6, - new String[] {"Wood", "Tendrilly"}, + new String[] { "Wood", "Tendrilly" }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.LiveRoot, 1L), - new ItemStack[] {ItemList.TF_LiveRoot.get(1L)}); + new ItemStack[] { ItemList.TF_LiveRoot.get(1L) }); new GT_BaseCrop( 149, "Trollplant", @@ -514,13 +498,10 @@ public class GT_CropLoader implements Runnable { 5, 2, 8, - new String[] {"Troll", "Bad", "Scrap"}, + 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 ItemStack[] { ItemList.IC2_Plantball.get(1), ItemList.IC2_Scrap.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium241, 1L) }); new GT_BaseCrop( 150, "Lazulia", @@ -536,7 +517,7 @@ public class GT_CropLoader implements Runnable { 5, 7, 4, - new String[] {"Shiny", "Bad", "Crystal", "Lapis"}, + new String[] { "Shiny", "Bad", "Crystal", "Lapis" }, Materials.Lapis, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), null); @@ -555,7 +536,7 @@ public class GT_CropLoader implements Runnable { 3, 5, 4, - new String[] {"Light", "Shiny", "Crystal"}, + new String[] { "Light", "Shiny", "Crystal" }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), null); new GT_BaseCrop( @@ -573,13 +554,11 @@ public class GT_CropLoader implements Runnable { 5, 4, 8, - new String[] {"Growth", "Healing", "Flower"}, + 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 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", @@ -595,7 +574,7 @@ public class GT_CropLoader implements Runnable { 2, 3, 3, - new String[] {"Metal", "Aluminium", "Reed", "Aluminium"}, + new String[] { "Metal", "Aluminium", "Reed", "Aluminium" }, Materials.Aluminium, ItemList.Crop_Drop_Bauxite.get(1), null); @@ -614,7 +593,7 @@ public class GT_CropLoader implements Runnable { 3, 3, 1, - new String[] {"Metal", "Heavy", "Reed", "Titanium"}, + new String[] { "Metal", "Heavy", "Reed", "Titanium" }, Materials.Titanium, ItemList.Crop_Drop_Ilmenite.get(1), null); @@ -633,10 +612,10 @@ public class GT_CropLoader implements Runnable { 1, 2, 1, - new String[] {"Radioactive", "Metal", "Danger", "Uranium"}, + new String[] { "Radioactive", "Metal", "Danger", "Uranium" }, Materials.Uranium, ItemList.Crop_Drop_Pitchblende.get(1), - new ItemStack[] {ItemList.Crop_Drop_Uraninite.get(1)}); + new ItemStack[] { ItemList.Crop_Drop_Uraninite.get(1) }); new GT_BaseCrop( 157, "God of Thunder", @@ -652,7 +631,7 @@ public class GT_CropLoader implements Runnable { 5, 1, 2, - new String[] {"Radioactive", "Metal", "Coal", "Thorium"}, + new String[] { "Radioactive", "Metal", "Coal", "Thorium" }, Materials.Thorium, ItemList.Crop_Drop_Thorium.get(1), null); @@ -671,15 +650,11 @@ public class GT_CropLoader implements Runnable { 1, 6, 1, - new String[] {"Transform", "Coal", "Reed"}, + 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 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", @@ -695,16 +670,13 @@ public class GT_CropLoader implements Runnable { 0, 1, 0, - new String[] {"Wither", "Nether", "Undead", "Netherstar"}, + 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 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", @@ -720,7 +692,7 @@ public class GT_CropLoader implements Runnable { 4, 2, 6, - new String[] {"Zombie", "Rotten", "Undead"}, + new String[] { "Zombie", "Rotten", "Undead" }, new ItemStack(Items.rotten_flesh), null); new GT_BaseCrop( @@ -738,7 +710,7 @@ public class GT_CropLoader implements Runnable { 1, 2, 2, - new String[] {"Metal", "Fire", "Alloy"}, + new String[] { "Metal", "Fire", "Alloy" }, Materials.Nickel, ItemList.Crop_Drop_Nickel.get(1), null); @@ -757,7 +729,7 @@ public class GT_CropLoader implements Runnable { 2, 2, 3, - new String[] {"Metal", "Alloy", "Bush"}, + new String[] { "Metal", "Alloy", "Bush" }, Materials.Zinc, ItemList.Crop_Drop_Zinc.get(1), null); @@ -776,12 +748,10 @@ public class GT_CropLoader implements Runnable { 2, 1, 3, - new String[] {"Crystal", "Fire", "Nether"}, + 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 ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 1L), }); new GT_BaseCrop( 164, "Olivia", @@ -797,12 +767,10 @@ public class GT_CropLoader implements Runnable { 1, 4, 0, - new String[] {"Crystal", "Shiny", "Processing", "Olivine"}, + 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 ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), }); new GT_BaseCrop( 165, "Sapphirum", @@ -818,12 +786,10 @@ public class GT_CropLoader implements Runnable { 1, 5, 0, - new String[] {"Crystal", "Shiny", "Metal", "Sapphire"}, + 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 ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), }); new GT_BaseCrop( 166, "Pyrolusium", @@ -839,7 +805,7 @@ public class GT_CropLoader implements Runnable { 1, 1, 0, - new String[] {"Metal", "Clean", "Bush", "Manganese"}, + new String[] { "Metal", "Clean", "Bush", "Manganese" }, Materials.Manganese, ItemList.Crop_Drop_Manganese.get(1), null); @@ -858,7 +824,7 @@ public class GT_CropLoader implements Runnable { 1, 1, 0, - new String[] {"Metal", "Hard", "Bush", "Tungsten"}, + new String[] { "Metal", "Hard", "Bush", "Tungsten" }, Materials.Tungsten, ItemList.Crop_Drop_Scheelite.get(1), null); @@ -877,7 +843,7 @@ public class GT_CropLoader implements Runnable { 0, 3, 0, - new String[] {"Metal", "Shiny", "Reed", "Platinum"}, + new String[] { "Metal", "Shiny", "Reed", "Platinum" }, Materials.Platinum, ItemList.Crop_Drop_Platinum.get(1), null); @@ -896,10 +862,10 @@ public class GT_CropLoader implements Runnable { 0, 1, 0, - new String[] {"Metal", "Iridium", "Reed"}, + new String[] { "Metal", "Iridium", "Reed" }, Materials.Iridium, ItemList.Crop_Drop_Iridium.get(1), - new ItemStack[] {ItemList.Crop_Drop_Osmium.get(1)}); + new ItemStack[] { ItemList.Crop_Drop_Osmium.get(1) }); new GT_BaseCrop( 170, "Stargatium", @@ -915,10 +881,10 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Metal", "Heavy", "Alien", "Naquadah"}, + 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 ItemStack[] { ItemList.Crop_Drop_Naquadah.get(1) }); new GT_BaseCrop( 171, "Lemon", @@ -934,7 +900,7 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Food", "Yellow", "Sour"}, + new String[] { "Food", "Yellow", "Sour" }, ItemList.Crop_Drop_Lemon.get(1), null); new GT_BaseCrop( @@ -952,7 +918,7 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Food", "Red", "Spicy"}, + new String[] { "Food", "Red", "Spicy" }, ItemList.Crop_Drop_Chilly.get(1), null); new GT_BaseCrop( @@ -970,9 +936,9 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Food", "Red"}, + new String[] { "Food", "Red" }, ItemList.Crop_Drop_Tomato.get(1), - new ItemStack[] {ItemList.Crop_Drop_MTomato.get(1)}); + new ItemStack[] { ItemList.Crop_Drop_MTomato.get(1) }); new GT_BaseCrop( 174, "Grape", @@ -988,7 +954,7 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Food", "Purple"}, + new String[] { "Food", "Purple" }, ItemList.Crop_Drop_Grapes.get(1), null); new GT_BaseCrop( @@ -1006,7 +972,7 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Food", "Brown"}, + new String[] { "Food", "Brown" }, ItemList.Crop_Drop_Onion.get(1), null); new GT_BaseCrop( @@ -1024,7 +990,7 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Food", "Green"}, + new String[] { "Food", "Green" }, ItemList.Crop_Drop_Cucumber.get(1), null); new GT_BaseCrop( @@ -1042,7 +1008,7 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Food", "Green", "Ingredient"}, + new String[] { "Food", "Green", "Ingredient" }, ItemList.Crop_Drop_TeaLeaf.get(1), null); new GT_BaseCrop( @@ -1060,7 +1026,7 @@ public class GT_CropLoader implements Runnable { 0, 2, 0, - new String[] {"Food", "Yellow", "Oil"}, + new String[] { "Food", "Yellow", "Oil" }, ItemList.Crop_Drop_Rape.get(1), null); new GT_BaseCrop( @@ -1078,7 +1044,7 @@ public class GT_CropLoader implements Runnable { 3, 0, 0, - new String[] {"Metal", "Pine", "Mica", "Bush"}, + new String[] { "Metal", "Pine", "Mica", "Bush" }, Materials.Mica, ItemList.Crop_Drop_Mica.get(1L), null); diff --git a/src/main/java/gregtech/loaders/postload/GT_ExtremeDieselFuelLoader.java b/src/main/java/gregtech/loaders/postload/GT_ExtremeDieselFuelLoader.java index 52cd2cbd84..4f98363799 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ExtremeDieselFuelLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ExtremeDieselFuelLoader.java @@ -4,6 +4,7 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Recipe; public class GT_ExtremeDieselFuelLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Adding extreme diesel fuel."); diff --git a/src/main/java/gregtech/loaders/postload/GT_FakeRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_FakeRecipeLoader.java index 3e552cf0b2..5c97d4c8c8 100644 --- a/src/main/java/gregtech/loaders/postload/GT_FakeRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_FakeRecipeLoader.java @@ -5,6 +5,7 @@ import gregtech.api.enums.GT_Values; import gregtech.api.util.GT_ModHandler; public class GT_FakeRecipeLoader implements Runnable { + @Override public void run() { if (!GregTech_API.mIC2Classic) { diff --git a/src/main/java/gregtech/loaders/postload/GT_ItemMaxStacksizeLoader.java b/src/main/java/gregtech/loaders/postload/GT_ItemMaxStacksizeLoader.java index 30f2ca5650..655d1a06fd 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ItemMaxStacksizeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ItemMaxStacksizeLoader.java @@ -1,14 +1,16 @@ package gregtech.loaders.postload; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; + import gregtech.GT_Mod; import gregtech.api.enums.ItemList; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Log; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; public class GT_ItemMaxStacksizeLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Changing maximum Stacksizes if configured."); diff --git a/src/main/java/gregtech/loaders/postload/GT_MinableRegistrator.java b/src/main/java/gregtech/loaders/postload/GT_MinableRegistrator.java index c84f22ba04..afa98e0b38 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MinableRegistrator.java +++ b/src/main/java/gregtech/loaders/postload/GT_MinableRegistrator.java @@ -1,10 +1,12 @@ package gregtech.loaders.postload; +import net.minecraft.init.Blocks; + import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; -import net.minecraft.init.Blocks; public class GT_MinableRegistrator implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Adding Blocks to the Miners Valuable List."); diff --git a/src/main/java/gregtech/loaders/postload/GT_PCBFactoryMaterialLoader.java b/src/main/java/gregtech/loaders/postload/GT_PCBFactoryMaterialLoader.java index acec328324..95732076d9 100644 --- a/src/main/java/gregtech/loaders/postload/GT_PCBFactoryMaterialLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_PCBFactoryMaterialLoader.java @@ -5,6 +5,7 @@ import gregtech.api.enums.MaterialsKevlar; import gregtech.api.util.GT_PCBFactoryManager; public class GT_PCBFactoryMaterialLoader { + public static void load() { // add Plastics GT_PCBFactoryManager.addPlasticTier(Materials.Plastic, 1); diff --git a/src/main/java/gregtech/loaders/postload/GT_PostLoad.java b/src/main/java/gregtech/loaders/postload/GT_PostLoad.java index 585857c50a..7fc271128d 100644 --- a/src/main/java/gregtech/loaders/postload/GT_PostLoad.java +++ b/src/main/java/gregtech/loaders/postload/GT_PostLoad.java @@ -3,7 +3,26 @@ package gregtech.loaders.postload; import static gregtech.api.enums.GT_Values.MOD_ID_FR; import static gregtech.api.enums.GT_Values.VP; +import java.lang.reflect.InvocationTargetException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; + +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 com.google.common.base.Stopwatch; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ProgressManager; import cpw.mods.fml.relauncher.Side; @@ -27,67 +46,55 @@ 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 java.lang.reflect.InvocationTargetException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.stream.Collectors; -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() { @SuppressWarnings("UnstableApiUsage") // Stable enough for this project Stopwatch stopwatch = Stopwatch.createStarted(); 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()); + // 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()); } - public static void removeIc2Recipes( - Map<IRecipeInput, RecipeOutput> aMaceratorRecipeList, - Map<IRecipeInput, RecipeOutput> aCompressorRecipeList, - Map<IRecipeInput, RecipeOutput> aExtractorRecipeList, + 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)) - .findAny() - .ifPresent(e -> aCompressorRecipeList.remove(e.getKey())); + aCompressorRecipeList.entrySet().parallelStream().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( - 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 + 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."); } @@ -95,39 +102,47 @@ public class GT_PostLoad { 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}, + new ItemStack[] { iLData0 }, + new ItemStack[] { iSData0 }, null, - new FluidStack[] {Materials.Water.getFluid(250L)}, + 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); + 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}, + new ItemStack[] { tData.emptyContainer }, + new ItemStack[] { tData.filledContainer }, null, - new FluidStack[] {tData.fluid}, + 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)}, + new ItemStack[] { tData.filledContainer }, + new ItemStack[] { GT_Utility.getContainerItem(tData.filledContainer, true) }, null, null, - new FluidStack[] {tData.fluid}, + new FluidStack[] { tData.fluid }, tData.fluid.amount / 62, 1, 0); @@ -143,8 +158,8 @@ public class GT_PostLoad { 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")}, + new ItemStack[] { ItemList.IC2_Crop_Seeds.getWildcard(1L) }, + new ItemStack[] { ItemList.IC2_Crop_Seeds.getWithName(1L, "Scanned Seeds") }, null, null, null, @@ -154,8 +169,8 @@ public class GT_PostLoad { } 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")}, + 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, @@ -164,8 +179,8 @@ public class GT_PostLoad { 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")}, + 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, @@ -174,8 +189,8 @@ public class GT_PostLoad { 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")}, + 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, @@ -184,8 +199,8 @@ public class GT_PostLoad { 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")}, + 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, @@ -194,8 +209,8 @@ public class GT_PostLoad { 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")}, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Raw Prospection Data") }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Analyzed Prospection Data") }, null, null, null, @@ -203,29 +218,26 @@ public class GT_PostLoad { 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")}, + 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, @@ -236,11 +248,9 @@ public class GT_PostLoad { 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")}, + 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, @@ -251,16 +261,15 @@ public class GT_PostLoad { } } Materials.getMaterialsMap().values().forEach(tMaterial -> { - if ((tMaterial.mElement != null) - && (!tMaterial.mElement.mIsIsotope) + 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, @@ -277,14 +286,14 @@ public class GT_PostLoad { null, iSMat0, iSMat1, - new FluidStack[] {Materials.UUMatter.getFluid(tMaterial.getMass())}, + new FluidStack[] { Materials.UUMatter.getFluid(tMaterial.getMass()) }, null, (int) (tMaterial.getMass() * 512L), (int) VP[1], 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, @@ -301,7 +310,7 @@ public class GT_PostLoad { null, iSMat0, iSMat1, - new FluidStack[] {Materials.UUMatter.getFluid(tMaterial.getMass())}, + new FluidStack[] { Materials.UUMatter.getFluid(tMaterial.getMass()) }, null, (int) (tMaterial.getMass() * 512L), (int) VP[1], @@ -310,31 +319,30 @@ public class GT_PostLoad { } }); - 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); + 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)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1) }, null, null, - new FluidStack[] {Materials.UUAmplifier.getFluid(GT_MetaTileEntity_Massfabricator.sUUAperUUM)}, - new FluidStack[] {Materials.UUMatter.getFluid(1L)}, + 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)}, + new ItemStack[] { ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Side") }, + new ItemStack[] { new ItemStack(Blocks.cobblestone, 1) }, null, null, null, @@ -343,8 +351,8 @@ public class GT_PostLoad { 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)}, + new ItemStack[] { ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Top") }, + new ItemStack[] { new ItemStack(Blocks.stone, 1) }, null, null, null, @@ -353,11 +361,9 @@ public class GT_PostLoad { 0); GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe( false, - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), - GT_Utility.getIntegratedCircuit(1) - }, - new ItemStack[] {new ItemStack(Blocks.obsidian, 1)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_Utility.getIntegratedCircuit(1) }, + new ItemStack[] { new ItemStack(Blocks.obsidian, 1) }, null, null, null, @@ -405,15 +411,13 @@ 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()) + 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()); + ProgressManager.ProgressBar progressBar = ProgressManager + .push("Register materials", replaceVanillaItemsSet.size()); if (GT_Values.cls_enabled) { try { GT_CLS_Compat.doActualRegistrationCLS(progressBar, replaceVanillaItemsSet); @@ -427,9 +431,9 @@ public class GT_PostLoad { doActualRegistration(m); }); } - //noinspection deprecation// stable API for MC 1.7.10 + // noinspection deprecation// stable API for MC 1.7.10 ProgressManager.pop(progressBar); - //noinspection UnstableApiUsage// stable enough for project + // noinspection UnstableApiUsage// stable enough for project GT_Mod.GT_FML_LOGGER.info("Replaced Vanilla Materials (" + stopwatch.stop() + "). Have a Cake."); } @@ -443,6 +447,7 @@ public class GT_PostLoad { public static void createGTtoolsCreativeTab() { new CreativeTabs("GTtools") { + @SideOnly(Side.CLIENT) @Override public ItemStack getIconItemStack() { @@ -460,23 +465,28 @@ 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); @@ -510,24 +520,18 @@ 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)); } } public static void identifyAnySteam() { - final String[] steamCandidates = {"steam", "ic2steam"}; - final String[] superHeatedSteamCandidates = {"ic2superheatedsteam"}; + 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 b758ab2004..431b89c663 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java @@ -24,16 +24,16 @@ public class GT_ProcessingArrayRecipeLoader { // Canner GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.canner", GT_Recipe_Map.sCannerRecipes); // Centrifuge - GT_ProcessingArray_Manager.addRecipeMapToPA( - "basicmachine.centrifuge", GT_Recipe_Map.sMultiblockCentrifugeRecipes); + GT_ProcessingArray_Manager + .addRecipeMapToPA("basicmachine.centrifuge", GT_Recipe_Map.sMultiblockCentrifugeRecipes); // Chemical Bath GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.chemicalbath", GT_Recipe_Map.sChemicalBathRecipes); // Chemical Reactor - GT_ProcessingArray_Manager.addRecipeMapToPA( - "basicmachine.chemicalreactor", GT_Recipe_Map.sMultiblockChemicalRecipes); + GT_ProcessingArray_Manager + .addRecipeMapToPA("basicmachine.chemicalreactor", GT_Recipe_Map.sMultiblockChemicalRecipes); // Circuit Assembler - GT_ProcessingArray_Manager.addRecipeMapToPA( - "basicmachine.circuitassembler", GT_Recipe_Map.sCircuitAssemblerRecipes); + GT_ProcessingArray_Manager + .addRecipeMapToPA("basicmachine.circuitassembler", GT_Recipe_Map.sCircuitAssemblerRecipes); // Compressor GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.compressor", GT_Recipe_Map.sCompressorRecipes); // Cutting Machine @@ -41,8 +41,8 @@ public class GT_ProcessingArrayRecipeLoader { // Distillery GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.distillery", GT_Recipe_Map.sDistilleryRecipes); // Electrolyzer - GT_ProcessingArray_Manager.addRecipeMapToPA( - "basicmachine.electrolyzer", GT_Recipe_Map.sMultiblockElectrolyzerRecipes); + GT_ProcessingArray_Manager + .addRecipeMapToPA("basicmachine.electrolyzer", GT_Recipe_Map.sMultiblockElectrolyzerRecipes); // Extractor GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.extractor", GT_Recipe_Map.sExtractorRecipes); // Extruder @@ -52,13 +52,13 @@ public class GT_ProcessingArrayRecipeLoader { // Fluid Canner GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fluidcanner", GT_Recipe_Map.sFluidCannerRecipes); // Fluid Extractor - GT_ProcessingArray_Manager.addRecipeMapToPA( - "basicmachine.fluidextractor", GT_Recipe_Map.sFluidExtractionRecipes); + 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); + GT_ProcessingArray_Manager + .addRecipeMapToPA("basicmachine.fluidsolidifier", GT_Recipe_Map.sFluidSolidficationRecipes); // Forge Hammer GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.hammer", GT_Recipe_Map.sHammerRecipes); // Forming Press @@ -71,7 +71,8 @@ public class GT_ProcessingArrayRecipeLoader { GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.macerator", GT_Recipe_Map.sMaceratorRecipes); // Magnetic Separator GT_ProcessingArray_Manager.addRecipeMapToPA( - "basicmachine.electromagneticseparator", GT_Recipe_Map.sElectroMagneticSeparatorRecipes); + "basicmachine.electromagneticseparator", + GT_Recipe_Map.sElectroMagneticSeparatorRecipes); // Matter Amplifier GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.amplifab", GT_Recipe_Map.sAmplifiers); // Microwave @@ -81,8 +82,8 @@ public class GT_ProcessingArrayRecipeLoader { // 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); + GT_ProcessingArray_Manager + .addRecipeMapToPA("basicmachine.plasmaarcfurnace", GT_Recipe_Map.sPlasmaArcFurnaceRecipes); // Polarizer GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.polarizer", GT_Recipe_Map.sPolarizerRecipes); // Printer @@ -96,8 +97,8 @@ public class GT_ProcessingArrayRecipeLoader { // Slicer GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.slicer", GT_Recipe_Map.sSlicerRecipes); // Thermal Centrifuge - GT_ProcessingArray_Manager.addRecipeMapToPA( - "basicmachine.thermalcentrifuge", GT_Recipe_Map.sThermalCentrifugeRecipes); + GT_ProcessingArray_Manager + .addRecipeMapToPA("basicmachine.thermalcentrifuge", GT_Recipe_Map.sThermalCentrifugeRecipes); // Unboxinator GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.unboxinator", GT_Recipe_Map.sUnboxinatorRecipes); // Wiremill diff --git a/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java b/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java index 2a96ccbf25..7c72cf43f3 100644 --- a/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java @@ -1,15 +1,17 @@ package gregtech.loaders.postload; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.ItemList; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class GT_RecyclerBlacklistLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Adding Stuff to the Recycler Blacklist."); @@ -28,8 +30,8 @@ public class GT_RecyclerBlacklistLoader implements Runnable { 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)); @@ -39,44 +41,63 @@ public class GT_RecyclerBlacklistLoader implements Runnable { 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.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_ScrapboxDropLoader.java b/src/main/java/gregtech/loaders/postload/GT_ScrapboxDropLoader.java index 842cfd3a77..b4621df6b6 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ScrapboxDropLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ScrapboxDropLoader.java @@ -1,5 +1,9 @@ package gregtech.loaders.postload; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.GT_Mod; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -7,11 +11,9 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class GT_ScrapboxDropLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: (re-)adding Scrapbox Drops."); diff --git a/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java index fb8d530e72..bf2c2c4ebb 100644 --- a/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java @@ -1,6 +1,7 @@ package gregtech.loaders.postload; public class GT_UUMRecipeLoader implements Runnable { + @Override 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 0fc7552ba3..19d03c7f4c 100644 --- a/src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java +++ b/src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java @@ -1,5 +1,8 @@ package gregtech.loaders.postload; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.util.GT_Log; @@ -7,8 +10,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; public class GT_Worldgenloader implements Runnable { @@ -149,9 +150,31 @@ public class GT_Worldgenloader implements Runnable { false); new GT_Worldgen_Stone( - "overworld.stone.marble.tiny", true, GregTech_API.sBlockStones, 0, 0, 1, 75, 5, 0, 180, null, false); + "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); + "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, @@ -166,14 +189,58 @@ public class GT_Worldgenloader implements Runnable { null, false); new GT_Worldgen_Stone( - "overworld.stone.marble.large", true, GregTech_API.sBlockStones, 0, 0, 1, 300, 70, 0, 120, null, false); + "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); + "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); + "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); + "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, @@ -188,9 +255,31 @@ public class GT_Worldgenloader implements Runnable { null, false); new GT_Worldgen_Stone( - "overworld.stone.basalt.large", true, GregTech_API.sBlockStones, 8, 0, 1, 300, 70, 0, 120, null, false); + "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); + "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", @@ -325,58 +414,333 @@ public class GT_Worldgenloader implements Runnable { false); new GT_Worldgen_Stone( - "nether.stone.marble.tiny", false, GregTech_API.sBlockStones, 0, -1, 1, 50, 45, 0, 120, null, false); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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, @@ -391,25 +755,135 @@ public class GT_Worldgenloader implements Runnable { true, Materials.GreenSapphire); new GT_Worldgen_GT_Ore_SmallPieces( - "ore.small.olivine", true, 5, 35, 2, false, false, false, false, true, true, Materials.Olivine); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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, @@ -424,7 +898,18 @@ public class GT_Worldgenloader implements Runnable { true, Materials.GarnetYellow); new GT_Worldgen_GT_Ore_SmallPieces( - "ore.small.redstone", true, 5, 25, 8, true, true, false, true, true, true, Materials.Redstone); + "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, @@ -439,53 +924,227 @@ public class GT_Worldgenloader implements Runnable { false, Materials.NetherQuartz); new GT_Worldgen_GT_Ore_SmallPieces( - "ore.small.saltpeter", true, 10, 60, 8, false, true, false, false, false, false, Materials.Saltpeter); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "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); + "ore.small.deepiron", + true, + 5, + 40, + 8, + false, + false, + false, + Materials.DeepIron); // GT Default Veins @@ -971,9 +1630,8 @@ public class GT_Worldgenloader implements Runnable { 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. + * 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, diff --git a/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java b/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java index 12b8e5cf6a..9b20da4727 100644 --- a/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java +++ b/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java @@ -1,5 +1,12 @@ package gregtech.loaders.postload; +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 appeng.api.networking.IGridNode; import appeng.api.networking.ticking.IGridTickable; import appeng.api.networking.ticking.TickRateModulation; @@ -9,13 +16,9 @@ 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; public class PartP2PGTPower extends PartP2PIC2Power implements IGridTickable { + public PartP2PGTPower(ItemStack is) { super(is); } @@ -67,9 +70,7 @@ public class PartP2PGTPower extends PartP2PIC2Power implements IGridTickable { if (voltage > getOfferedEnergy()) { voltage = (long) getOfferedEnergy(); } - if (((IEnergyConnected) t) - .injectEnergyUnits( - GT_Utility.getOppositeSide(getSide().ordinal()), voltage, 1) + if (((IEnergyConnected) t).injectEnergyUnits(GT_Utility.getOppositeSide(getSide().ordinal()), voltage, 1) > 0) { drawEnergy(voltage); return true; diff --git a/src/main/java/gregtech/loaders/postload/chains/GT_BauxiteRefineChain.java b/src/main/java/gregtech/loaders/postload/chains/GT_BauxiteRefineChain.java index 7dcfbee97f..fec3a30ad1 100644 --- a/src/main/java/gregtech/loaders/postload/chains/GT_BauxiteRefineChain.java +++ b/src/main/java/gregtech/loaders/postload/chains/GT_BauxiteRefineChain.java @@ -1,11 +1,12 @@ package gregtech.loaders.postload.chains; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; public class GT_BauxiteRefineChain { @@ -42,22 +43,13 @@ public class GT_BauxiteRefineChain { 400); GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] { - Materials.Aluminiumhydroxide.getDust(1), - }, - new FluidStack[] { - Materials.CarbonDioxide.getGas(5000), MaterialsOreAlum.HeatedBauxiteSlurry.getFluid(8000) - }, - new FluidStack[] { - MaterialsOreAlum.SluiceJuice.getFluid(5000), - }, - new ItemStack[] { - Materials.Aluminiumoxide.getDust(64), - Materials.Aluminiumoxide.getDust(16), - Materials.SodiumCarbonate.getDust(9), - Materials.Calcite.getDust(10), - MaterialsOreAlum.BauxiteSlag.getDust(16) - }, + new ItemStack[] { Materials.Aluminiumhydroxide.getDust(1), }, + new FluidStack[] { Materials.CarbonDioxide.getGas(5000), + MaterialsOreAlum.HeatedBauxiteSlurry.getFluid(8000) }, + new FluidStack[] { MaterialsOreAlum.SluiceJuice.getFluid(5000), }, + new ItemStack[] { Materials.Aluminiumoxide.getDust(64), Materials.Aluminiumoxide.getDust(16), + Materials.SodiumCarbonate.getDust(9), Materials.Calcite.getDust(10), + MaterialsOreAlum.BauxiteSlag.getDust(16) }, 300, 480); @@ -72,7 +64,7 @@ public class GT_BauxiteRefineChain { Materials.SiliconDioxide.getDust(1), Materials.Iron.getDust(1), GT_Values.NI, - new int[] {8000, 6000, 2000, 9000, 8000}, + new int[] { 8000, 6000, 2000, 9000, 8000 }, 40, 120); @@ -83,7 +75,7 @@ public class GT_BauxiteRefineChain { Materials.Rutile.getDust(1), MaterialsOreAlum.IlmeniteSlag.getDust(1), GT_Values.NI, - new int[] {8500, 3000}, + new int[] { 8500, 3000 }, 420, 1000); @@ -94,7 +86,7 @@ public class GT_BauxiteRefineChain { Materials.Rutile.getDust(1), MaterialsOreAlum.IlmeniteSlag.getDust(1), GT_Values.NI, - new int[] {8500, 6000}, + new int[] { 8500, 6000 }, 420, 1000); @@ -109,13 +101,12 @@ public class GT_BauxiteRefineChain { Materials.Manganese.getDust(1), Materials.Magnesium.getDust(1), GT_Values.NI, - new int[] {8000, 1000, 2000, 5000, 6000}, + new int[] { 8000, 1000, 2000, 5000, 6000 }, 40, 120); - OrePrefixes[] washable = new OrePrefixes[] { - OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.dustImpure, OrePrefixes.dustPure - }; + OrePrefixes[] washable = new OrePrefixes[] { OrePrefixes.crushed, OrePrefixes.crushedPurified, + OrePrefixes.dustImpure, OrePrefixes.dustPure }; for (OrePrefixes ore : washable) { GT_Values.RA.addMixerRecipe( @@ -163,7 +154,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Magnesium, 1), null, null, - new int[] {10000, 2000, 2000, 2000}, + new int[] { 10000, 2000, 2000, 2000 }, 45, 100); @@ -178,7 +169,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Manganese, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Beryllium, 1), null, - new int[] {10000, 2000, 2000, 2000, 2000}, + new int[] { 10000, 2000, 2000, 2000, 2000 }, 45, 100); @@ -193,7 +184,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Vanadium, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Magnesium, 1), null, - new int[] {10000, 10000, 2000, 2000, 2000}, + new int[] { 10000, 10000, 2000, 2000, 2000 }, 45, 100); @@ -208,7 +199,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Calcite, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Vanadium, 1), - new int[] {5000, 4000, 2000, 2000, 2000, 2000}, + new int[] { 5000, 4000, 2000, 2000, 2000, 2000 }, 45, 120); @@ -223,7 +214,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Chrome, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Calcite, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Vanadium, 1), - new int[] {5000, 4000, 2000, 2000, 2000, 2000}, + new int[] { 5000, 4000, 2000, 2000, 2000, 2000 }, 45, 120); @@ -238,7 +229,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Calcite, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Magnesium, 1), - new int[] {5000, 4000, 2000, 2000, 2000, 2000}, + new int[] { 5000, 4000, 2000, 2000, 2000, 2000 }, 45, 120); @@ -253,7 +244,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gold, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Aluminiumoxide, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Vanadium, 1), - new int[] {5000, 4000, 2000, 2000, 2000, 2000}, + new int[] { 5000, 4000, 2000, 2000, 2000, 2000 }, 45, 120); @@ -268,7 +259,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Aluminiumoxide, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Manganese, 1), - new int[] {5000, 1000, 2000, 2000, 2000, 2000}, + new int[] { 5000, 1000, 2000, 2000, 2000, 2000 }, 45, 120); @@ -283,7 +274,7 @@ public class GT_BauxiteRefineChain { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Calcite, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Vanadium, 1), - new int[] {5000, 4000, 2000, 2000, 2000, 2000}, + new int[] { 5000, 4000, 2000, 2000, 2000, 2000 }, 45, 120); } diff --git a/src/main/java/gregtech/loaders/postload/chains/GT_NaniteChain.java b/src/main/java/gregtech/loaders/postload/chains/GT_NaniteChain.java index 3047938783..3f0f913dc4 100644 --- a/src/main/java/gregtech/loaders/postload/chains/GT_NaniteChain.java +++ b/src/main/java/gregtech/loaders/postload/chains/GT_NaniteChain.java @@ -4,15 +4,16 @@ import static gregtech.api.enums.GT_Values.MOD_ID_DC; import static gregtech.api.enums.GT_Values.MOD_ID_GTPP; import static gregtech.api.util.GT_ModHandler.getModItem; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class GT_NaniteChain { @@ -32,20 +33,13 @@ public class GT_NaniteChain { GT_Values.RA.addAssemblylineRecipe( Materials.Carbon.getNanite(1), 3600 * 20, - new Object[] { - ItemList.Hull_UV.get(16), - Materials.Carbon.getNanite(16), - ItemList.Field_Generator_ZPM.get(16), - ItemList.Conveyor_Module_UV.get(16), - ItemList.Electric_Motor_UV.get(32), - new Object[] {OrePrefixes.circuit.get(Materials.Master), 16}, - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 32) - }, - new FluidStack[] { - new FluidStack(solderIndalloy, 144 * 32), - Materials.HSSS.getMolten(144L * 32), - Materials.Osmiridium.getMolten(144L * 16) - }, + new Object[] { ItemList.Hull_UV.get(16), Materials.Carbon.getNanite(16), + ItemList.Field_Generator_ZPM.get(16), ItemList.Conveyor_Module_UV.get(16), + ItemList.Electric_Motor_UV.get(32), + new Object[] { OrePrefixes.circuit.get(Materials.Master), 16 }, + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 32) }, + new FluidStack[] { new FluidStack(solderIndalloy, 144 * 32), Materials.HSSS.getMolten(144L * 32), + Materials.Osmiridium.getMolten(144L * 16) }, ItemList.NanoForge.get(1), 2400 * 20, (int) GT_Values.VP[7]); @@ -53,38 +47,29 @@ public class GT_NaniteChain { GT_Values.RA.addAssemblylineRecipe( ItemList.Circuit_Crystalmainframe.get(1), 144000, - new Object[] { - new Object[] {OrePrefixes.circuit.get(Materials.SuperconductorUHV), 16}, - ItemList.Robot_Arm_UV.get(16), - ItemList.Circuit_Chip_Stemcell.get(32), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NaquadahAlloy, 32), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NaquadahAlloy, 16), - Materials.Carbon.getDust(64) - }, - new FluidStack[] {Materials.UUMatter.getFluid(10000), new FluidStack(solderIndalloy, 144 * 32)}, + new Object[] { new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 16 }, + ItemList.Robot_Arm_UV.get(16), ItemList.Circuit_Chip_Stemcell.get(32), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NaquadahAlloy, 32), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NaquadahAlloy, 16), + Materials.Carbon.getDust(64) }, + new FluidStack[] { Materials.UUMatter.getFluid(10000), new FluidStack(solderIndalloy, 144 * 32) }, Materials.Carbon.getNanite(2), 50 * 20, (int) GT_Values.VP[8]); /* - * General Rules for making nanite recipes: - * 1. Never make a nanite that takes a long time to make and only gives 1, just to be consumed. - * 2. Nanites meant to be consumed should either have a short duration or a big output. - * 3. Nanites which aren't consumed should have a long duration and output less than 16. - * 4. Nanites should always take UUM as a fluid and a lot of power to make. + * General Rules for making nanite recipes: 1. Never make a nanite that takes a long time to make and only gives + * 1, just to be consumed. 2. Nanites meant to be consumed should either have a short duration or a big output. + * 3. Nanites which aren't consumed should have a long duration and output less than 16. 4. Nanites should + * always take UUM as a fluid and a lot of power to make. */ // Carbon Nanites - Used to make more Nano Forge Controllers GT_Values.RA.addNanoForgeRecipe( - new ItemStack[] { - aUVTierLens, - getModItem("bartworks", "bw.werkstoffblockscasingadvanced.01", 8, 31776), - ItemList.Circuit_Chip_SoC.get(64) - }, - new FluidStack[] {Materials.UUMatter.getFluid(200_000)}, - new ItemStack[] { - Materials.Carbon.getNanite(64), - }, + new ItemStack[] { aUVTierLens, getModItem("bartworks", "bw.werkstoffblockscasingadvanced.01", 8, 31776), + ItemList.Circuit_Chip_SoC.get(64) }, + new FluidStack[] { Materials.UUMatter.getFluid(200_000) }, + new ItemStack[] { Materials.Carbon.getNanite(64), }, null, null, 500 * 20, @@ -93,9 +78,9 @@ public class GT_NaniteChain { // Silver Nanites - Used in Tier 2 PCB Factory to improve board production GT_Values.RA.addNanoForgeRecipe( - new ItemStack[] {aUEVTierLens, Materials.Silver.getBlocks(8), ItemList.Circuit_Chip_SoC.get(16)}, - new FluidStack[] {Materials.UUMatter.getFluid(200000)}, - new ItemStack[] {Materials.Silver.getNanite(1)}, + new ItemStack[] { aUEVTierLens, Materials.Silver.getBlocks(8), ItemList.Circuit_Chip_SoC.get(16) }, + new FluidStack[] { Materials.UUMatter.getFluid(200000) }, + new ItemStack[] { Materials.Silver.getNanite(1) }, null, null, 750 * 20, @@ -104,14 +89,10 @@ public class GT_NaniteChain { // Neutronium Nanites - Used to upgrade the Nano Forge to Tier 2 GT_Values.RA.addNanoForgeRecipe( - new ItemStack[] { - aUHVTierLens, - Materials.Neutronium.getBlocks(8), - ItemList.Circuit_Chip_SoC2.get(64), - ItemList.Circuit_Chip_SoC2.get(32) - }, - new FluidStack[] {Materials.UUMatter.getFluid(200000)}, - new ItemStack[] {Materials.Neutronium.getNanite(1)}, + new ItemStack[] { aUHVTierLens, Materials.Neutronium.getBlocks(8), ItemList.Circuit_Chip_SoC2.get(64), + ItemList.Circuit_Chip_SoC2.get(32) }, + new FluidStack[] { Materials.UUMatter.getFluid(200000) }, + new ItemStack[] { Materials.Neutronium.getNanite(1) }, null, null, 100 * 20, @@ -120,17 +101,16 @@ public class GT_NaniteChain { // Glowstone Nanites - Used in the optical circuit line GT_Values.RA.addNanoForgeRecipe( - new ItemStack[] { - aUEVTierLens, - getModItem( - MOD_ID_GTPP, - "blockCompressedObsidian", - 8, - 7), // Double compressed glowstone blocks (yes, it's not obsidian) - ItemList.Circuit_Chip_SoC2.get(64) - }, - new FluidStack[] {Materials.UUMatter.getFluid(50000)}, - new ItemStack[] {Materials.Glowstone.getNanite(64)}, + new ItemStack[] { aUEVTierLens, getModItem(MOD_ID_GTPP, "blockCompressedObsidian", 8, 7), // Double + // compressed + // glowstone + // blocks + // (yes, it's + // not + // obsidian) + ItemList.Circuit_Chip_SoC2.get(64) }, + new FluidStack[] { Materials.UUMatter.getFluid(50000) }, + new ItemStack[] { Materials.Glowstone.getNanite(64) }, null, null, 200 * 20, @@ -139,9 +119,9 @@ public class GT_NaniteChain { // Gold Nanites - Used in Tier 3 PCB Factory to improve board production GT_Values.RA.addNanoForgeRecipe( - new ItemStack[] {aUMVTierLens, Materials.Gold.getBlocks(8), ItemList.Circuit_Chip_SoC.get(16)}, - new FluidStack[] {Materials.UUMatter.getFluid(300000)}, - new ItemStack[] {Materials.Gold.getNanite(1)}, + new ItemStack[] { aUMVTierLens, Materials.Gold.getBlocks(8), ItemList.Circuit_Chip_SoC.get(16) }, + new FluidStack[] { Materials.UUMatter.getFluid(300000) }, + new ItemStack[] { Materials.Gold.getNanite(1) }, null, null, 1_000 * 20, @@ -150,15 +130,11 @@ public class GT_NaniteChain { // Transcendent Metal Nanites - Used to upgrade the Nano Forge to Tier 3 GT_Values.RA.addNanoForgeRecipe( - new ItemStack[] { - aUIVTierLens, - Materials.TranscendentMetal.getBlocks(8), - ItemList.Circuit_Chip_SoC2.get(64), - ItemList.Circuit_Chip_SoC2.get(64), - ItemList.Circuit_Chip_SoC2.get(64) - }, - new FluidStack[] {Materials.UUMatter.getFluid(2000000)}, - new ItemStack[] {Materials.TranscendentMetal.getNanite(1)}, + new ItemStack[] { aUIVTierLens, Materials.TranscendentMetal.getBlocks(8), + ItemList.Circuit_Chip_SoC2.get(64), ItemList.Circuit_Chip_SoC2.get(64), + ItemList.Circuit_Chip_SoC2.get(64) }, + new FluidStack[] { Materials.UUMatter.getFluid(2000000) }, + new ItemStack[] { Materials.TranscendentMetal.getNanite(1) }, null, null, 750 * 20, @@ -167,24 +143,16 @@ public class GT_NaniteChain { // White Dwarf Matter Nanites. Used to make Magnetohydrodynamically constrained star matter. GT_Values.RA.addNanoForgeRecipe( - new ItemStack[] { - aUMVTierLens, - getModItem("bartworks", "gt.bwMetaGeneratedlens", 0, 36), // Magneto lens - getModItem( - MOD_ID_GTPP, - "MU-metaitem.01", - 0, - 32105), // Quantum Anomaly, couldn't find any better naming - Materials.WhiteDwarfMatter.getBlocks(8), - getModItem(MOD_ID_DC, "item.PicoWafer", 32), - getModItem("GoodGenerator", "huiCircuit", 1, 4) // Paradox circuit + new ItemStack[] { aUMVTierLens, getModItem("bartworks", "gt.bwMetaGeneratedlens", 0, 36), // Magneto + // lens + getModItem(MOD_ID_GTPP, "MU-metaitem.01", 0, 32105), // Quantum Anomaly, couldn't find any + // better naming + Materials.WhiteDwarfMatter.getBlocks(8), getModItem(MOD_ID_DC, "item.PicoWafer", 32), + getModItem("GoodGenerator", "huiCircuit", 1, 4) // Paradox circuit }, - new FluidStack[] { - Materials.UUMatter.getFluid(500_000), - Materials.RawStarMatter.getFluid(50_000), - FluidRegistry.getFluidStack("space", 720), - }, - new ItemStack[] {Materials.WhiteDwarfMatter.getNanite(4)}, + new FluidStack[] { Materials.UUMatter.getFluid(500_000), Materials.RawStarMatter.getFluid(50_000), + FluidRegistry.getFluidStack("space", 720), }, + new ItemStack[] { Materials.WhiteDwarfMatter.getNanite(4) }, null, null, 750 * 20, @@ -193,24 +161,16 @@ public class GT_NaniteChain { // Black Dwarf Matter Nanites. Used to make Magnetohydrodynamically constrained star matter. GT_Values.RA.addNanoForgeRecipe( - new ItemStack[] { - aUMVTierLens, - getModItem("bartworks", "gt.bwMetaGeneratedlens", 0, 36), // Magneto lens - getModItem( - MOD_ID_GTPP, - "MU-metaitem.01", - 0, - 32105), // Quantum Anomaly, couldn't find any better naming - Materials.BlackDwarfMatter.getBlocks(8), - getModItem(MOD_ID_DC, "item.PicoWafer", 32), - getModItem("GoodGenerator", "huiCircuit", 1, 4) // Paradox circuit - }, - new FluidStack[] { - Materials.UUMatter.getFluid(500_000), - Materials.RawStarMatter.getFluid(50_000), - FluidRegistry.getFluidStack("time", 720), + new ItemStack[] { aUMVTierLens, getModItem("bartworks", "gt.bwMetaGeneratedlens", 0, 36), // Magneto + // lens + getModItem(MOD_ID_GTPP, "MU-metaitem.01", 0, 32105), // Quantum Anomaly, couldn't find any + // better naming + Materials.BlackDwarfMatter.getBlocks(8), getModItem(MOD_ID_DC, "item.PicoWafer", 32), + getModItem("GoodGenerator", "huiCircuit", 1, 4) // Paradox circuit }, - new ItemStack[] {Materials.BlackDwarfMatter.getNanite(4)}, + new FluidStack[] { Materials.UUMatter.getFluid(500_000), Materials.RawStarMatter.getFluid(50_000), + FluidRegistry.getFluidStack("time", 720), }, + new ItemStack[] { Materials.BlackDwarfMatter.getNanite(4) }, null, null, 750 * 20, diff --git a/src/main/java/gregtech/loaders/postload/chains/GT_PCBFactoryRecipes.java b/src/main/java/gregtech/loaders/postload/chains/GT_PCBFactoryRecipes.java index 6f258610b1..38406215ec 100644 --- a/src/main/java/gregtech/loaders/postload/chains/GT_PCBFactoryRecipes.java +++ b/src/main/java/gregtech/loaders/postload/chains/GT_PCBFactoryRecipes.java @@ -2,6 +2,14 @@ package gregtech.loaders.postload.chains; import static gregtech.api.enums.GT_Values.MOD_ID_GTPP; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -11,12 +19,6 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_PCBFactoryManager; import gregtech.api.util.GT_Utility; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; @SuppressWarnings("SpellCheckingInspection") public class GT_PCBFactoryRecipes { @@ -35,49 +37,38 @@ public class GT_PCBFactoryRecipes { GT_Values.RA.addAssemblylineRecipe( ItemList.Circuit_Board_Wetware.get(1), 3600, - new Object[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 32), - ItemList.Machine_ZPM_CircuitAssembler.get(4), - new Object[] {OrePrefixes.circuit.get(Materials.Master), 16}, - ItemList.Robot_Arm_ZPM.get(8) - }, - new FluidStack[] {new FluidStack(solderLuV, 144 * 36), Materials.Naquadah.getMolten(144 * 18)}, + new Object[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 32), + ItemList.Machine_ZPM_CircuitAssembler.get(4), + new Object[] { OrePrefixes.circuit.get(Materials.Master), 16 }, ItemList.Robot_Arm_ZPM.get(8) }, + new FluidStack[] { new FluidStack(solderLuV, 144 * 36), Materials.Naquadah.getMolten(144 * 18) }, ItemList.PCBFactory.get(1), 6000 * 20, (int) GT_Values.VP[8]); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1), - Materials.get("Artherium-Sn").getPlates(6) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1), + Materials.get("Artherium-Sn").getPlates(6) }, null, ItemList.BasicPhotolithographicFrameworkCasing.get(1), 30 * 20, (int) GT_Values.VP[7]); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 1), - Materials.EnrichedHolmium.getPlates(6) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 1), + Materials.EnrichedHolmium.getPlates(6) }, null, ItemList.ReinforcedPhotolithographicFrameworkCasing.get(1), 30 * 20, (int) GT_Values.VP[9]); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_ModHandler.getModItem(MOD_ID_GTPP, "blockFrameGtCelestialTungsten", 1), - Materials.get("Quantum").getPlates(6) - }, + new ItemStack[] { GT_ModHandler.getModItem(MOD_ID_GTPP, "blockFrameGtCelestialTungsten", 1), + Materials.get("Quantum").getPlates(6) }, null, ItemList.RadiationProofPhotolithographicFrameworkCasing.get(1), 30 * 20, (int) GT_Values.VP[11]); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_ModHandler.getModItem(MOD_ID_GTPP, "blockFrameGtHypogen", 1), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Infinity, 2), - Materials.Thulium.getPlates(6) - }, + new ItemStack[] { GT_ModHandler.getModItem(MOD_ID_GTPP, "blockFrameGtHypogen", 1), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Infinity, 2), + Materials.Thulium.getPlates(6) }, Materials.SpaceTime.getMolten(144 * 8), ItemList.InfinityCooledCasing.get(1), 10 * 20, @@ -95,17 +86,14 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Plastic_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(1), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.AnnealedCopper, (long) (16 * (Math.sqrt(tier)))), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, (long) (16 * (Math.sqrt(tier)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier)))), - Materials.IronIIIChloride.getFluid((long) (250 * (Math.sqrt(tier)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.AnnealedCopper, (long) (16 * (Math.sqrt(tier)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Copper, (long) (16 * (Math.sqrt(tier)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier)))), + Materials.IronIIIChloride.getFluid((long) (250 * (Math.sqrt(tier)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(600 / Math.sqrt(Math.pow(1.5, tier - 1.5))), (int) GT_Values.VP[tier] * 3 / 4, @@ -120,18 +108,15 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Plastic_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(2), - GT_Utility.getNaniteAsCatalyst(Materials.Silver), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.AnnealedCopper, (long) (16 * (Math.sqrt(tier)))), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, (long) (16 * (Math.sqrt(tier)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier)))), - Materials.IronIIIChloride.getFluid((long) (250 * (Math.sqrt(tier)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2), + GT_Utility.getNaniteAsCatalyst(Materials.Silver), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.AnnealedCopper, (long) (16 * (Math.sqrt(tier)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Copper, (long) (16 * (Math.sqrt(tier)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier)))), + Materials.IronIIIChloride.getFluid((long) (250 * (Math.sqrt(tier)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(500 / Math.sqrt(Math.pow(1.5, tier - 1.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -146,18 +131,15 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Plastic_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(3), - GT_Utility.getNaniteAsCatalyst(Materials.Gold), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.AnnealedCopper, (long) (16 * (Math.sqrt(tier)))), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, (long) (16 * (Math.sqrt(tier)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier)))), - Materials.IronIIIChloride.getFluid((long) (250 * (Math.sqrt(tier)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(3), + GT_Utility.getNaniteAsCatalyst(Materials.Gold), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.AnnealedCopper, (long) (16 * (Math.sqrt(tier)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Copper, (long) (16 * (Math.sqrt(tier)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier)))), + Materials.IronIIIChloride.getFluid((long) (250 * (Math.sqrt(tier)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(400 / Math.sqrt(Math.pow(1.5, tier - 1.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -174,17 +156,14 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Epoxy_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(1), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, (long) (16 * (Math.sqrt(tier - 1)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Electrum, (long) (16 * (Math.sqrt(tier - 1)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 1)))), - Materials.IronIIIChloride.getFluid((long) (500 * (Math.sqrt(tier - 1)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Gold, (long) (16 * (Math.sqrt(tier - 1)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Electrum, (long) (16 * (Math.sqrt(tier - 1)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 1)))), + Materials.IronIIIChloride.getFluid((long) (500 * (Math.sqrt(tier - 1)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(600 / Math.sqrt(Math.pow(1.5, tier - 2.5))), (int) GT_Values.VP[tier] * 3 / 4, @@ -199,18 +178,15 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Epoxy_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(2), - GT_Utility.getNaniteAsCatalyst(Materials.Silver), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, (long) (16 * (Math.sqrt(tier - 1)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Electrum, (long) (16 * (Math.sqrt(tier - 1)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 1)))), - Materials.IronIIIChloride.getFluid((long) (500 * (Math.sqrt(tier - 1)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2), + GT_Utility.getNaniteAsCatalyst(Materials.Silver), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Gold, (long) (16 * (Math.sqrt(tier - 1)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Electrum, (long) (16 * (Math.sqrt(tier - 1)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 1)))), + Materials.IronIIIChloride.getFluid((long) (500 * (Math.sqrt(tier - 1)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(500 / Math.sqrt(Math.pow(1.5, tier - 2.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -225,18 +201,15 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Epoxy_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(3), - GT_Utility.getNaniteAsCatalyst(Materials.Gold), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, (long) (16 * (Math.sqrt(tier - 1)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Electrum, (long) (16 * (Math.sqrt(tier - 1)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 1)))), - Materials.IronIIIChloride.getFluid((long) (500 * (Math.sqrt(tier - 1)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(3), + GT_Utility.getNaniteAsCatalyst(Materials.Gold), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Gold, (long) (16 * (Math.sqrt(tier - 1)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Electrum, (long) (16 * (Math.sqrt(tier - 1)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 1)))), + Materials.IronIIIChloride.getFluid((long) (500 * (Math.sqrt(tier - 1)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(400 / Math.sqrt(Math.pow(1.5, tier - 2.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -253,18 +226,16 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Fiberglass_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(1), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Aluminium, (long) (16 * (Math.sqrt(tier - 2)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.EnergeticAlloy, (long) (16 * (Math.sqrt(tier - 2)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 2)))), - Materials.IronIIIChloride.getFluid((long) (1000 * (Math.sqrt(tier - 2)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Aluminium, (long) (16 * (Math.sqrt(tier - 2)))), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.EnergeticAlloy, + (long) (16 * (Math.sqrt(tier - 2)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 2)))), + Materials.IronIIIChloride.getFluid((long) (1000 * (Math.sqrt(tier - 2)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(600 / Math.sqrt(Math.pow(1.5, tier - 3.5))), (int) GT_Values.VP[tier] * 3 / 4, @@ -279,19 +250,17 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Fiberglass_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(2), - GT_Utility.getNaniteAsCatalyst(Materials.Silver), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Aluminium, (long) (16 * (Math.sqrt(tier - 2)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.EnergeticAlloy, (long) (16 * (Math.sqrt(tier - 2)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 2)))), - Materials.IronIIIChloride.getFluid((long) (1000 * (Math.sqrt(tier - 2)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2), + GT_Utility.getNaniteAsCatalyst(Materials.Silver), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Aluminium, (long) (16 * (Math.sqrt(tier - 2)))), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.EnergeticAlloy, + (long) (16 * (Math.sqrt(tier - 2)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 2)))), + Materials.IronIIIChloride.getFluid((long) (1000 * (Math.sqrt(tier - 2)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(500 / Math.sqrt(Math.pow(1.5, tier - 3.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -306,19 +275,17 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Fiberglass_Advanced.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(3), - GT_Utility.getNaniteAsCatalyst(Materials.Gold), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Aluminium, (long) (16 * (Math.sqrt(tier - 2)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.EnergeticAlloy, (long) (16 * (Math.sqrt(tier - 2)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 2)))), - Materials.IronIIIChloride.getFluid((long) (1000 * (Math.sqrt(tier - 2)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(3), + GT_Utility.getNaniteAsCatalyst(Materials.Gold), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Aluminium, (long) (16 * (Math.sqrt(tier - 2)))), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.EnergeticAlloy, + (long) (16 * (Math.sqrt(tier - 2)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 2)))), + Materials.IronIIIChloride.getFluid((long) (1000 * (Math.sqrt(tier - 2)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(400 / Math.sqrt(Math.pow(1.5, tier - 3.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -335,18 +302,14 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Multifiberglass_Elite.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(1), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Palladium, (long) (16 * (Math.sqrt(tier - 3)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Platinum, (long) (16 * (Math.sqrt(tier - 3)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 3)))), - Materials.IronIIIChloride.getFluid((long) (2000 * (Math.sqrt(tier - 3)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Palladium, (long) (16 * (Math.sqrt(tier - 3)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Platinum, (long) (16 * (Math.sqrt(tier - 3)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 3)))), + Materials.IronIIIChloride.getFluid((long) (2000 * (Math.sqrt(tier - 3)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(600 / Math.sqrt(Math.pow(1.5, tier - 4.5))), (int) GT_Values.VP[tier] * 3 / 4, @@ -361,19 +324,15 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Multifiberglass_Elite.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(2), - GT_Utility.getNaniteAsCatalyst(Materials.Silver), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Palladium, (long) (16 * (Math.sqrt(tier - 3)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Platinum, (long) (16 * (Math.sqrt(tier - 3)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 3)))), - Materials.IronIIIChloride.getFluid((long) (2000 * (Math.sqrt(tier - 3)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2), + GT_Utility.getNaniteAsCatalyst(Materials.Silver), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Palladium, (long) (16 * (Math.sqrt(tier - 3)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Platinum, (long) (16 * (Math.sqrt(tier - 3)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 3)))), + Materials.IronIIIChloride.getFluid((long) (2000 * (Math.sqrt(tier - 3)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(500 / Math.sqrt(Math.pow(1.5, tier - 4.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -388,19 +347,15 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Multifiberglass_Elite.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(3), - GT_Utility.getNaniteAsCatalyst(Materials.Gold), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Palladium, (long) (16 * (Math.sqrt(tier - 3)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Platinum, (long) (16 * (Math.sqrt(tier - 3)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 3)))), - Materials.IronIIIChloride.getFluid((long) (2000 * (Math.sqrt(tier - 3)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(3), + GT_Utility.getNaniteAsCatalyst(Materials.Gold), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Palladium, (long) (16 * (Math.sqrt(tier - 3)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Platinum, (long) (16 * (Math.sqrt(tier - 3)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 3)))), + Materials.IronIIIChloride.getFluid((long) (2000 * (Math.sqrt(tier - 3)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(400 / Math.sqrt(Math.pow(1.5, tier - 4.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -417,19 +372,19 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Wetware_Extreme.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(1), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.EnrichedHolmium, (long) (16 * (Math.sqrt(tier - 4)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.NiobiumTitanium, (long) (16 * (Math.sqrt(tier - 4)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 4)))), - Materials.IronIIIChloride.getFluid((long) (5000 * (Math.sqrt(tier - 4)))), - Materials.GrowthMediumSterilized.getFluid((long) (2000 * (Math.sqrt(tier - 4)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.EnrichedHolmium, + (long) (16 * (Math.sqrt(tier - 4)))), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.NiobiumTitanium, + (long) (16 * (Math.sqrt(tier - 4)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 4)))), + Materials.IronIIIChloride.getFluid((long) (5000 * (Math.sqrt(tier - 4)))), + Materials.GrowthMediumSterilized.getFluid((long) (2000 * (Math.sqrt(tier - 4)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(600 / Math.sqrt(Math.pow(1.5, tier - 5.5))), (int) GT_Values.VP[tier] * 3 / 4, @@ -444,20 +399,20 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Wetware_Extreme.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(2), - GT_Utility.getNaniteAsCatalyst(Materials.Silver), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.EnrichedHolmium, (long) (16 * (Math.sqrt(tier - 4)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.NiobiumTitanium, (long) (16 * (Math.sqrt(tier - 4)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 4)))), - Materials.IronIIIChloride.getFluid((long) (5000 * (Math.sqrt(tier - 4)))), - Materials.GrowthMediumSterilized.getFluid((long) (2000 * (Math.sqrt(tier - 4)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2), + GT_Utility.getNaniteAsCatalyst(Materials.Silver), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.EnrichedHolmium, + (long) (16 * (Math.sqrt(tier - 4)))), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.NiobiumTitanium, + (long) (16 * (Math.sqrt(tier - 4)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 4)))), + Materials.IronIIIChloride.getFluid((long) (5000 * (Math.sqrt(tier - 4)))), + Materials.GrowthMediumSterilized.getFluid((long) (2000 * (Math.sqrt(tier - 4)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(500 / Math.sqrt(Math.pow(1.5, tier - 5.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -472,20 +427,20 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Wetware_Extreme.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(3), - GT_Utility.getNaniteAsCatalyst(Materials.Gold), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.EnrichedHolmium, (long) (16 * (Math.sqrt(tier - 4)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.NiobiumTitanium, (long) (16 * (Math.sqrt(tier - 4)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 4)))), - Materials.IronIIIChloride.getFluid((long) (5000 * (Math.sqrt(tier - 4)))), - Materials.GrowthMediumSterilized.getFluid((long) (2000 * (Math.sqrt(tier - 4)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(3), + GT_Utility.getNaniteAsCatalyst(Materials.Gold), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.EnrichedHolmium, + (long) (16 * (Math.sqrt(tier - 4)))), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.NiobiumTitanium, + (long) (16 * (Math.sqrt(tier - 4)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 4)))), + Materials.IronIIIChloride.getFluid((long) (5000 * (Math.sqrt(tier - 4)))), + Materials.GrowthMediumSterilized.getFluid((long) (2000 * (Math.sqrt(tier - 4)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(400 / Math.sqrt(Math.pow(1.5, tier - 5.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -502,19 +457,17 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Bio_Ultra.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(1), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Longasssuperconductornameforuvwire, (long) - (16 * (Math.sqrt(tier - 5)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Neutronium, (long) (16 * (Math.sqrt(tier - 5)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 5)))), - Materials.IronIIIChloride.getFluid((long) (7500 * (Math.sqrt(tier - 5)))), - Materials.BioMediumSterilized.getFluid((long) (4000 * (Math.sqrt(tier - 5)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.Longasssuperconductornameforuvwire, + (long) (16 * (Math.sqrt(tier - 5)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Neutronium, (long) (16 * (Math.sqrt(tier - 5)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 5)))), + Materials.IronIIIChloride.getFluid((long) (7500 * (Math.sqrt(tier - 5)))), + Materials.BioMediumSterilized.getFluid((long) (4000 * (Math.sqrt(tier - 5)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(600 / Math.sqrt(Math.pow(1.5, tier - 5.5))), (int) GT_Values.VP[tier] * 3 / 4, @@ -529,20 +482,18 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Bio_Ultra.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(2), - GT_Utility.getNaniteAsCatalyst(Materials.Silver), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Longasssuperconductornameforuvwire, (long) - (16 * (Math.sqrt(tier - 5)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Neutronium, (long) (16 * (Math.sqrt(tier - 5)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 5)))), - Materials.IronIIIChloride.getFluid((long) (7500 * (Math.sqrt(tier - 5)))), - Materials.BioMediumSterilized.getFluid((long) (4000 * (Math.sqrt(tier - 5)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2), + GT_Utility.getNaniteAsCatalyst(Materials.Silver), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.Longasssuperconductornameforuvwire, + (long) (16 * (Math.sqrt(tier - 5)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Neutronium, (long) (16 * (Math.sqrt(tier - 5)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 5)))), + Materials.IronIIIChloride.getFluid((long) (7500 * (Math.sqrt(tier - 5)))), + Materials.BioMediumSterilized.getFluid((long) (4000 * (Math.sqrt(tier - 5)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(500 / Math.sqrt(Math.pow(1.5, tier - 6.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -557,20 +508,18 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Bio_Ultra.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(3), - GT_Utility.getNaniteAsCatalyst(Materials.Gold), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Longasssuperconductornameforuvwire, (long) - (16 * (Math.sqrt(tier - 5)))), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.Neutronium, (long) (16 * (Math.sqrt(tier - 5)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 5)))), - Materials.IronIIIChloride.getFluid((long) (7500 * (Math.sqrt(tier - 5)))), - Materials.BioMediumSterilized.getFluid((long) (4000 * (Math.sqrt(tier - 5)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(3), + GT_Utility.getNaniteAsCatalyst(Materials.Gold), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.Longasssuperconductornameforuvwire, + (long) (16 * (Math.sqrt(tier - 5)))), + GT_OreDictUnificator + .get(OrePrefixes.foil, Materials.Neutronium, (long) (16 * (Math.sqrt(tier - 5)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 5)))), + Materials.IronIIIChloride.getFluid((long) (7500 * (Math.sqrt(tier - 5)))), + Materials.BioMediumSterilized.getFluid((long) (4000 * (Math.sqrt(tier - 5)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(400 / Math.sqrt(Math.pow(1.5, tier - 6.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -588,22 +537,24 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Optical.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(1), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier) - .getPlates(1), - GT_ModHandler.getModItem( - "bartworks", "gt.bwMetaGeneratedfoil", (long) (16 * (Math.sqrt(tier - 6))), 10106), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.InfinityCatalyst, (long) (16 * (Math.sqrt(tier - 6)))), - GT_ModHandler.getModItem( - "miscutils", "itemFoilChromaticGlass", (long) (16 * (Math.sqrt(tier - 6)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 6)))), - Materials.IronIIIChloride.getFluid((long) (12500 * (Math.sqrt(tier - 6)))), - Materials.MysteriousCrystal.getMolten((long) (2880 * (Math.sqrt(tier - 6)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_ModHandler.getModItem( + "bartworks", + "gt.bwMetaGeneratedfoil", + (long) (16 * (Math.sqrt(tier - 6))), + 10106), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.InfinityCatalyst, + (long) (16 * (Math.sqrt(tier - 6)))), + GT_ModHandler.getModItem( + "miscutils", + "itemFoilChromaticGlass", + (long) (16 * (Math.sqrt(tier - 6)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 6)))), + Materials.IronIIIChloride.getFluid((long) (12500 * (Math.sqrt(tier - 6)))), + Materials.MysteriousCrystal.getMolten((long) (2880 * (Math.sqrt(tier - 6)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(600 / Math.sqrt(Math.pow(1.5, tier - 5.5))), (int) GT_Values.VP[tier] * 3 / 4, @@ -618,23 +569,25 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Optical.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(2), - GT_Utility.getNaniteAsCatalyst(Materials.Silver), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier) - .getPlates(1), - GT_ModHandler.getModItem( - "bartworks", "gt.bwMetaGeneratedfoil", (long) (16 * (Math.sqrt(tier - 6))), 10106), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.InfinityCatalyst, (long) (16 * (Math.sqrt(tier - 6)))), - GT_ModHandler.getModItem( - "miscutils", "itemFoilChromaticGlass", (long) (16 * (Math.sqrt(tier - 6)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 6)))), - Materials.IronIIIChloride.getFluid((long) (12500 * (Math.sqrt(tier - 6)))), - Materials.MysteriousCrystal.getMolten((long) (2880 * (Math.sqrt(tier - 6)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2), + GT_Utility.getNaniteAsCatalyst(Materials.Silver), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_ModHandler.getModItem( + "bartworks", + "gt.bwMetaGeneratedfoil", + (long) (16 * (Math.sqrt(tier - 6))), + 10106), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.InfinityCatalyst, + (long) (16 * (Math.sqrt(tier - 6)))), + GT_ModHandler.getModItem( + "miscutils", + "itemFoilChromaticGlass", + (long) (16 * (Math.sqrt(tier - 6)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 6)))), + Materials.IronIIIChloride.getFluid((long) (12500 * (Math.sqrt(tier - 6)))), + Materials.MysteriousCrystal.getMolten((long) (2880 * (Math.sqrt(tier - 6)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(500 / Math.sqrt(Math.pow(1.5, tier - 6.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, @@ -649,23 +602,25 @@ public class GT_PCBFactoryRecipes { } aBoards.add(ItemList.Circuit_Board_Optical.get(amountOfBoards)); GT_Values.RA.addPCBFactoryRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(3), - GT_Utility.getNaniteAsCatalyst(Materials.Gold), - GT_PCBFactoryManager.getPlasticMaterialFromTier(tier) - .getPlates(1), - GT_ModHandler.getModItem( - "bartworks", "gt.bwMetaGeneratedfoil", (long) (16 * (Math.sqrt(tier - 6))), 10106), - GT_OreDictUnificator.get( - OrePrefixes.foil, Materials.InfinityCatalyst, (long) (16 * (Math.sqrt(tier - 6)))), - GT_ModHandler.getModItem( - "miscutils", "itemFoilChromaticGlass", (long) (16 * (Math.sqrt(tier - 6)))) - }, - new FluidStack[] { - Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 6)))), - Materials.IronIIIChloride.getFluid((long) (12500 * (Math.sqrt(tier - 6)))), - Materials.MysteriousCrystal.getMolten((long) (2880 * (Math.sqrt(tier - 6)))) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(3), + GT_Utility.getNaniteAsCatalyst(Materials.Gold), + GT_PCBFactoryManager.getPlasticMaterialFromTier(tier).getPlates(1), + GT_ModHandler.getModItem( + "bartworks", + "gt.bwMetaGeneratedfoil", + (long) (16 * (Math.sqrt(tier - 6))), + 10106), + GT_OreDictUnificator.get( + OrePrefixes.foil, + Materials.InfinityCatalyst, + (long) (16 * (Math.sqrt(tier - 6)))), + GT_ModHandler.getModItem( + "miscutils", + "itemFoilChromaticGlass", + (long) (16 * (Math.sqrt(tier - 6)))) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid((long) (500 * (Math.sqrt(tier - 6)))), + Materials.IronIIIChloride.getFluid((long) (12500 * (Math.sqrt(tier - 6)))), + Materials.MysteriousCrystal.getMolten((long) (2880 * (Math.sqrt(tier - 6)))) }, aBoards.toArray(new ItemStack[0]), (int) Math.ceil(400 / Math.sqrt(Math.pow(1.5, tier - 6.5))), (int) GT_Values.VP[tier + 1] * 3 / 4, diff --git a/src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java index f69eb6d752..d64825965d 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java @@ -1,5 +1,7 @@ package gregtech.loaders.postload.recipes; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -7,111 +9,50 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.item.ItemStack; public class AlloySmelterRecipes 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) - } - }; + { 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) } }; @Override public void run() { @@ -122,14 +63,14 @@ public class AlloySmelterRecipes 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); } } diff --git a/src/main/java/gregtech/loaders/postload/recipes/ArcFurnaceRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ArcFurnaceRecipes.java index a6a61c9470..632fe5d385 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ArcFurnaceRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ArcFurnaceRecipes.java @@ -3,411 +3,347 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.enums.GT_Values.MOD_ID_RC; import static gregtech.api.util.GT_ModHandler.getModItem; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.item.ItemStack; public class ArcFurnaceRecipes implements Runnable { + @Override public void run() { 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 2), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1) }, null, 160, 96); GT_Values.RA.addArcFurnaceRecipe( ItemList.Long_Distance_Pipeline_Fluid.get(1L), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 19L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 19L) }, null, 180, (int) TierEU.RECIPE_MV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 12L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 7L) }, null, 180, (int) TierEU.RECIPE_MV); GT_Values.RA.addArcFurnaceRecipe( ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(1L), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 2L) }, null, 10, (int) TierEU.RECIPE_MV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 1L) }, null, 10, (int) TierEU.RECIPE_MV); 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) - }, + 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) - }, + 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) - }, + 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.TPV, 8), - GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nichrome, 1), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 5) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TPV, 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.TPV, 1), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 6) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.HSSG, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TPV, 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.beta", 1L, 0), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 2L) }, null, 150, 90); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + 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( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 6) }, null, 150, 90); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.beta", 1L, 13), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 2L) }, null, 180, (int) TierEU.RECIPE_MV); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) }, null, 180, (int) TierEU.RECIPE_MV); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 6L) }, null, 180, (int) TierEU.RECIPE_MV); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Aluminium, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Aluminium, 2L) }, null, 210, 150); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 1), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3) }, null, 210, 150); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 6L) }, null, 210, 150); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel, 2L) }, null, 240, 180); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + 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( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.StainlessSteel, 6L) }, null, 240, 180); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 2L) }, null, 270, 210); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + 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( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Titanium, 6L) }, null, 270, 210); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 2L) }, null, 300, 240); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + 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( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.TungstenSteel, 6L) }, null, 300, 240); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Palladium, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Palladium, 2L) }, null, 330, 270); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + 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( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.NiobiumTitanium, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Chrome, 6L) }, null, 330, 270); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.eta", 1L, 0), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 2L) }, null, 360, 300); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + 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( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Enderium, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iridium, 6L) }, null, 360, 300); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.eta", 1L, 3), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium, 2L) }, null, 360, 330); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + 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( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Osmium, 6L) }, null, 360, 330); GT_Values.RA.addArcFurnaceRecipe( getModItem(MOD_ID_RC, "machine.eta", 1L, 6), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium, 2L) }, null, 360, 360); GT_Values.RA.addArcFurnaceRecipe( 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) - }, + 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( 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Neutronium, 6L) }, null, 360, 360); @@ -415,7 +351,7 @@ public class ArcFurnaceRecipes implements Runnable { 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3) }, null, 1200, (int) TierEU.RECIPE_LV); diff --git a/src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java index 33d0544713..5d9891cf95 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java @@ -5,6 +5,13 @@ import static gregtech.api.enums.GT_Values.MOD_ID_RC; import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.*; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; @@ -12,14 +19,9 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class AssemblerRecipes implements Runnable { + @Override public void run() { @@ -72,484 +74,360 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_EV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), - ItemList.Circuit_Silicon_Wafer3.get(8L), - GT_Utility.getIntegratedCircuit(1) - }, + 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.addAssemblerRecipe( - new ItemStack[] { - ItemList.Electric_Pump_LV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Basic), 2L), - GT_Utility.getIntegratedCircuit(3) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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, (int) TierEU.RECIPE_MV); 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) - }, + 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, (int) TierEU.RECIPE_HV); 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) - }, + 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, (int) TierEU.RECIPE_EV); 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) - }, + 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, (int) TierEU.RECIPE_IV); 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) - }, + 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, (int) TierEU.RECIPE_LuV); 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) - }, + 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, (int) TierEU.RECIPE_ZPM); 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) - }, + 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(5) - }, + 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(5) }, GT_Values.NF, ItemList.Steam_Valve_LV.get(1L), 400, (int) TierEU.RECIPE_LV); 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(5) - }, + 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(5) }, GT_Values.NF, ItemList.Steam_Valve_MV.get(1L), 350, (int) TierEU.RECIPE_MV); 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(5) - }, + 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(5) }, GT_Values.NF, ItemList.Steam_Valve_HV.get(1L), 300, (int) TierEU.RECIPE_HV); 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(5) - }, + 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(5) }, GT_Values.NF, ItemList.Steam_Valve_EV.get(1L), 250, (int) TierEU.RECIPE_EV); 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(5) - }, + 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(5) }, GT_Values.NF, ItemList.Steam_Valve_IV.get(1L), 200, (int) TierEU.RECIPE_IV); 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_HV); 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) - }, + 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, (int) TierEU.RECIPE_EV); 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) - }, + 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, (int) TierEU.RECIPE_IV); 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) - }, + 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, (int) TierEU.RECIPE_HV); 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) - }, + 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, (int) TierEU.RECIPE_EV); 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) - }, + 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, (int) TierEU.RECIPE_IV); 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) - }, + 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, (int) TierEU.RECIPE_HV); 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) - }, + 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, (int) TierEU.RECIPE_EV); 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) - }, + 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, (int) TierEU.RECIPE_IV); 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) - }, + 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, (int) TierEU.RECIPE_HV); 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) - }, + 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, (int) TierEU.RECIPE_EV); 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) - }, + 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, (int) TierEU.RECIPE_IV); 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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[] { - GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.StainlessSteel, 1L), - ItemList.Hull_EV.get(1L), - GT_Utility.getIntegratedCircuit(4) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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.pipeQuadruple, Materials.Neutronium, 1L), - ItemList.Hull_MAX.get(1L), - GT_Utility.getIntegratedCircuit(4) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.Neutronium, 1L), + ItemList.Hull_MAX.get(1L), GT_Utility.getIntegratedCircuit(4) }, Materials.Polybenzimidazole.getMolten(2304L), ItemList.Hatch_Input_Multi_2x2_UHV.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) - }, + 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, @@ -561,165 +439,178 @@ public class AssemblerRecipes implements Runnable { nbtFlask.setInteger("Capacity", 144); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(1), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(1), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 288); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(2), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(2), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 576); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(3), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(3), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 720); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(4), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(4), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 864); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(5), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(5), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 72); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(6), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(6), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 648); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(7), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(7), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 936); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(8), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(8), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 250); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(10), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(10), + flask, + 10, + (int) TierEU.RECIPE_LV); nbtFlask.setInteger("Capacity", 500); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(11), flask, 10, (int) - TierEU.RECIPE_LV); + ItemList.VOLUMETRIC_FLASK.get(1), + GT_Utility.getIntegratedCircuit(11), + flask, + 10, + (int) TierEU.RECIPE_LV); // make the 1000L recipe actually in ItemStack flask500 = flask.copy(); nbtFlask.setInteger("Capacity", 1000); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe( - flask500, GT_Utility.getIntegratedCircuit(24), flask, 10, (int) TierEU.RECIPE_LV); + flask500, + GT_Utility.getIntegratedCircuit(24), + flask, + 10, + (int) TierEU.RECIPE_LV); } 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) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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, (int) TierEU.RECIPE_MV); 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) - }, + 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, (int) TierEU.RECIPE_HV); 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) - }, + 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, (int) TierEU.RECIPE_EV); 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) - }, + 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, (int) TierEU.RECIPE_IV); 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) - }, + 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, (int) TierEU.RECIPE_LuV); 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) - }, + 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, (int) TierEU.RECIPE_ZPM); 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) - }, + 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) - }, + 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, @@ -922,31 +813,22 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StyreneButadieneRubber, 2L), - GT_ModHandler.getIC2Item("carbonMesh", 2L), - GT_Utility.getIntegratedCircuit(2) - }, + 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, (int) TierEU.RECIPE_HV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicone, 1L), - GT_ModHandler.getIC2Item("carbonMesh", 1L), - GT_Utility.getIntegratedCircuit(3) - }, + 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, @@ -954,8 +836,8 @@ public class AssemblerRecipes implements Runnable { // 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) - }, + 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, @@ -996,7 +878,7 @@ public class AssemblerRecipes implements Runnable { 32, 8); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Tin, 4L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Tin, 4L) }, GT_Values.NF, ItemList.Cell_Universal_Fluid.get(1L), 128, @@ -1108,245 +990,205 @@ public class AssemblerRecipes implements Runnable { 4); // 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, + (int) TierEU.RECIPE_MV); 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, - (int) TierEU.RECIPE_MV); - 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) - }, + 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, (int) TierEU.RECIPE_HV); 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 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, (int) TierEU.RECIPE_EV); 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 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, (int) TierEU.RECIPE_IV); 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) - }, + 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, (int) TierEU.RECIPE_LuV); 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) - }, + 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, (int) TierEU.RECIPE_ZPM); 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) - }, + 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, (int) TierEU.RECIPE_UV); 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) - }, + 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, (int) TierEU.RECIPE_UHV); 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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, (int) TierEU.RECIPE_MV); 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) - }, + 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, (int) TierEU.RECIPE_HV); 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) - }, + 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, (int) TierEU.RECIPE_EV); 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) - }, + 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, (int) TierEU.RECIPE_IV); 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) - }, + 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, (int) TierEU.RECIPE_LuV); 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) - }, + 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, (int) TierEU.RECIPE_ZPM); 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 3L), GT_Utility.getIntegratedCircuit(4) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 1L), GT_Utility.getIntegratedCircuit(12) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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, (int) TierEU.RECIPE_IV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), - ItemList.Electric_Motor_UV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Iridium, 1L), - ItemList.Component_Filter.get(8L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Iridium, 8L), - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), + ItemList.Electric_Motor_UV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Iridium, 1L), + ItemList.Component_Filter.get(8L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Iridium, 8L), }, null, ItemList.Casing_Vent_T2.get(1L), 30 * 20, @@ -2363,151 +2205,121 @@ public class AssemblerRecipes implements Runnable { // 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.ThoriumCell_1.get(4L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), - GT_Utility.getIntegratedCircuit(4) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.ThoriumCell_2.get(2L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), - GT_Utility.getIntegratedCircuit(5) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Uraniumcell_1.get(2L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), - GT_Utility.getIntegratedCircuit(2) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Uraniumcell_1.get(4L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), - GT_Utility.getIntegratedCircuit(4) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Uraniumcell_2.get(2L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), - GT_Utility.getIntegratedCircuit(5) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Moxcell_1.get(2L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), - GT_Utility.getIntegratedCircuit(2) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Moxcell_1.get(4L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), - GT_Utility.getIntegratedCircuit(4) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Moxcell_2.get(2L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), - GT_Utility.getIntegratedCircuit(5) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.NaquadahCell_1.get(2L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), - GT_Utility.getIntegratedCircuit(2) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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, @@ -2520,17 +2332,15 @@ public class AssemblerRecipes implements Runnable { 100, 120000); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - Materials.NaquadahAlloy.getPlates(8), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1) - }, + new ItemStack[] { Materials.NaquadahAlloy.getPlates(8), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1) }, null, ItemList.RadiantNaquadahAlloyCasing.get(1), 10, 400000); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] {ItemList.KevlarFiber.get(8L), GT_Utility.getIntegratedCircuit(8)}, + new ItemStack[] { ItemList.KevlarFiber.get(8L), GT_Utility.getIntegratedCircuit(8) }, GT_Values.NF, ItemList.WovenKevlar.get(1L), 300, @@ -2538,56 +2348,43 @@ public class AssemblerRecipes implements Runnable { for (Materials tMat : Materials.values()) { if (tMat.isProperSolderingFluid()) { - int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) - ? 1 + int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; 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_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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + new ItemStack[] { GT_ModHandler.getIC2Item("ecMeter", 1L), tPlate, + GT_Utility.getIntegratedCircuit(1) }, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_EnergyDetector.get(1L), 800, @@ -2597,22 +2394,21 @@ public class AssemblerRecipes implements Runnable { } if (isGTNHLanthanidLoaded && isGTPPLoaded) { - GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Electric_Pump_EV.get(4L), - ItemList.Field_Generator_EV.get(4L), - getModItem(MOD_ID_GTPP, "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, - (int) TierEU.RECIPE_EV); + GT_Values.RA + .addAssemblerRecipe( + new ItemStack[] { ItemList.Electric_Pump_EV.get(4L), ItemList.Field_Generator_EV.get(4L), + getModItem(MOD_ID_GTPP, "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, + (int) TierEU.RECIPE_EV); } } @@ -2620,48 +2416,37 @@ public class AssemblerRecipes implements Runnable { * Adds new recipes for hatches and busses */ public static void addBusAndHatchRecipes() { - Materials[] glues = { - Materials.Glue, Materials.Plastic, Materials.Polytetrafluoroethylene, Materials.Polybenzimidazole - }; + Materials[] glues = { Materials.Glue, Materials.Plastic, Materials.Polytetrafluoroethylene, + Materials.Polybenzimidazole }; - ItemStack[] chests = { - isCoremodLoaded ? getModItem(MOD_ID_DC, "BabyChest", 1) : new ItemStack(Blocks.chest), - new ItemStack(Blocks.chest), - isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 3) : new ItemStack(Blocks.chest), - isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1) : new ItemStack(Blocks.chest), - isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 4) : new ItemStack(Blocks.chest), - isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 1) : new ItemStack(Blocks.chest), - isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 2) : new ItemStack(Blocks.chest), - isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 5) : new ItemStack(Blocks.chest), - isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 6) : new ItemStack(Blocks.chest), - isAvaritiaAddonsLoaded ? getModItem("avaritiaddons", "CompressedChest", 1) : new ItemStack(Blocks.chest) - }; - ItemStack[] tanks = { - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - isBuildCraftFactoryLoaded - ? getModItem("BuildCraft|Factory", "tankBlock", 1) - : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - isIronTankLoaded - ? getModItem("irontank", "copperTank", 1) - : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - isIronTankLoaded - ? getModItem("irontank", "ironTank", 1) - : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - isIronTankLoaded - ? getModItem("irontank", "silverTank", 1) - : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - isIronTankLoaded - ? getModItem("irontank", "goldTank", 1) - : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - isIronTankLoaded - ? getModItem("irontank", "diamondTank", 1) - : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - isIronTankLoaded - ? getModItem("irontank", "obsidianTank", 1) - : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - getModItem("gregtech", "gt.blockmachines", 1, 130), - getModItem("gregtech", "gt.blockmachines", 1, 131) - }; + ItemStack[] chests = { isCoremodLoaded ? getModItem(MOD_ID_DC, "BabyChest", 1) : new ItemStack(Blocks.chest), + new ItemStack(Blocks.chest), + isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 3) : new ItemStack(Blocks.chest), + isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1) : new ItemStack(Blocks.chest), + isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 4) : new ItemStack(Blocks.chest), + isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 1) : new ItemStack(Blocks.chest), + isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 2) : new ItemStack(Blocks.chest), + isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 5) : new ItemStack(Blocks.chest), + isIronChestLoaded ? getModItem("IronChest", "BlockIronChest", 1, 6) : new ItemStack(Blocks.chest), + isAvaritiaAddonsLoaded ? getModItem("avaritiaddons", "CompressedChest", 1) + : new ItemStack(Blocks.chest) }; + ItemStack[] tanks = { GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + isBuildCraftFactoryLoaded ? getModItem("BuildCraft|Factory", "tankBlock", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + isIronTankLoaded ? getModItem("irontank", "copperTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + isIronTankLoaded ? getModItem("irontank", "ironTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + isIronTankLoaded ? getModItem("irontank", "silverTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + isIronTankLoaded ? getModItem("irontank", "goldTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + isIronTankLoaded ? getModItem("irontank", "diamondTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + isIronTankLoaded ? getModItem("irontank", "obsidianTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + getModItem("gregtech", "gt.blockmachines", 1, 130), + getModItem("gregtech", "gt.blockmachines", 1, 131) }; ItemStack[][] aInputs = new ItemStack[10][3]; ItemStack[][] aInputs2 = new ItemStack[10][3]; @@ -2669,18 +2454,14 @@ public class AssemblerRecipes 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++) { @@ -2812,231 +2593,183 @@ public class AssemblerRecipes implements Runnable { private void loadRailcraftRecipes() { if (!isRailcraftLoaded) return; GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.stone_slab, 1, 0), - ItemList.RC_Rebar.get(1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.RC_Rail_Standard.get(3L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), - GT_Utility.getIntegratedCircuit(8) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.RC_Rail_Standard.get(1L), - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.TungstenSteel, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.RC_Tie_Wood.get(1L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(11) - }, + 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, @@ -3077,42 +2810,33 @@ public class AssemblerRecipes implements Runnable { 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) - }, + new ItemStack[] { ItemList.RC_Bed_Wood.get(1L), ItemList.RC_Rail_Wooden.get(6L), + GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, tRailWood, 100, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailWood), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, tRailWoodB, 200, (int) TierEU.RECIPE_LV); } 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.RC_Bed_Wood.get(1L), ItemList.RC_Rail_Standard.get(6L), GT_Utility.getIntegratedCircuit(21) - }, + 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, @@ -3124,11 +2848,8 @@ public class AssemblerRecipes implements Runnable { 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) - }, + new ItemStack[] { ItemList.RC_Bed_Stone.get(1L), ItemList.RC_Rail_Reinforced.get(6L), + GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, tRailRe, 200, @@ -3140,11 +2861,9 @@ public class AssemblerRecipes implements Runnable { 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) - }, + new ItemStack[] { GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, tRailReB, 300, @@ -3156,11 +2875,8 @@ public class AssemblerRecipes implements Runnable { 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) - }, + new ItemStack[] { ItemList.RC_Bed_Stone.get(1L), ItemList.RC_Rail_Electric.get(6L), + GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, tRailEl, 200, @@ -3173,9 +2889,8 @@ public class AssemblerRecipes implements Runnable { 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) - }, + new ItemStack[] { ItemList.RC_Bed_Stone.get(1L), ItemList.RC_Rail_HS.get(6L), + GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, tRailHs, 200, @@ -3187,11 +2902,9 @@ public class AssemblerRecipes implements Runnable { 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) - }, + new ItemStack[] { GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, tRailHsB, 300, @@ -3205,71 +2918,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailWood), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailWood), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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, @@ -3283,71 +2982,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailWood), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailWood), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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, @@ -3361,71 +3046,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailWood), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailWood), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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, @@ -3439,71 +3110,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.rail, 2, 0), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.rail, 2, 0), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -3517,71 +3174,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.rail, 2, 0), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.rail, 2, 0), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -3595,71 +3238,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.rail, 2, 0), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.rail, 2, 0), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -3673,71 +3302,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailRe), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailRe), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -3751,71 +3366,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailRe), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailRe), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -3829,71 +3430,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailRe), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailRe), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -3907,71 +3494,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailHs), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailHs), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -3985,71 +3558,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailHs), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailHs), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -4063,56 +3622,41 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); 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) - }, + 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) - }, + 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, @@ -4126,71 +3670,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailEl), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Electrum, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailEl), - GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.VanadiumGallium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -4204,71 +3734,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailEl), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Electrum, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailEl), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.VanadiumGallium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -4282,71 +3798,57 @@ public class AssemblerRecipes implements Runnable { 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailEl), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Electrum, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.copyAmount(2, tRailEl), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.VanadiumGallium, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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) - }, + 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, @@ -4355,88 +3857,70 @@ public class AssemblerRecipes implements Runnable { // Shunting Wire for (Materials tMat : Materials.values()) { if (tMat.isProperSolderingFluid()) { - int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) - ? 1 + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_LV); 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) - }, + 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) - }, + 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) - }, + 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, (int) TierEU.RECIPE_MV); // chunkloader upgrade OC GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Circuit_Board_Plastic_Advanced.get(1L), - GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Aluminium, 2L), - getModItem(MOD_ID_RC, "machine.alpha", 1L, 0), - getModItem("OpenComputers", "item", 1L, 26), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { ItemList.Circuit_Board_Plastic_Advanced.get(1L), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Aluminium, 2L), + getModItem(MOD_ID_RC, "machine.alpha", 1L, 0), + getModItem("OpenComputers", "item", 1L, 26), GT_Utility.getIntegratedCircuit(1) }, tMat.getMolten(144L * tMultiplier / 2L), getModItem("OpenComputers", "item", 1L, 62), 250, @@ -4445,76 +3929,60 @@ public class AssemblerRecipes implements Runnable { } 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) - }, + 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), 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) - }, + 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), getModItem(MOD_ID_DC, "item.EngineCore", 1L, 0), 100, 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - getModItem("ExtraUtilities", "trashcan", 1L, 0), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Obsidian, 4L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { getModItem("ExtraUtilities", "trashcan", 1L, 0), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Obsidian, 4L), + GT_Utility.getIntegratedCircuit(1) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 1L, 11), 200, 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - getModItem(MOD_ID_DC, "item.EngineCore", 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyCopper, 10L), - GT_Utility.getIntegratedCircuit(10) - }, + new ItemStack[] { getModItem(MOD_ID_DC, "item.EngineCore", 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyCopper, 10L), + GT_Utility.getIntegratedCircuit(10) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 1L, 7), 200, 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - getModItem(MOD_ID_DC, "item.EngineCore", 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 10L), - GT_Utility.getIntegratedCircuit(10) - }, + new ItemStack[] { getModItem(MOD_ID_DC, "item.EngineCore", 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 10L), + GT_Utility.getIntegratedCircuit(10) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 1L, 8), 200, 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - getModItem(MOD_ID_DC, "item.EngineCore", 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 10L), - GT_Utility.getIntegratedCircuit(10) - }, + new ItemStack[] { getModItem(MOD_ID_DC, "item.EngineCore", 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 10L), + GT_Utility.getIntegratedCircuit(10) }, GT_Values.NF, 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) - }, + 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, getModItem(MOD_ID_RC, "machine.alpha", 1, 0), 600, @@ -4527,70 +3995,50 @@ public class AssemblerRecipes implements Runnable { 600, (int) TierEU.RECIPE_LV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 2L, 1), 800, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 2L, 1), 800, (int) TierEU.RECIPE_LV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Bronze, 2L), + new ItemStack(Blocks.iron_bars, 2, 0), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 1L, 2), 800, (int) TierEU.RECIPE_LV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), - GT_Utility.getIntegratedCircuit(20) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), + GT_Utility.getIntegratedCircuit(20) }, GT_Values.NF, 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 2L, 14), 400, 64); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 2L, 14), 400, 64); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 2L), - getModItem(MOD_ID_DC, "item.SteelBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 2L), + getModItem(MOD_ID_DC, "item.SteelBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.beta", 1L, 15), 400, @@ -4602,70 +4050,50 @@ public class AssemblerRecipes implements Runnable { 600, (int) TierEU.RECIPE_MV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 1), 800, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 1), 800, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Plastic, 2L), - getModItem(MOD_ID_DC, "item.AluminiumBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Plastic, 2L), + getModItem(MOD_ID_DC, "item.AluminiumBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), 800, (int) TierEU.RECIPE_MV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), - GT_Utility.getIntegratedCircuit(20) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(20) }, GT_Values.NF, 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 4), 400, 256); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 4), 400, 256); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 2L), - getModItem(MOD_ID_DC, "item.StainlessSteelBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 2L), + getModItem(MOD_ID_DC, "item.StainlessSteelBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), 400, @@ -4677,70 +4105,50 @@ public class AssemblerRecipes implements Runnable { 600, (int) TierEU.RECIPE_HV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 7), 800, (int) TierEU.RECIPE_HV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 7), 800, (int) TierEU.RECIPE_HV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Titanium, 2L), - getModItem(MOD_ID_DC, "item.TitaniumBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Titanium, 2L), + getModItem(MOD_ID_DC, "item.TitaniumBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), 800, (int) TierEU.RECIPE_HV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), - GT_Utility.getIntegratedCircuit(20) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), + GT_Utility.getIntegratedCircuit(20) }, GT_Values.NF, 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 10), 400, 960); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 10), 400, 960); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 2L), - getModItem(MOD_ID_DC, "item.TungstenSteelBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 2L), + getModItem(MOD_ID_DC, "item.TungstenSteelBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), 400, @@ -4752,70 +4160,50 @@ public class AssemblerRecipes implements Runnable { 600, (int) TierEU.RECIPE_EV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 13), 800, (int) TierEU.RECIPE_EV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 2L, 13), 800, (int) TierEU.RECIPE_EV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NiobiumTitanium, 2L), - getModItem(MOD_ID_DC, "item.ChromeBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NiobiumTitanium, 2L), + getModItem(MOD_ID_DC, "item.ChromeBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), 800, (int) TierEU.RECIPE_EV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), - GT_Utility.getIntegratedCircuit(20) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), + GT_Utility.getIntegratedCircuit(20) }, GT_Values.NF, 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 2L, 1), 400, 4096); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 2L, 1), 400, 4096); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Enderium, 2L), - getModItem(MOD_ID_DC, "item.IridiumBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Enderium, 2L), + getModItem(MOD_ID_DC, "item.IridiumBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 1L, 2), 400, @@ -4827,130 +4215,98 @@ public class AssemblerRecipes implements Runnable { 600, (int) TierEU.RECIPE_IV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 2L, 4), 800, (int) TierEU.RECIPE_IV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 2L, 4), 800, (int) TierEU.RECIPE_IV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Naquadah, 2L), - getModItem(MOD_ID_DC, "item.OsmiumBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Naquadah, 2L), + getModItem(MOD_ID_DC, "item.OsmiumBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 1L, 5), 800, (int) TierEU.RECIPE_IV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), - GT_Utility.getIntegratedCircuit(20) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), + GT_Utility.getIntegratedCircuit(20) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 1L, 6), 200, (int) TierEU.RECIPE_LuV); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 2L, 7), 400, (int) TierEU.RECIPE_LuV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), - getModItem("TConstruct", "GlassPane", 2L, 0), - GT_Utility.getIntegratedCircuit(21) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), + getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 2L, 7), 400, (int) TierEU.RECIPE_LuV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Neutronium, 2L), - getModItem(MOD_ID_DC, "item.NeutroniumBars", 2L), - GT_Utility.getIntegratedCircuit(22) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Neutronium, 2L), + getModItem(MOD_ID_DC, "item.NeutroniumBars", 2L), GT_Utility.getIntegratedCircuit(22) }, GT_Values.NF, getModItem(MOD_ID_RC, "machine.eta", 1L, 8), 400, (int) TierEU.RECIPE_LuV); // Water Tank GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L) }, Materials.Glue.getFluid(36L), 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L) }, Materials.Glue.getFluid(36L), 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L) }, Materials.Glue.getFluid(36L), 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Steel, 4L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 4L) }, Materials.Glue.getFluid(72L), 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Steel, 2L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.WoodSealed, 1L) }, Materials.Plastic.getMolten(36L), 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.StainlessSteel, 4L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.WoodSealed, 4L) }, Materials.Plastic.getMolten(72L), getModItem(MOD_ID_RC, "machine.alpha", 9L, 14), 400, @@ -4985,32 +4341,26 @@ public class AssemblerRecipes implements Runnable { public void withGalacticraftMars() { if (isGalacticraftMarsLoaded) { 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) - }, + 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, (int) TierEU.RECIPE_HV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - getModItem("GalacticraftCore", "item.heavyPlating", 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.MeteoricIron, 2L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { 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, (int) TierEU.RECIPE_EV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - getModItem("GalacticraftMars", "item.null", 1L, 3), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Desh, 4L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { 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, @@ -5020,144 +4370,122 @@ public class AssemblerRecipes implements Runnable { public void withGalaxySPace() { if (isGalaxySpaceLoaded) { + 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, + (int) TierEU.RECIPE_MV); 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, - (int) TierEU.RECIPE_MV); - 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) - }, + 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, (int) TierEU.RECIPE_HV); 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 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, (int) TierEU.RECIPE_EV); 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 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, (int) TierEU.RECIPE_IV); 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) - }, + 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, (int) TierEU.RECIPE_LuV); 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) - }, + 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, (int) TierEU.RECIPE_ZPM); 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) - }, + 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, (int) TierEU.RECIPE_UV); 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) - }, + 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, (int) TierEU.RECIPE_UHV); - 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, - (int) TierEU.RECIPE_UEV); - 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, - (int) TierEU.RECIPE_UMV); + 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, + (int) TierEU.RECIPE_UEV); + 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, + (int) TierEU.RECIPE_UMV); } } public void withoutGTPPRecipes() { if (!isGTPPLoaded) { GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), - ItemList.Circuit_Silicon_Wafer4.get(2L), - GT_Utility.getIntegratedCircuit(1) - }, + 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, (int) TierEU.RECIPE_LuV); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), - ItemList.Circuit_Silicon_Wafer5.get(1L), - GT_Utility.getIntegratedCircuit(1) - }, + 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, diff --git a/src/main/java/gregtech/loaders/postload/recipes/AssemblyLineRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/AssemblyLineRecipes.java index 35569431a4..72107b6df1 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/AssemblyLineRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/AssemblyLineRecipes.java @@ -1,21 +1,23 @@ package gregtech.loaders.postload.recipes; -import gregtech.api.enums.*; -import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.*; +import gregtech.api.util.GT_OreDictUnificator; + public class AssemblyLineRecipes implements Runnable { + @Override public void run() { // 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 + // 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); @@ -28,14 +30,12 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -43,17 +43,15 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -61,24 +59,19 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -87,16 +80,14 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -104,16 +95,14 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -121,20 +110,15 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -143,15 +127,13 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -159,15 +141,13 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -175,19 +155,14 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -196,17 +171,15 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -214,17 +187,15 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -232,21 +203,16 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -255,18 +221,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -274,18 +238,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -293,22 +255,17 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -317,18 +274,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -336,18 +291,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -355,18 +308,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -375,18 +326,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -394,18 +343,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -413,18 +360,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -433,19 +378,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -453,19 +395,16 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -473,21 +412,18 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); @@ -496,27 +432,20 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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, (int) TierEU.RECIPE_LuV); @@ -524,27 +453,20 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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, (int) TierEU.ZPM); @@ -552,37 +474,26 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -591,30 +502,23 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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, (int) TierEU.RECIPE_LuV); @@ -622,27 +526,21 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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, (int) TierEU.RECIPE_ZPM); @@ -650,37 +548,26 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -688,22 +575,17 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -711,22 +593,17 @@ public class AssemblyLineRecipes implements Runnable { 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) - }, + 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); @@ -734,21 +611,16 @@ public class AssemblyLineRecipes implements Runnable { 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), - }, + 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); @@ -756,20 +628,15 @@ public class AssemblyLineRecipes implements Runnable { 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), - }, + 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); @@ -777,20 +644,15 @@ public class AssemblyLineRecipes implements Runnable { 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), - }, + 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); @@ -798,26 +660,18 @@ public class AssemblyLineRecipes implements Runnable { 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)}, + 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); diff --git a/src/main/java/gregtech/loaders/postload/recipes/AutoclaveRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/AutoclaveRecipes.java index 6c44e6d51a..1ef911c448 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/AutoclaveRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/AutoclaveRecipes.java @@ -2,14 +2,16 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.util.GT_ModHandler.getModItem; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.item.ItemStack; public class AutoclaveRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addAutoclaveRecipe( @@ -168,8 +170,9 @@ public class AutoclaveRecipes implements Runnable { 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}, + new ItemStack[] { GT_Values.NI, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3) }, + new int[] { 0, 7500 }, 1200, (int) TierEU.RECIPE_LV, false); @@ -178,8 +181,9 @@ public class AutoclaveRecipes implements Runnable { 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}, + new ItemStack[] { GT_Values.NI, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3) }, + new int[] { 0, 9000 }, 1200, (int) TierEU.RECIPE_LV, false); diff --git a/src/main/java/gregtech/loaders/postload/recipes/BenderRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/BenderRecipes.java index 2ccdd50362..614632bb42 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/BenderRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/BenderRecipes.java @@ -1,13 +1,15 @@ package gregtech.loaders.postload.recipes; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class BenderRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addBenderRecipe( @@ -175,7 +177,10 @@ public class BenderRecipes implements Runnable { // cell, bucket, food can GT_Values.RA.addBenderRecipe( - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 12L), ItemList.Cell_Empty.get(6L), 1200, 8); + 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), diff --git a/src/main/java/gregtech/loaders/postload/recipes/BlastFurnaceRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/BlastFurnaceRecipes.java index 3ca6d6408d..0d7d761880 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/BlastFurnaceRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/BlastFurnaceRecipes.java @@ -4,15 +4,17 @@ import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isGTNHLanthanidLoaded; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isGTPPLoaded; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.GT_Mod; import gregtech.api.enums.*; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class BlastFurnaceRecipes implements Runnable { + @Override public void run() { @@ -536,12 +538,8 @@ public class BlastFurnaceRecipes implements Runnable { (int) TierEU.RECIPE_HV, 1688); - ItemStack[] tSiliconDioxide = new ItemStack[] { - Materials.SiliconDioxide.getDust(3), - Materials.NetherQuartz.getDust(3), - Materials.CertusQuartz.getDust(3), - Materials.Quartzite.getDust(6) - }; + ItemStack[] tSiliconDioxide = new ItemStack[] { Materials.SiliconDioxide.getDust(3), + Materials.NetherQuartz.getDust(3), Materials.CertusQuartz.getDust(3), Materials.Quartzite.getDust(6) }; // Roasting @@ -664,12 +662,32 @@ public class BlastFurnaceRecipes implements Runnable { public void primitiveBlastFurnaceRecipes() { GT_Values.RA.addPrimitiveBlastRecipe( - Materials.Iron.getIngots(1), GT_Values.NI, 4, Materials.Steel.getIngots(1), GT_Values.NI, 7200); + 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); + 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); + 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); + Materials.Steel.getDust(1), + GT_Values.NI, + 2, + Materials.Steel.getIngots(1), + GT_Values.NI, + 7200); } } diff --git a/src/main/java/gregtech/loaders/postload/recipes/BreweryRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/BreweryRecipes.java index ed9f8de513..338061f926 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/BreweryRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/BreweryRecipes.java @@ -3,17 +3,19 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.util.GT_ModHandler.getModItem; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.loaders.postload.GT_MachineRecipeLoader; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.loaders.postload.GT_MachineRecipeLoader; + public class BreweryRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addBrewingRecipe( @@ -46,9 +48,7 @@ public class BreweryRecipes implements Runnable { FluidRegistry.getFluid("seedoil"), FluidRegistry.getFluid("lubricant"), false); - for (Fluid tFluid : new Fluid[] { - FluidRegistry.WATER, GT_ModHandler.getDistilledWater(1L).getFluid() - }) { + 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, @@ -100,30 +100,60 @@ public class BreweryRecipes implements Runnable { FluidRegistry.getFluid("potion.mundane"), false); GT_Values.RA.addBrewingRecipe( - new ItemStack(Items.magma_cream, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + new ItemStack(Items.apple, 1, 0), + tFluid, + FluidRegistry.getFluid("potion.applejuice"), + false); GT_Values.RA.addBrewingRecipe( new ItemStack(Items.golden_apple, 1, 0), tFluid, @@ -135,7 +165,10 @@ public class BreweryRecipes implements Runnable { FluidRegistry.getFluid("potion.idunsapplejuice"), true); GT_Values.RA.addBrewingRecipe( - ItemList.IC2_Hops.get(1L), tFluid, FluidRegistry.getFluid("potion.hopsjuice"), false); + ItemList.IC2_Hops.get(1L), + tFluid, + FluidRegistry.getFluid("potion.hopsjuice"), + false); GT_Values.RA.addBrewingRecipe( GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L), tFluid, @@ -367,7 +400,10 @@ public class BreweryRecipes implements Runnable { public void addPotionRecipes(String aName, ItemStack aItem) { // normal GT_Values.RA.addBrewingRecipe( - aItem, FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion." + aName), false); + aItem, + FluidRegistry.getFluid("potion.awkward"), + FluidRegistry.getFluid("potion." + aName), + false); // strong GT_Values.RA.addBrewingRecipe( aItem, diff --git a/src/main/java/gregtech/loaders/postload/recipes/CannerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/CannerRecipes.java index 42fdc1f852..1971fd6a6b 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/CannerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/CannerRecipes.java @@ -8,6 +8,7 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; public class CannerRecipes implements Runnable { + @Override public void run() { // fuel rod canner recipes diff --git a/src/main/java/gregtech/loaders/postload/recipes/CentrifugeRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/CentrifugeRecipes.java index ca2f9f4b36..61db0d4cae 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/CentrifugeRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/CentrifugeRecipes.java @@ -6,16 +6,18 @@ import static gregtech.loaders.postload.GT_MachineRecipeLoader.isExtraUtilitiesL import static gregtech.loaders.postload.GT_MachineRecipeLoader.isThaumcraftLoaded; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class CentrifugeRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addCentrifugeRecipe( @@ -29,7 +31,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {10000, 10000, 9000}, + new int[] { 10000, 10000, 9000 }, 400, (int) TierEU.RECIPE_MV); @@ -59,7 +61,7 @@ public class CentrifugeRecipes implements Runnable { 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}, + new int[] { 10000, 10000, 10000, 9500, 9000, 8500 }, 8100, 30); @@ -74,7 +76,7 @@ public class CentrifugeRecipes implements Runnable { Materials.Tin.getDust(1), Materials.Nickel.getDust(1), Materials.Antimony.getDust(1), - new int[] {10000, 4000, 2000, 2000, 2000, 2000}, + new int[] { 10000, 4000, 2000, 2000, 2000, 2000 }, 40, (int) TierEU.RECIPE_MV); @@ -596,7 +598,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {5000, 100, 5000}, + new int[] { 5000, 100, 5000 }, 600, (int) TierEU.RECIPE_MV); GT_Values.RA.addCentrifugeRecipe( @@ -610,7 +612,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {1250, 5000, 5000}, + new int[] { 1250, 5000, 5000 }, 250, 30); GT_Values.RA.addCentrifugeRecipe( @@ -624,7 +626,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {2500, 5000, 5000}, + new int[] { 2500, 5000, 5000 }, 250, 30); GT_Values.RA.addCentrifugeRecipe( @@ -638,7 +640,7 @@ public class CentrifugeRecipes implements Runnable { new ItemStack(Blocks.sand, 1), GT_Values.NI, GT_Values.NI, - new int[] {2500, 2500, 5000, 5000}, + new int[] { 2500, 2500, 5000, 5000 }, 650, 30); GT_Values.RA.addCentrifugeRecipe( @@ -652,7 +654,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {10000, 1000}, + new int[] { 10000, 1000 }, 300, 5); GT_Values.RA.addCentrifugeRecipe( @@ -686,7 +688,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {2000, 200}, + new int[] { 2000, 200 }, 800, 320); GT_Values.RA.addCentrifugeRecipe( @@ -700,7 +702,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {2000, 3000}, + new int[] { 2000, 3000 }, 1600, 320); GT_Values.RA.addCentrifugeRecipe( @@ -714,7 +716,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {5000, 1000}, + new int[] { 5000, 1000 }, 28800, 320); GT_Values.RA.addCentrifugeRecipe( @@ -728,7 +730,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {2000, 3000}, + new int[] { 2000, 3000 }, 25600, 640); GT_Values.RA.addCentrifugeRecipe( @@ -799,7 +801,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {3750, 2500, 9000, 0, 0, 0}, + new int[] { 3750, 2500, 9000, 0, 0, 0 }, 11520, 20); GT_Values.RA.addCentrifugeRecipe( @@ -813,7 +815,7 @@ public class CentrifugeRecipes implements Runnable { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_Values.NI, GT_Values.NI, - new int[] {5625, 9900, 5625, 2500, 0, 0}, + new int[] { 5625, 9900, 5625, 2500, 0, 0 }, 5760, 20); @@ -828,7 +830,7 @@ public class CentrifugeRecipes implements Runnable { Materials.Gold.getNuggets(4), Materials.Sapphire.getDust(1), Materials.Tantalite.getDust(1), - new int[] {5000, 1000, 1000, 250, 1250, 500}, + new int[] { 5000, 1000, 1000, 250, 1250, 500 }, 320, 80); GT_Values.RA.addCentrifugeRecipe( @@ -842,7 +844,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {1000, 700, 9000, 0, 0, 0}, + new int[] { 1000, 700, 9000, 0, 0, 0 }, 200, 12); @@ -857,7 +859,7 @@ public class CentrifugeRecipes implements Runnable { 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}, + new int[] { 2000, 1000, 250, 50, 250, 500 }, 40, 1024); GT_Values.RA.addCentrifugeRecipe( @@ -871,7 +873,7 @@ public class CentrifugeRecipes implements Runnable { 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}, + new int[] { 2000, 4000, 1000, 200, 2250, 4500 }, 328, 4096); @@ -887,7 +889,7 @@ public class CentrifugeRecipes implements Runnable { 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}, + new int[] { 2500, 2500, 2500, 2500, 2500, 2500 }, 64, 20); @@ -902,7 +904,7 @@ public class CentrifugeRecipes implements Runnable { 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}, + new int[] { 2000, 2000, 2000, 2000, 2000, 2000 }, 64, 20); GT_Values.RA.addCentrifugeRecipe( @@ -916,7 +918,7 @@ public class CentrifugeRecipes implements Runnable { 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}, + new int[] { 9000, 9000, 9000, 9000, 9000, 9000 }, 518, 80); @@ -932,7 +934,7 @@ public class CentrifugeRecipes implements Runnable { Materials.PhosphorousPentoxide.getDust(2), Materials.SodaAsh.getDust(1), Materials.BandedIron.getDust(4), - new int[] {6400, 6000, 4500, 10000, 10000, 10000}, + new int[] { 6400, 6000, 4500, 10000, 10000, 10000 }, 6000, 30); // Stone Dust and Metal Mixture centrifuge recipes @@ -947,7 +949,7 @@ public class CentrifugeRecipes implements Runnable { Materials.Biotite.getDust(4), Materials.MetalMixture.getDust(3), Materials.Sodalite.getDust(2), - new int[] {10000, 10000, 10000, 10000, 10000, 10000}, + new int[] { 10000, 10000, 10000, 10000, 10000, 10000 }, 8640, 30); GT_Values.RA.addCentrifugeRecipe( @@ -961,7 +963,7 @@ public class CentrifugeRecipes implements Runnable { Materials.Barite.getDust(4), Materials.Chromite.getDust(3), Materials.Ilmenite.getDust(2), - new int[] {10000, 10000, 10000, 10000, 10000, 10000}, + new int[] { 10000, 10000, 10000, 10000, 10000, 10000 }, 13125, (int) TierEU.RECIPE_EV); @@ -1005,7 +1007,7 @@ public class CentrifugeRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {10000, 10000}, + new int[] { 10000, 10000 }, 600, 2000000); diff --git a/src/main/java/gregtech/loaders/postload/recipes/ChemicalBathRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ChemicalBathRecipes.java index 7d11e4c315..5e33922990 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ChemicalBathRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ChemicalBathRecipes.java @@ -3,15 +3,17 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.enums.GT_Values.MOD_ID_RC; import static gregtech.api.util.GT_ModHandler.getModItem; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class ChemicalBathRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addChemicalBathRecipe( @@ -761,7 +763,7 @@ public class ChemicalBathRecipes implements Runnable { 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}, + new int[] { 10000, 3000, 4000 }, 800, 8); GT_Values.RA.addChemicalBathRecipe( @@ -770,7 +772,7 @@ public class ChemicalBathRecipes implements Runnable { 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}, + new int[] { 10000, 7000, 4000 }, 800, 8); GT_Values.RA.addChemicalBathRecipe( @@ -779,7 +781,7 @@ public class ChemicalBathRecipes implements Runnable { 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}, + new int[] { 10000, 3000, 4000 }, 800, 8); GT_Values.RA.addChemicalBathRecipe( @@ -788,7 +790,7 @@ public class ChemicalBathRecipes implements Runnable { 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}, + new int[] { 10000, 7000, 4000 }, 800, 8); GT_Values.RA.addChemicalBathRecipe( @@ -797,7 +799,7 @@ public class ChemicalBathRecipes implements Runnable { 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}, + new int[] { 10000, 5000, 4000 }, 800, 8); GT_Values.RA.addChemicalBathRecipe( @@ -806,7 +808,7 @@ public class ChemicalBathRecipes implements Runnable { 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}, + new int[] { 10000, 3000, 4000 }, 800, 8); GT_Values.RA.addChemicalBathRecipe( @@ -815,7 +817,7 @@ public class ChemicalBathRecipes implements Runnable { 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}, + new int[] { 10000, 5000, 4000 }, 800, 8); diff --git a/src/main/java/gregtech/loaders/postload/recipes/ChemicalRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ChemicalRecipes.java index 4ae3797f97..80e003d26d 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ChemicalRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ChemicalRecipes.java @@ -5,10 +5,6 @@ import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.*; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -16,6 +12,11 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + public class ChemicalRecipes implements Runnable { @Override @@ -238,9 +239,7 @@ public class ChemicalRecipes implements Runnable { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Potassium, 1), 5760); - for (Fluid tFluid : new Fluid[] { - FluidRegistry.WATER, GT_ModHandler.getDistilledWater(1L).getFluid() - }) { + for (Fluid tFluid : new Fluid[] { FluidRegistry.WATER, GT_ModHandler.getDistilledWater(1L).getFluid() }) { GT_Values.RA.addChemicalRecipe( GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), @@ -525,9 +524,9 @@ public class ChemicalRecipes implements Runnable { 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[] { GT_Utility.getIntegratedCircuit(22) }, + new FluidStack[] { Materials.Hydrogen.getGas(16000), Materials.Oxygen.getGas(8000) }, + new FluidStack[] { GT_ModHandler.getDistilledWater(8000) }, new ItemStack[] {}, 80, 30); @@ -829,7 +828,10 @@ public class ChemicalRecipes implements Runnable { // 2Na + S = Na2S GT_Values.RA.addChemicalRecipe( - Materials.Sodium.getDust(2), Materials.Sulfur.getDust(1), Materials.SodiumSulfide.getDust(3), 60); + 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), @@ -3441,10 +3443,14 @@ public class ChemicalRecipes implements Runnable { public void polymerizationRecipes() { GT_Values.RA.addDefaultPolymerizationRecipes( - Materials.VinylAcetate.mFluid, Materials.VinylAcetate.getCells(1), Materials.PolyvinylAcetate.mFluid); + Materials.VinylAcetate.mFluid, + Materials.VinylAcetate.getCells(1), + Materials.PolyvinylAcetate.mFluid); GT_Values.RA.addDefaultPolymerizationRecipes( - Materials.Ethylene.mGas, Materials.Ethylene.getCells(1), Materials.Plastic.mStandardMoltenFluid); + Materials.Ethylene.mGas, + Materials.Ethylene.getCells(1), + Materials.Plastic.mStandardMoltenFluid); GT_Values.RA.addDefaultPolymerizationRecipes( Materials.Tetrafluoroethylene.mGas, @@ -3457,7 +3463,9 @@ public class ChemicalRecipes implements Runnable { Materials.PolyvinylChloride.mStandardMoltenFluid); GT_Values.RA.addDefaultPolymerizationRecipes( - Materials.Styrene.mFluid, Materials.Styrene.getCells(1), Materials.Polystyrene.mStandardMoltenFluid); + Materials.Styrene.mFluid, + Materials.Styrene.getCells(1), + Materials.Polystyrene.mStandardMoltenFluid); } public void singleBlockOnly() { @@ -3853,482 +3861,374 @@ public class ChemicalRecipes implements Runnable { public void multiblockOnly() { GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] {Materials.PotassiumNitrade.getDust(10), Materials.ChromiumTrioxide.getDust(8)}, + 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)}, + 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)}, + 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)}, + new FluidStack[] { Materials.NitricOxide.getGas(2000), Materials.Oxygen.getGas(3000) }, + new ItemStack[] { Materials.Potassiumdichromate.getDust(11) }, 100, 480); // Potassium Dichromate shortcut // 2 Cr + 6O + 10 Saltpeter/Potassium Dichromate = 10 K2Cr2O7 + 2NO + 3O GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] { - Materials.PotassiumNitrade.getDust(64), - Materials.PotassiumNitrade.getDust(64), - Materials.PotassiumNitrade.getDust(32), - Materials.Chrome.getDust(2 * 16), - GT_Utility.getIntegratedCircuit(11) - }, - new FluidStack[] {Materials.Oxygen.getGas(6000 * 16)}, - new FluidStack[] {Materials.NitricOxide.getGas(2000 * 16), Materials.Oxygen.getGas(3000 * 16)}, - new ItemStack[] { - Materials.Potassiumdichromate.getDust(64), - Materials.Potassiumdichromate.getDust(64), - Materials.Potassiumdichromate.getDust(48) - }, + new ItemStack[] { Materials.PotassiumNitrade.getDust(64), Materials.PotassiumNitrade.getDust(64), + Materials.PotassiumNitrade.getDust(32), Materials.Chrome.getDust(2 * 16), + GT_Utility.getIntegratedCircuit(11) }, + new FluidStack[] { Materials.Oxygen.getGas(6000 * 16) }, + new FluidStack[] { Materials.NitricOxide.getGas(2000 * 16), Materials.Oxygen.getGas(3000 * 16) }, + new ItemStack[] { Materials.Potassiumdichromate.getDust(64), Materials.Potassiumdichromate.getDust(64), + Materials.Potassiumdichromate.getDust(48) }, 2560, (int) GT_Values.VP[7]); GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] { - Materials.Saltpeter.getDust(64), - Materials.Saltpeter.getDust(64), - Materials.Saltpeter.getDust(32), - Materials.Chrome.getDust(2 * 16), - GT_Utility.getIntegratedCircuit(11) - }, - new FluidStack[] {Materials.Oxygen.getGas(6000 * 16)}, - new FluidStack[] {Materials.NitricOxide.getGas(2000 * 16), Materials.Oxygen.getGas(3000 * 16)}, - new ItemStack[] { - Materials.Potassiumdichromate.getDust(64), - Materials.Potassiumdichromate.getDust(64), - Materials.Potassiumdichromate.getDust(48) - }, + new ItemStack[] { Materials.Saltpeter.getDust(64), Materials.Saltpeter.getDust(64), + Materials.Saltpeter.getDust(32), Materials.Chrome.getDust(2 * 16), + GT_Utility.getIntegratedCircuit(11) }, + new FluidStack[] { Materials.Oxygen.getGas(6000 * 16) }, + new FluidStack[] { Materials.NitricOxide.getGas(2000 * 16), Materials.Oxygen.getGas(3000 * 16) }, + new ItemStack[] { Materials.Potassiumdichromate.getDust(64), Materials.Potassiumdichromate.getDust(64), + Materials.Potassiumdichromate.getDust(48) }, 2560, (int) GT_Values.VP[7]); 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)}, + 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); 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)}, + 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.addMultiblockChemicalRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(9), - GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pentlandite, 9) - }, - new FluidStack[] {Materials.SulfuricAcid.getFluid(9000L)}, - new FluidStack[] {new FluidStack(ItemList.sNickelSulfate, 18000)}, - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 1)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pentlandite, 9) }, + new FluidStack[] { Materials.SulfuricAcid.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.SulfuricAcid.getFluid(9000L)}, - new FluidStack[] {new FluidStack(ItemList.sBlueVitriol, 18000)}, - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 1)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 9) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid(9000L) }, + new FluidStack[] { new FluidStack(ItemList.sBlueVitriol, 18000) }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 1) }, 25, 480); 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)}, + 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); // 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) - }, + 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 10) }, 10, 120); // 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) - }, + 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); // 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) - }, + 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) - }, + 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); // 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)}, + 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)}, + 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.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)}, + 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)}, + 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); // 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)}, + 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); - 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); + 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); // 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) - }, + 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) - }, + 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); // 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_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) - }, + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 64L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 48L) }, 400, 1920); // 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) - }, + 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) - }, + 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); 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)}, + 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); 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)}, + 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.addMultiblockChemicalRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(9), - GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIIHydroxide, 45L) - }, - new FluidStack[] {MaterialsKevlar.NaphthenicAcid.getFluid(10000L)}, - new FluidStack[] { - GT_Values.NF, - }, - new ItemStack[] { - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(49), - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIIHydroxide, 45L) }, + new FluidStack[] { MaterialsKevlar.NaphthenicAcid.getFluid(10000L) }, + new FluidStack[] { GT_Values.NF, }, + new ItemStack[] { MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(49), }, 200, 1920); GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(9), - GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIIAcetate, 64L), - GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIIAcetate, 64L), - GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIIAcetate, 7L) - }, - new FluidStack[] {MaterialsKevlar.NaphthenicAcid.getFluid(10000L)}, - new FluidStack[] { - Materials.AceticAcid.getFluid(15000L), - }, - new ItemStack[] { - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(64), - MaterialsKevlar.CobaltIINaphthenate.getDust(49), - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIIAcetate, 64L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIIAcetate, 64L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIIAcetate, 7L) }, + new FluidStack[] { MaterialsKevlar.NaphthenicAcid.getFluid(10000L) }, + new FluidStack[] { Materials.AceticAcid.getFluid(15000L), }, + new ItemStack[] { MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(64), + MaterialsKevlar.CobaltIINaphthenate.getDust(49), }, 200, 1920); // 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) - }, + 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)}, + new ItemStack[] { MaterialsKevlar.Triphenylphosphene.getDust(34), Materials.Salt.getDust(12) }, 400, 1920); // 4NaH + C3H9BO3 = NaBH4 + 3CH3ONa GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] {GT_Utility.getIntegratedCircuit(1), MaterialsKevlar.SodiumHydride.getDust(8)}, - new FluidStack[] {MaterialsKevlar.TrimethylBorate.getFluid(1000L)}, + 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) - }, + 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)}, + 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) - }, + new ItemStack[] { MaterialsKevlar.SodiumBorohydride.getDust(48), + MaterialsKevlar.SodiumMethoxide.getDust(64), MaterialsKevlar.SodiumMethoxide.getDust(64), + MaterialsKevlar.SodiumMethoxide.getDust(16) }, 600, 1920); // 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) - }, + 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) - }, + 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) - }, + 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); // 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)}, + 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); @@ -4336,610 +4236,530 @@ public class ChemicalRecipes implements Runnable { // 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)}, + 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)}, + 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.addMultiblockChemicalRecipe( - new ItemStack[] {GT_Utility.getIntegratedCircuit(8)}, - new FluidStack[] {Materials.Hydrogen.getGas(9000), Materials.Chlorine.getGas(9000)}, - new FluidStack[] {Materials.HydrochloricAcid.getFluid(9000)}, + 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); 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)}, + 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); // 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) - }, + 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) - }, + 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) - }, + 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.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)}, + 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); GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] {Materials.Phosphorus.getDust(4), GT_Utility.getIntegratedCircuit(1)}, - new FluidStack[] {Materials.Oxygen.getGas(10000)}, + new ItemStack[] { Materials.Phosphorus.getDust(4), GT_Utility.getIntegratedCircuit(1) }, + new FluidStack[] { Materials.Oxygen.getGas(10000) }, null, - new ItemStack[] {Materials.PhosphorousPentoxide.getDust(14)}, + new ItemStack[] { Materials.PhosphorousPentoxide.getDust(14) }, 40, 30); // 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)}, + 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); 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)}, + 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); 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)}, + 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); 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)}, + 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); 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)}, + 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); 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)}, + 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); 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) - }, + 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.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)}, + 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)}, + 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.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}, + 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); // 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)}, + 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)}, + 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); 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)}, + 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)}, + 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); 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(9000)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(9) }, + new FluidStack[] { Materials.NitricOxide.getGas(9000), Materials.Oxygen.getGas(9000) }, + new FluidStack[] { Materials.NitrogenDioxide.getGas(9000) }, null, 80, 480); 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)}, + 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); 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)}, + 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)}, + 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)}, + 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); 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)}, + 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); 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)}, + 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); 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)}, + 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)}, + 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); GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] {GT_Utility.getIntegratedCircuit(7)}, - new FluidStack[] {Materials.SulfurDioxide.getGas(9000), Materials.HydricSulfide.getGas(18000)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(7) }, + new FluidStack[] { Materials.SulfurDioxide.getGas(9000), Materials.HydricSulfide.getGas(18000) }, null, - new ItemStack[] {Materials.Sulfur.getDust(27)}, + new ItemStack[] { Materials.Sulfur.getDust(27) }, 60, 480); 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)}, + 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); // S + O3 + H2O = H2SO4 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)}, + 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)}, + 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); // H2S + O4 = H2SO4 GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, - new FluidStack[] {Materials.HydricSulfide.getGas(1000), Materials.Oxygen.getGas(4000)}, - new FluidStack[] {Materials.SulfuricAcid.getFluid(1000)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(24) }, + new FluidStack[] { Materials.HydricSulfide.getGas(1000), Materials.Oxygen.getGas(4000) }, + new FluidStack[] { Materials.SulfuricAcid.getFluid(1000) }, null, 480, 30); // SO2 + O + H2O = H2SO4 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)}, + 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)}, + 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.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)}, + 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)}, + 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.addMultiblockChemicalRecipe( - new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[] { - Materials.Isoprene.getFluid(1728), - Materials.Air.getGas(6000), - Materials.Titaniumtetrachloride.getFluid(80) - }, + 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)}, + 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) - }, + 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)}, + new ItemStack[] { Materials.RawRubber.getDust(24) }, 640, 30); GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] {GT_Utility.getIntegratedCircuit(3)}, - new FluidStack[] { - Materials.Styrene.getFluid(36), Materials.Butadiene.getGas(108), Materials.Air.getGas(2000) - }, + 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)}, + 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) - }, + 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)}, + 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) - }, + 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) - }, + 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) - }, + 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)}, + new ItemStack[] { Materials.RawStyreneButadieneRubber.getDust(30) }, 640, 240); 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)}, + 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); 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)}, + 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); 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) - }, + 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)}, + 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)}, + 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)}, + 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)}, + 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), GT_ModHandler.getDistilledWater(10000)}, - new FluidStack[] {Materials.CarbonDioxide.getGas(5000), Materials.Hydrogen.getGas(40000)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(11) }, + new FluidStack[] { Materials.Methane.getGas(5000), GT_ModHandler.getDistilledWater(10000) }, + new FluidStack[] { Materials.CarbonDioxide.getGas(5000), Materials.Hydrogen.getGas(40000) }, null, 200, 480); // CH4 + H2O = CO + 6H GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] {GT_Utility.getIntegratedCircuit(12)}, - new FluidStack[] {Materials.Methane.getGas(5000), GT_ModHandler.getDistilledWater(5000)}, - new FluidStack[] {Materials.CarbonMonoxide.getGas(5000), Materials.Hydrogen.getGas(30000)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(12) }, + new FluidStack[] { Materials.Methane.getGas(5000), GT_ModHandler.getDistilledWater(5000) }, + new FluidStack[] { Materials.CarbonMonoxide.getGas(5000), Materials.Hydrogen.getGas(30000) }, null, 200, 480); 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}, + 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.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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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); 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)}, + 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); @@ -4947,350 +4767,263 @@ public class ChemicalRecipes implements Runnable { if (isGTNHLanthanidLoaded && isGTPPLoaded) { // 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)}, + 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) - }, + 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.addMultiblockChemicalRecipe( - new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, - new FluidStack[] { - Materials.Benzene.getFluid(5000), - Materials.SulfuricAcid.getFluid(3000), - Materials.NitricAcid.getFluid(5000), - GT_ModHandler.getDistilledWater(10000) - }, - new FluidStack[] { - new FluidStack(FluidRegistry.getFluid("nitrobenzene"), 5000), - Materials.DilutedSulfuricAcid.getFluid(3000) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1) }, + new FluidStack[] { Materials.Benzene.getFluid(5000), Materials.SulfuricAcid.getFluid(3000), + Materials.NitricAcid.getFluid(5000), GT_ModHandler.getDistilledWater(10000) }, + new FluidStack[] { new FluidStack(FluidRegistry.getFluid("nitrobenzene"), 5000), + Materials.DilutedSulfuricAcid.getFluid(3000) }, null, 8, 122880); // 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)}, + 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); 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)}, + 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) - }, + 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)}, + 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) - }, + 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)}, + 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)}, + 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)}, + 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) - }, + 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) - }, + 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_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) - }, + 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) - }, + 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) - }, + 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); // 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) - }, + 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)}, + 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) - }, + 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) - }, + 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); + 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); GT_Values.RA.addMultiblockChemicalRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(1), - getModItem(MOD_ID_GTPP, "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) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1), + getModItem(MOD_ID_GTPP, "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), - getModItem(MOD_ID_GTPP, "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) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(9), + getModItem(MOD_ID_GTPP, "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); // 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)}, + 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) - }, + 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) - }, + 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) - }, + 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)}, + 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)}, + 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); } diff --git a/src/main/java/gregtech/loaders/postload/recipes/CircuitAssemblerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/CircuitAssemblerRecipes.java index 1c951dbff0..a65945145b 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/CircuitAssemblerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/CircuitAssemblerRecipes.java @@ -5,187 +5,157 @@ import static gregtech.api.enums.GT_Values.MOD_ID_RC; import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isRailcraftLoaded; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.*; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.item.ItemStack; public class CircuitAssemblerRecipes implements Runnable { + @Override public void run() { 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 0), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 0), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 1), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 2), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 3), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 3), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 4), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 5), 200, (int) TierEU.RECIPE_LV); 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), - getModItem(MOD_ID_DC, "item.LongObsidianRod", 2L, 0) - }, + 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), + getModItem(MOD_ID_DC, "item.LongObsidianRod", 2L, 0) }, Materials.Glass.getMolten(576L), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 6), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 7), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 8), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 9), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 10), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 11), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 12), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 13), 200, @@ -194,97 +164,78 @@ public class CircuitAssemblerRecipes implements Runnable { if (!isRailcraftLoaded) return; for (Materials tMat : Materials.values()) { if (tMat.isProperSolderingFluid()) { - int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) - ? 1 + int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; // 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) - }, + 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), getModItem(MOD_ID_RC, "part.circuit", 4L, 0), 300, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(MOD_ID_RC, "part.circuit", 4L, 1), 300, (int) TierEU.RECIPE_LV); GT_Values.RA.addCircuitAssemblerRecipe( - new ItemStack[] { - ItemList.Circuit_Board_Coated_Basic.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), - getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) - }, + new ItemStack[] { ItemList.Circuit_Board_Coated_Basic.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), + getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) }, tMat.getMolten(144L * tMultiplier / 2L), getModItem(MOD_ID_RC, "part.circuit", 4L, 2), 300, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(MOD_ID_RC, "part.circuit", 8L, 0), 400, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(MOD_ID_RC, "part.circuit", 8L, 1), 400, (int) TierEU.RECIPE_LV); GT_Values.RA.addCircuitAssemblerRecipe( - new ItemStack[] { - ItemList.Circuit_Board_Phenolic_Good.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), - getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) - }, + new ItemStack[] { ItemList.Circuit_Board_Phenolic_Good.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), + getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) }, tMat.getMolten(144L * tMultiplier / 2L), getModItem(MOD_ID_RC, "part.circuit", 8L, 2), 400, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(MOD_ID_RC, "part.circuit", 16L, 0), 500, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem(MOD_ID_RC, "part.circuit", 16L, 1), 500, (int) TierEU.RECIPE_LV); GT_Values.RA.addCircuitAssemblerRecipe( - new ItemStack[] { - ItemList.Circuit_Board_Epoxy_Advanced.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), - getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) - }, + new ItemStack[] { ItemList.Circuit_Board_Epoxy_Advanced.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), + getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) }, tMat.getMolten(144L * tMultiplier / 2L), getModItem(MOD_ID_RC, "part.circuit", 16L, 2), 500, @@ -294,57 +245,48 @@ public class CircuitAssemblerRecipes implements Runnable { for (Materials tMat : Materials.values()) { if (tMat.isProperSolderingFluid()) { - int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) - ? 1 + 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) - }, + 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), getModItem("Forestry", "chipsets", 1L, 0), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem("Forestry", "chipsets", 1L, 1), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem("Forestry", "chipsets", 1L, 2), 200, (int) TierEU.RECIPE_LV); 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) - }, + 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), getModItem("Forestry", "chipsets", 1L, 3), 200, diff --git a/src/main/java/gregtech/loaders/postload/recipes/CompressorRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/CompressorRecipes.java index 8ac4b388c4..c0fd11017d 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/CompressorRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/CompressorRecipes.java @@ -5,6 +5,13 @@ import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isEBXLLoaded; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isRailcraftLoaded; +import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; +import mods.railcraft.common.items.RailcraftToolItems; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -13,20 +20,20 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; -import mods.railcraft.common.items.RailcraftToolItems; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class CompressorRecipes implements Runnable { + @Override public void run() { GT_ModHandler.addCompressionRecipe( - getModItem(MOD_ID_GTPP, "blockRainforestOakSapling", 8, 0), ItemList.IC2_Plantball.get(1)); + getModItem(MOD_ID_GTPP, "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); + 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)); @@ -44,7 +51,8 @@ public class CompressorRecipes implements Runnable { 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_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), + new ItemStack(Blocks.ice, 1, 0)); GT_ModHandler.addCompressionRecipe( GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 4L), getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockQuartz", 1L)); @@ -68,31 +76,44 @@ public class CompressorRecipes implements Runnable { if (isEBXLLoaded) { GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 0), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 0), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 1), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 1), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 2), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 2), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 3), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 3), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 4), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 4), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 5), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 5), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 6), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 6), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 7), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 7), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 0), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 0), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 1), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 1), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 2), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 2), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 3), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 3), + ItemList.IC2_Plantball.get(1)); GT_ModHandler.addCompressionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 4), ItemList.IC2_Plantball.get(1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 4), + ItemList.IC2_Plantball.get(1)); } if (isRailcraftLoaded) { GT_Values.RA.addCompressorRecipe(RailcraftToolItems.getCoalCoke(9), EnumCube.COKE_BLOCK.getItem(), 300, 2); diff --git a/src/main/java/gregtech/loaders/postload/recipes/CropProcessingRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/CropProcessingRecipes.java index 714ca596c1..b4913e52c5 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/CropProcessingRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/CropProcessingRecipes.java @@ -1,5 +1,7 @@ package gregtech.loaders.postload.recipes; +import net.minecraft.item.ItemStack; + import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -7,9 +9,9 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; public class CropProcessingRecipes implements Runnable { + @Override public void run() { ItemStack tCrop; @@ -117,9 +119,7 @@ public class CropProcessingRecipes implements Runnable { 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), + aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96, 24); @@ -131,12 +131,11 @@ public class CropProcessingRecipes implements Runnable { (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); } } @@ -148,9 +147,7 @@ public class CropProcessingRecipes implements Runnable { 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), + aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96, 24); @@ -170,8 +167,8 @@ public class CropProcessingRecipes implements Runnable { } } - public void addProcess( - ItemStack tCrop, Materials aMaterial, Materials aMaterialOut, int chance, boolean aMainOutput) { + 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) { @@ -179,9 +176,7 @@ public class CropProcessingRecipes implements Runnable { 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), + aMaterialOut.mOreByProducts.isEmpty() ? null : aMaterialOut.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), 96, 24); @@ -193,12 +188,11 @@ public class CropProcessingRecipes implements Runnable { (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); } } @@ -210,9 +204,7 @@ public class CropProcessingRecipes implements Runnable { 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), + aMaterialOut.mOreByProducts.isEmpty() ? null : aMaterialOut.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), 96, 24); diff --git a/src/main/java/gregtech/loaders/postload/recipes/CuttingRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/CuttingRecipes.java index 1bdd2d7fe2..8371f13158 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/CuttingRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/CuttingRecipes.java @@ -3,65 +3,55 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isForestryloaded; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import codechicken.nei.api.API; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; public class CuttingRecipes implements Runnable { + @Override public void run() { 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) - }, + 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, (int) TierEU.RECIPE_LV, false); 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) - }, + 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, (int) TierEU.RECIPE_MV, true); 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) - }, + 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, (int) TierEU.RECIPE_HV, true); 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) - }, + 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, (int) TierEU.RECIPE_EV, true); 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) - }, + 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, (int) TierEU.RECIPE_IV, true); @@ -88,7 +78,11 @@ public class CuttingRecipes implements Runnable { 8); } GT_Values.RA.addCutterRecipe( - new ItemStack(Blocks.glass, 3, 0), new ItemStack(Blocks.glass_pane, 8, 0), GT_Values.NI, 50, 8); + new ItemStack(Blocks.glass, 3, 0), + new ItemStack(Blocks.glass_pane, 8, 0), + GT_Values.NI, + 50, + 8); GT_Values.RA.addCutterRecipe( getModItem("TConstruct", "GlassBlock", 3L, 0), getModItem("TConstruct", "GlassPane", 8L, 0), @@ -96,17 +90,41 @@ public class CuttingRecipes implements Runnable { 50, 8); GT_Values.RA.addCutterRecipe( - new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.stone_slab, 2, 0), GT_Values.NI, 25, 8); + 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); + 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); + 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); + 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); + 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); + 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), @@ -122,47 +140,58 @@ public class CuttingRecipes implements Runnable { 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); + 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); + 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); + 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); + 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); + 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); + 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); + new ItemStack(Blocks.wooden_slab, 1, 5), + ItemList.Plank_DarkOak.get(2L), + GT_Values.NI, + 50, + 8); - ItemStack[] coverIDs = { - ItemList.Plank_Larch.get(2L), - ItemList.Plank_Teak.get(2L), - ItemList.Plank_Acacia_Green.get(2L), - ItemList.Plank_Lime.get(2L), - ItemList.Plank_Chestnut.get(2L), - ItemList.Plank_Wenge.get(2L), - ItemList.Plank_Baobab.get(2L), - ItemList.Plank_Sequoia.get(2L), - ItemList.Plank_Kapok.get(2L), - ItemList.Plank_Ebony.get(2L), - ItemList.Plank_Mahagony.get(2L), - ItemList.Plank_Balsa.get(2L), - ItemList.Plank_Willow.get(2L), - ItemList.Plank_Walnut.get(2L), - ItemList.Plank_Greenheart.get(2L), - ItemList.Plank_Cherry.get(2L), - ItemList.Plank_Mahoe.get(2L), - ItemList.Plank_Poplar.get(2L), - ItemList.Plank_Palm.get(2L), - ItemList.Plank_Papaya.get(2L), - ItemList.Plank_Pine.get(2L), - ItemList.Plank_Plum.get(2L), - ItemList.Plank_Maple.get(2L), - ItemList.Plank_Citrus.get(2L) - }; + ItemStack[] coverIDs = { ItemList.Plank_Larch.get(2L), ItemList.Plank_Teak.get(2L), + ItemList.Plank_Acacia_Green.get(2L), ItemList.Plank_Lime.get(2L), ItemList.Plank_Chestnut.get(2L), + ItemList.Plank_Wenge.get(2L), ItemList.Plank_Baobab.get(2L), ItemList.Plank_Sequoia.get(2L), + ItemList.Plank_Kapok.get(2L), ItemList.Plank_Ebony.get(2L), ItemList.Plank_Mahagony.get(2L), + ItemList.Plank_Balsa.get(2L), ItemList.Plank_Willow.get(2L), ItemList.Plank_Walnut.get(2L), + ItemList.Plank_Greenheart.get(2L), ItemList.Plank_Cherry.get(2L), ItemList.Plank_Mahoe.get(2L), + ItemList.Plank_Poplar.get(2L), ItemList.Plank_Palm.get(2L), ItemList.Plank_Papaya.get(2L), + ItemList.Plank_Pine.get(2L), ItemList.Plank_Plum.get(2L), ItemList.Plank_Maple.get(2L), + ItemList.Plank_Citrus.get(2L) }; int i = 0; for (ItemStack cover : coverIDs) { if (isForestryloaded) { @@ -171,11 +200,11 @@ public class CuttingRecipes implements Runnable { GT_ModHandler.addCraftingRecipe( cover, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] {"s ", " P", 'P', slabWood}); + 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}); + 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) { diff --git a/src/main/java/gregtech/loaders/postload/recipes/DistilleryRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/DistilleryRecipes.java index 5a8f25990b..a4828c6696 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/DistilleryRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/DistilleryRecipes.java @@ -3,16 +3,18 @@ package gregtech.loaders.postload.recipes; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isTinkersConstructLoaded; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class DistilleryRecipes implements Runnable { + @Override public void run() { @@ -135,7 +137,12 @@ public class DistilleryRecipes implements Runnable { false); GT_Values.RA.addDistilleryRecipe( - 6, Materials.WoodTar.getFluid(200), MaterialsKevlar.IIIDimethylbenzene.getFluid(30), 16, 64, false); + 6, + Materials.WoodTar.getFluid(200), + MaterialsKevlar.IIIDimethylbenzene.getFluid(30), + 16, + 64, + false); GT_Values.RA.addDistilleryRecipe( 6, Materials.CharcoalByproducts.getGas(200), @@ -144,7 +151,12 @@ public class DistilleryRecipes implements Runnable { 64, false); GT_Values.RA.addDistilleryRecipe( - 7, Materials.WoodTar.getFluid(200), MaterialsKevlar.IVDimethylbenzene.getFluid(30), 16, 64, false); + 7, + Materials.WoodTar.getFluid(200), + MaterialsKevlar.IVDimethylbenzene.getFluid(30), + 16, + 64, + false); GT_Values.RA.addDistilleryRecipe( 7, Materials.CharcoalByproducts.getGas(200), @@ -238,15 +250,35 @@ public class DistilleryRecipes implements Runnable { false); GT_Values.RA.addDistilleryRecipe( - 2, Materials.HeavyFuel.getFluid(100), Materials.Benzene.getFluid(40), 160, 24, false); + 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); + 3, + Materials.HeavyFuel.getFluid(100), + Materials.Phenol.getFluid(25), + 160, + 24, + false); // Dimethylbenzene GT_Values.RA.addDistilleryRecipe( - 5, Materials.WoodTar.getFluid(200), Materials.Dimethylbenzene.getFluid(30), 100, 120, false); + 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); + 5, + Materials.CharcoalByproducts.getGas(200), + Materials.Dimethylbenzene.getFluid(20), + 100, + 120, + false); GT_Values.RA.addDistilleryRecipe( GT_Utility.getIntegratedCircuit(1), @@ -309,55 +341,55 @@ public class DistilleryRecipes implements Runnable { GT_Values.RA.addDistillationTowerRecipe( Materials.Creosote.getFluid(1000L), - new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[] {Materials.Lubricant.getFluid(500L)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, + new FluidStack[] { Materials.Lubricant.getFluid(500L) }, null, 400, 120); GT_Values.RA.addDistillationTowerRecipe( Materials.SeedOil.getFluid(1400L), - new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[] {Materials.Lubricant.getFluid(500L)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, + new FluidStack[] { Materials.Lubricant.getFluid(500L) }, null, 400, 120); GT_Values.RA.addDistillationTowerRecipe( Materials.FishOil.getFluid(1200L), - new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[] {Materials.Lubricant.getFluid(500L)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, + 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)}, + 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)}, + new FluidStack[] { GT_ModHandler.getDistilledWater(1000L) }, null, 32, 120); GT_Values.RA.addDistillationTowerRecipe( Materials.OilLight.getFluid(1000L), - new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[] {Materials.Lubricant.getFluid(250L)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, + new FluidStack[] { Materials.Lubricant.getFluid(250L) }, null, 400, 120); GT_Values.RA.addDistillationTowerRecipe( Materials.OilMedium.getFluid(1000L), - new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[] {Materials.Lubricant.getFluid(500L)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, + new FluidStack[] { Materials.Lubricant.getFluid(500L) }, null, 400, 120); GT_Values.RA.addDistillationTowerRecipe( Materials.OilHeavy.getFluid(1000L), - new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[] {Materials.Lubricant.getFluid(750L)}, + new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, + new FluidStack[] { Materials.Lubricant.getFluid(750L) }, null, 400, 120); @@ -365,245 +397,171 @@ public class DistilleryRecipes implements Runnable { // C15H10N2O2(5HCl) = C15H10N2O2 + 5HCl GT_Values.RA.addDistillationTowerRecipe( MaterialsKevlar.DiphenylmethaneDiisocyanateMixture.getFluid(1000L), - new FluidStack[] {Materials.HydrochloricAcid.getFluid(5000L)}, + new FluidStack[] { Materials.HydrochloricAcid.getFluid(5000L) }, GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.DiphenylmethaneDiisocyanate, 29L), 2500, 1920); 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) - }, + 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) - }, + 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) - }, + 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.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) - }, + 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) - }, + 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.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) - }, + 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(100), - Materials.SulfuricLightFuel.getFluid(500), - Materials.SulfuricNaphtha.getFluid(1500), - MaterialsKevlar.NaphthenicAcid.getFluid(25), - Materials.SulfuricGas.getGas(600) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(9) }, + new FluidStack[] { Materials.SulfuricHeavyFuel.getFluid(100), Materials.SulfuricLightFuel.getFluid(500), + Materials.SulfuricNaphtha.getFluid(1500), 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) - }, + 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) - }, + 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); 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) - }, + 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.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) - }, + 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(240), - Materials.Hydrogen.getGas(120) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1) }, + new FluidStack[] { Materials.CarbonDioxide.getGas(390), Materials.Ethylene.getGas(120), + Materials.Methane.getGas(130), Materials.CarbonMonoxide.getGas(240), + 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) - }, + 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) - }, + 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); 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) - }, + 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(10), - Materials.SulfuricLightFuel.getFluid(50), - Materials.SulfuricNaphtha.getFluid(150), - Materials.SulfuricGas.getGas(60) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(1) }, + new FluidStack[] { Materials.SulfuricHeavyFuel.getFluid(10), Materials.SulfuricLightFuel.getFluid(50), + Materials.SulfuricNaphtha.getFluid(150), 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) - }, + 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) - }, + 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); @@ -611,28 +569,28 @@ public class DistilleryRecipes implements Runnable { // 2 0.5HCl(Diluted) = HCl + H2O GT_Values.RA.addUniversalDistillationRecipe( Materials.DilutedHydrochloricAcid.getFluid(2000), - new FluidStack[] {Materials.Water.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000)}, + new FluidStack[] { Materials.Water.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000) }, GT_Values.NI, 600, 64); GT_Values.RA.addUniversalDistillationRecipe( getFluidStack("potion.vinegar", 40), - new FluidStack[] {Materials.AceticAcid.getFluid(5), Materials.Water.getFluid(35)}, + new FluidStack[] { Materials.AceticAcid.getFluid(5), Materials.Water.getFluid(35) }, GT_Values.NI, 20, 64); GT_Values.RA.addUniversalDistillationRecipe( Materials.CalciumAcetateSolution.getFluid(1000), - new FluidStack[] {Materials.Acetone.getFluid(1000), Materials.CarbonDioxide.getGas(1000)}, + new FluidStack[] { Materials.Acetone.getFluid(1000), Materials.CarbonDioxide.getGas(1000) }, Materials.Quicklime.getDust(2), 80, 480); GT_Values.RA.addUniversalDistillationRecipe( Materials.DilutedSulfuricAcid.getFluid(3000), - new FluidStack[] {Materials.SulfuricAcid.getFluid(2000), Materials.Water.getFluid(1000)}, + new FluidStack[] { Materials.SulfuricAcid.getFluid(2000), Materials.Water.getFluid(1000) }, GT_Values.NI, 600, 120); @@ -640,669 +598,485 @@ public class DistilleryRecipes implements Runnable { // C3H6O = C2H2O + CH4 GT_Values.RA.addUniversalDistillationRecipe( Materials.Acetone.getFluid(1000), - new FluidStack[] {Materials.Ethenone.getGas(1000), Materials.Methane.getGas(1000)}, + new FluidStack[] { Materials.Ethenone.getGas(1000), Materials.Methane.getGas(1000) }, GT_Values.NI, 80, 640); 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) - }, + 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.addUniversalDistillationRecipe( Materials.Ethylene.getLightlyHydroCracked(1000), - new FluidStack[] {Materials.Ethane.getGas(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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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) - }, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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)}, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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)}, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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)}, + 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)}, + 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) - }, + 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) - }, + 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) - }, + 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(1300), Materials.Hydrogen.getGas(1500), Materials.Helium.getGas(100) - }, + new FluidStack[] { Materials.Methane.getGas(1300), Materials.Hydrogen.getGas(1500), + Materials.Helium.getGas(100) }, GT_Values.NI, 120, 120); GT_Values.RA.addUniversalDistillationRecipe( Materials.Gas.getModeratelyHydroCracked(1000), - new FluidStack[] { - Materials.Methane.getGas(1400), Materials.Hydrogen.getGas(3000), Materials.Helium.getGas(150) - }, + new FluidStack[] { Materials.Methane.getGas(1400), Materials.Hydrogen.getGas(3000), + Materials.Helium.getGas(150) }, GT_Values.NI, 120, 120); GT_Values.RA.addUniversalDistillationRecipe( Materials.Gas.getSeverelyHydroCracked(1000), - new FluidStack[] { - Materials.Methane.getGas(1500), Materials.Hydrogen.getGas(4000), Materials.Helium.getGas(200) - }, + new FluidStack[] { Materials.Methane.getGas(1500), Materials.Hydrogen.getGas(4000), + Materials.Helium.getGas(200) }, GT_Values.NI, 120, 120); GT_Values.RA.addUniversalDistillationRecipe( Materials.Gas.getLightlySteamCracked(1000), - new FluidStack[] { - Materials.Propene.getGas(50), - Materials.Ethane.getGas(10), - Materials.Ethylene.getGas(100), - Materials.Methane.getGas(500), - Materials.Helium.getGas(50) - }, + new FluidStack[] { Materials.Propene.getGas(50), Materials.Ethane.getGas(10), + Materials.Ethylene.getGas(100), Materials.Methane.getGas(500), Materials.Helium.getGas(50) }, Materials.Carbon.getDustTiny(1), 120, 120); GT_Values.RA.addUniversalDistillationRecipe( Materials.Gas.getModeratelySteamCracked(1000), - new FluidStack[] { - Materials.Propene.getGas(10), - Materials.Ethane.getGas(50), - Materials.Ethylene.getGas(200), - Materials.Methane.getGas(600), - Materials.Helium.getGas(70) - }, + new FluidStack[] { Materials.Propene.getGas(10), Materials.Ethane.getGas(50), + Materials.Ethylene.getGas(200), Materials.Methane.getGas(600), Materials.Helium.getGas(70) }, Materials.Carbon.getDustTiny(1), 120, 120); GT_Values.RA.addUniversalDistillationRecipe( Materials.Gas.getSeverelySteamCracked(1000), - new FluidStack[] { - Materials.Propene.getGas(10), - Materials.Ethane.getGas(10), - Materials.Ethylene.getGas(300), - Materials.Methane.getGas(700), - Materials.Helium.getGas(100) - }, + new FluidStack[] { Materials.Propene.getGas(10), Materials.Ethane.getGas(10), + Materials.Ethylene.getGas(300), Materials.Methane.getGas(700), Materials.Helium.getGas(100) }, 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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); @@ -1310,24 +1084,18 @@ public class DistilleryRecipes implements Runnable { // 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) - }, + new FluidStack[] { Materials.AntiKnock.getFluid(400L), Materials.Methanol.getFluid(500L), + Materials.Butene.getGas(400L) }, null, 40, 240); 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) - }, + 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); @@ -1336,12 +1104,9 @@ public class DistilleryRecipes implements Runnable { && 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) - }, + new FluidStack[] { Materials.SulfuricHeavyFuel.getFluid(15), + Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricNaphtha.getFluid(20), + Materials.SulfuricGas.getGas(60) }, null, 20, 96); @@ -1349,9 +1114,8 @@ public class DistilleryRecipes implements Runnable { 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) - }, + new FluidStack[] { new FluidStack(FluidRegistry.getFluid("ic2biogas"), 8000), + Materials.Water.getFluid(125L) }, ItemList.IC2_Fertilizer.get(1), 250, 480); diff --git a/src/main/java/gregtech/loaders/postload/recipes/ElectrolyzerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ElectrolyzerRecipes.java index 5f47077370..f81db12c0e 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ElectrolyzerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ElectrolyzerRecipes.java @@ -1,5 +1,9 @@ package gregtech.loaders.postload.recipes; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -7,11 +11,9 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; public class ElectrolyzerRecipes implements Runnable { + @Override public void run() { // H2O = 2H + O @@ -168,7 +170,7 @@ public class ElectrolyzerRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {10000, 10000, 917, 0, 0, 0}, + new int[] { 10000, 10000, 917, 0, 0, 0 }, 200, 30); // IC2 Fertilizer = H2O + CaCO3 + C @@ -199,7 +201,7 @@ public class ElectrolyzerRecipes implements Runnable { GT_Values.NI, GT_Values.NI, GT_Values.NI, - new int[] {10000, 10000}, + new int[] { 10000, 10000 }, 1000, 60); diff --git a/src/main/java/gregtech/loaders/postload/recipes/ElectromagneticSeparatorRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ElectromagneticSeparatorRecipes.java index 8147f5497e..a080e8fa35 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ElectromagneticSeparatorRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ElectromagneticSeparatorRecipes.java @@ -5,6 +5,7 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.MaterialsOreAlum; public class ElectromagneticSeparatorRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addElectromagneticSeparatorRecipe( @@ -12,7 +13,7 @@ public class ElectromagneticSeparatorRecipes implements Runnable { Materials.Iron.getDust(1), Materials.Neodymium.getDust(1), Materials.Chrome.getDust(1), - new int[] {4000, 2000, 2000}, + new int[] { 4000, 2000, 2000 }, 200, 240); } diff --git a/src/main/java/gregtech/loaders/postload/recipes/ExtractorRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ExtractorRecipes.java index 2b4874afd7..a63029db3e 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ExtractorRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ExtractorRecipes.java @@ -3,17 +3,19 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isEBXLLoaded; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class ExtractorRecipes implements Runnable { + @Override public void run() { GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.bookshelf, 1, 32767), new ItemStack(Items.book, 3, 0)); @@ -21,7 +23,8 @@ public class ExtractorRecipes implements Runnable { 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)); + 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)); @@ -31,61 +34,89 @@ public class ExtractorRecipes implements Runnable { GT_ModHandler.addExtractionRecipe(ItemList.Cell_Air.get(1L), ItemList.Cell_Empty.get(1L)); if (isEBXLLoaded) { GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "waterplant1", 1, 0), new ItemStack(Items.dye, 4, 2)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "waterplant1", 1, 0), + new ItemStack(Items.dye, 4, 2)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "vines", 1, 0), new ItemStack(Items.dye, 4, 1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "vines", 1, 0), + new ItemStack(Items.dye, 4, 1)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 11), new ItemStack(Items.dye, 4, 11)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 11), + new ItemStack(Items.dye, 4, 11)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 10), new ItemStack(Items.dye, 4, 5)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 10), + new ItemStack(Items.dye, 4, 5)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 9), new ItemStack(Items.dye, 4, 14)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 9), + new ItemStack(Items.dye, 4, 14)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 8), new ItemStack(Items.dye, 4, 14)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 8), + new ItemStack(Items.dye, 4, 14)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 7), new ItemStack(Items.dye, 4, 1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 7), + new ItemStack(Items.dye, 4, 1)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 6), new ItemStack(Items.dye, 4, 1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 6), + new ItemStack(Items.dye, 4, 1)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 5), new ItemStack(Items.dye, 4, 11)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 5), + new ItemStack(Items.dye, 4, 11)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 0), new ItemStack(Items.dye, 4, 9)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 0), + new ItemStack(Items.dye, 4, 9)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 4), new ItemStack(Items.dye, 4, 11)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 4), + new ItemStack(Items.dye, 4, 11)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 3), new ItemStack(Items.dye, 4, 13)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 3), + new ItemStack(Items.dye, 4, 13)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 3), new ItemStack(Items.dye, 4, 5)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 3), + new ItemStack(Items.dye, 4, 5)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 2), new ItemStack(Items.dye, 4, 5)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 2), + new ItemStack(Items.dye, 4, 5)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 1), new ItemStack(Items.dye, 4, 12)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 1), + new ItemStack(Items.dye, 4, 12)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 15), new ItemStack(Items.dye, 4, 11)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 15), + new ItemStack(Items.dye, 4, 11)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 14), new ItemStack(Items.dye, 4, 1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 14), + new ItemStack(Items.dye, 4, 1)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 13), new ItemStack(Items.dye, 4, 9)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 13), + new ItemStack(Items.dye, 4, 9)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 12), new ItemStack(Items.dye, 4, 14)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 12), + new ItemStack(Items.dye, 4, 14)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 11), new ItemStack(Items.dye, 4, 7)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 11), + new ItemStack(Items.dye, 4, 7)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 7), new ItemStack(Items.dye, 4, 7)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 7), + new ItemStack(Items.dye, 4, 7)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 2), new ItemStack(Items.dye, 4, 11)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 2), + new ItemStack(Items.dye, 4, 11)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 13), new ItemStack(Items.dye, 4, 6)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 13), + new ItemStack(Items.dye, 4, 6)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 6), new ItemStack(Items.dye, 4, 12)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 6), + new ItemStack(Items.dye, 4, 12)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 5), new ItemStack(Items.dye, 4, 10)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 5), + new ItemStack(Items.dye, 4, 10)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 2), new ItemStack(Items.dye, 4, 1)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 2), + new ItemStack(Items.dye, 4, 1)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 1), new ItemStack(Items.dye, 4, 9)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 1), + new ItemStack(Items.dye, 4, 9)); GT_ModHandler.addExtractionRecipe( - getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 0), new ItemStack(Items.dye, 4, 13)); + getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 0), + new ItemStack(Items.dye, 4, 13)); GT_ModHandler.addExtractionRecipe( getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 7), diff --git a/src/main/java/gregtech/loaders/postload/recipes/ExtruderRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ExtruderRecipes.java index 34d946f003..34bf1a5968 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ExtruderRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ExtruderRecipes.java @@ -4,10 +4,15 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; public class ExtruderRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addExtruderRecipe( - ItemList.FR_Wax.get(1L), ItemList.Shape_Extruder_Cell.get(0L), ItemList.FR_WaxCapsule.get(1L), 64, 16); + 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), diff --git a/src/main/java/gregtech/loaders/postload/recipes/FermenterRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/FermenterRecipes.java index fa37a69eb5..469be24dec 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/FermenterRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/FermenterRecipes.java @@ -2,16 +2,21 @@ package gregtech.loaders.postload.recipes; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; + public class FermenterRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addFermentingRecipe( - Materials.Biomass.getFluid(100), Materials.FermentedBiomass.getFluid(100), 150, false); + Materials.Biomass.getFluid(100), + Materials.FermentedBiomass.getFluid(100), + 150, + false); GT_Values.RA.addFermentingRecipe( new FluidStack(FluidRegistry.getFluid("ic2biomass"), 100), Materials.FermentedBiomass.getFluid(100), @@ -20,94 +25,205 @@ public class FermenterRecipes implements Runnable { GT_Values.RA.addFermentingRecipe(getFluidStack("milk", 50), getFluidStack("potion.mundane", 25), 1024, false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.lemonjuice", 50), getFluidStack("potion.limoncello", 25), 1024, true); - GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.applejuice", 50), getFluidStack("potion.cider", 25), 1024, false); + getFluidStack("potion.lemonjuice", 50), + getFluidStack("potion.limoncello", 25), + 1024, + true); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.goldenapplejuice", 50), getFluidStack("potion.goldencider", 25), 1024, true); + getFluidStack("potion.applejuice", 50), + getFluidStack("potion.cider", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.idunsapplejuice", 50), getFluidStack("potion.notchesbrew", 25), 1024, true); + getFluidStack("potion.goldenapplejuice", 50), + getFluidStack("potion.goldencider", 25), + 1024, + true); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.reedwater", 50), getFluidStack("potion.rum", 25), 1024, true); + getFluidStack("potion.idunsapplejuice", 50), + getFluidStack("potion.notchesbrew", 25), + 1024, + true); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.rum", 50), getFluidStack("potion.piratebrew", 10), 2048, false); + getFluidStack("potion.reedwater", 50), + getFluidStack("potion.rum", 25), + 1024, + true); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.grapejuice", 50), getFluidStack("potion.wine", 25), 1024, false); + getFluidStack("potion.rum", 50), + getFluidStack("potion.piratebrew", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.wine", 50), getFluidStack("potion.vinegar", 10), 2048, true); + getFluidStack("potion.grapejuice", 50), + getFluidStack("potion.wine", 25), + 1024, + false); + GT_Values.RA + .addFermentingRecipe(getFluidStack("potion.wine", 50), getFluidStack("potion.vinegar", 10), 2048, true); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.wheatyjuice", 50), getFluidStack("potion.scotch", 25), 1024, true); + getFluidStack("potion.wheatyjuice", 50), + getFluidStack("potion.scotch", 25), + 1024, + true); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.scotch", 50), getFluidStack("potion.glenmckenner", 10), 2048, true); + getFluidStack("potion.scotch", 50), + getFluidStack("potion.glenmckenner", 10), + 2048, + true); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.wheatyhopsjuice", 50), getFluidStack("potion.beer", 25), 1024, false); + getFluidStack("potion.wheatyhopsjuice", 50), + getFluidStack("potion.beer", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.hopsjuice", 50), getFluidStack("potion.darkbeer", 25), 1024, false); + getFluidStack("potion.hopsjuice", 50), + getFluidStack("potion.darkbeer", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.darkbeer", 50), getFluidStack("potion.dragonblood", 10), 2048, true); + getFluidStack("potion.darkbeer", 50), + getFluidStack("potion.dragonblood", 10), + 2048, + true); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.beer", 75), getFluidStack("potion.vinegar", 50), 2048, false); - GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.cider", 75), getFluidStack("potion.vinegar", 50), 2048, false); + getFluidStack("potion.beer", 75), + getFluidStack("potion.vinegar", 50), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.goldencider", 75), getFluidStack("potion.vinegar", 50), 2048, true); + getFluidStack("potion.cider", 75), + getFluidStack("potion.vinegar", 50), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.rum", 75), getFluidStack("potion.vinegar", 50), 2048, false); + getFluidStack("potion.goldencider", 75), + getFluidStack("potion.vinegar", 50), + 2048, + true); + GT_Values.RA + .addFermentingRecipe(getFluidStack("potion.rum", 75), getFluidStack("potion.vinegar", 50), 2048, false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.wine", 75), getFluidStack("potion.vinegar", 50), 2048, false); + getFluidStack("potion.wine", 75), + getFluidStack("potion.vinegar", 50), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.awkward", 50), getFluidStack("potion.weakness", 25), 1024, false); + getFluidStack("potion.awkward", 50), + getFluidStack("potion.weakness", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.mundane", 50), getFluidStack("potion.weakness", 25), 1024, false); + getFluidStack("potion.mundane", 50), + getFluidStack("potion.weakness", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.thick", 50), getFluidStack("potion.weakness", 25), 1024, false); + getFluidStack("potion.thick", 50), + getFluidStack("potion.weakness", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.poison", 50), getFluidStack("potion.damage", 25), 1024, false); + getFluidStack("potion.poison", 50), + getFluidStack("potion.damage", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.health", 50), getFluidStack("potion.damage", 25), 1024, false); + getFluidStack("potion.health", 50), + getFluidStack("potion.damage", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.waterbreathing", 50), getFluidStack("potion.damage", 25), 1024, false); + getFluidStack("potion.waterbreathing", 50), + getFluidStack("potion.damage", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.nightvision", 50), getFluidStack("potion.invisibility", 25), 1024, false); + getFluidStack("potion.nightvision", 50), + getFluidStack("potion.invisibility", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.fireresistance", 50), getFluidStack("potion.slowness", 25), 1024, false); + getFluidStack("potion.fireresistance", 50), + getFluidStack("potion.slowness", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.speed", 50), getFluidStack("potion.slowness", 25), 1024, false); + getFluidStack("potion.speed", 50), + getFluidStack("potion.slowness", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.strength", 50), getFluidStack("potion.weakness", 25), 1024, false); + getFluidStack("potion.strength", 50), + getFluidStack("potion.weakness", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.regen", 50), getFluidStack("potion.poison", 25), 1024, false); + getFluidStack("potion.regen", 50), + getFluidStack("potion.poison", 25), + 1024, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.poison.strong", 50), getFluidStack("potion.damage.strong", 10), 2048, false); + getFluidStack("potion.poison.strong", 50), + getFluidStack("potion.damage.strong", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.health.strong", 50), getFluidStack("potion.damage.strong", 10), 2048, false); + getFluidStack("potion.health.strong", 50), + getFluidStack("potion.damage.strong", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.speed.strong", 50), getFluidStack("potion.slowness.strong", 10), 2048, false); + getFluidStack("potion.speed.strong", 50), + getFluidStack("potion.slowness.strong", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.strength.strong", 50), getFluidStack("potion.weakness.strong", 10), 2048, false); + getFluidStack("potion.strength.strong", 50), + getFluidStack("potion.weakness.strong", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( getFluidStack("potion.nightvision.long", 50), getFluidStack("potion.invisibility.long", 10), 2048, false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.regen.strong", 50), getFluidStack("potion.poison.strong", 10), 2048, false); + getFluidStack("potion.regen.strong", 50), + getFluidStack("potion.poison.strong", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.poison.long", 50), getFluidStack("potion.damage.long", 10), 2048, false); + getFluidStack("potion.poison.long", 50), + getFluidStack("potion.damage.long", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.waterbreathing.long", 50), getFluidStack("potion.damage.long", 10), 2048, false); + getFluidStack("potion.waterbreathing.long", 50), + getFluidStack("potion.damage.long", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( getFluidStack("potion.fireresistance.long", 50), getFluidStack("potion.slowness.long", 10), 2048, false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.speed.long", 50), getFluidStack("potion.slowness.long", 10), 2048, false); + getFluidStack("potion.speed.long", 50), + getFluidStack("potion.slowness.long", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.strength.long", 50), getFluidStack("potion.weakness.long", 10), 2048, false); + getFluidStack("potion.strength.long", 50), + getFluidStack("potion.weakness.long", 10), + 2048, + false); GT_Values.RA.addFermentingRecipe( - getFluidStack("potion.regen.long", 50), getFluidStack("potion.poison.long", 10), 2048, false); + getFluidStack("potion.regen.long", 50), + getFluidStack("potion.poison.long", 10), + 2048, + false); } } diff --git a/src/main/java/gregtech/loaders/postload/recipes/FluidCannerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/FluidCannerRecipes.java index 168b0a7f1a..caafd7f468 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/FluidCannerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/FluidCannerRecipes.java @@ -5,6 +5,7 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; public class FluidCannerRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addFluidCannerRecipe( diff --git a/src/main/java/gregtech/loaders/postload/recipes/FluidExtractorRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/FluidExtractorRecipes.java index 8b545be0ff..27cc9ff55c 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/FluidExtractorRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/FluidExtractorRecipes.java @@ -6,6 +6,11 @@ import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isBartWorksLoaded; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.ForgeHooks; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -16,20 +21,32 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_DummyWorld; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeHooks; public class FluidExtractorRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addFluidExtractionRecipe( - ItemList.Dye_SquidInk.get(1L), GT_Values.NI, getFluidStack("squidink", 144), 10000, 128, 4); + ItemList.Dye_SquidInk.get(1L), + GT_Values.NI, + getFluidStack("squidink", 144), + 10000, + 128, + 4); GT_Values.RA.addFluidExtractionRecipe( - ItemList.Dye_Indigo.get(1L), GT_Values.NI, getFluidStack("indigo", 144), 10000, 128, 4); + ItemList.Dye_Indigo.get(1L), + GT_Values.NI, + getFluidStack("indigo", 144), + 10000, + 128, + 4); GT_Values.RA.addFluidExtractionRecipe( - ItemList.Crop_Drop_Indigo.get(1L), GT_Values.NI, getFluidStack("indigo", 144), 10000, 128, 4); + ItemList.Crop_Drop_Indigo.get(1L), + GT_Values.NI, + getFluidStack("indigo", 144), + 10000, + 128, + 4); GT_Values.RA.addFluidExtractionRecipe( ItemList.Crop_Drop_MilkWart.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L), @@ -38,19 +55,54 @@ public class FluidExtractorRecipes implements Runnable { 128, 4); GT_Values.RA.addFluidExtractionRecipe( - ItemList.Crop_Drop_OilBerry.get(1L), GT_Values.NI, Materials.Oil.getFluid(100L), 10000, 128, 4); + 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); + 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); + 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); + 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); + 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); + 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); + 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), @@ -386,9 +438,19 @@ public class FluidExtractorRecipes implements Runnable { 1440); GT_Values.RA.addFluidExtractionRecipe( - new ItemStack(Items.wheat_seeds, 1, 32767), GT_Values.NI, Materials.SeedOil.getFluid(10), 10000, 32, 2); + 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); + 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, @@ -397,12 +459,27 @@ public class FluidExtractorRecipes implements Runnable { 32, 2); GT_Values.RA.addFluidExtractionRecipe( - ItemList.Crop_Drop_Rape.get(1), null, Materials.SeedOil.getFluid(125), 10000, 32, 2); + ItemList.Crop_Drop_Rape.get(1), + null, + Materials.SeedOil.getFluid(125), + 10000, + 32, + 2); GT_Values.RA.addFluidSmelterRecipe( - new ItemStack(Items.snowball, 1, 0), GT_Values.NI, Materials.Water.getFluid(250L), 10000, 32, 4); + 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); + 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, @@ -439,10 +516,20 @@ public class FluidExtractorRecipes implements Runnable { if (isBartWorksLoaded) { // xenon GT_Values.RA.addFluidExtractionRecipe( - getModItem("gregtech", "gt.comb", 1L, 134), null, getFluidStack("xenon", 250), 100 * 100, 50, 8192); + getModItem("gregtech", "gt.comb", 1L, 134), + null, + getFluidStack("xenon", 250), + 100 * 100, + 50, + 8192); // neon GT_Values.RA.addFluidExtractionRecipe( - getModItem("gregtech", "gt.comb", 1L, 135), null, getFluidStack("neon", 250), 100 * 100, 15, 8192); + getModItem("gregtech", "gt.comb", 1L, 135), + null, + getFluidStack("neon", 250), + 100 * 100, + 15, + 8192); // krpton GT_Values.RA.addFluidExtractionRecipe( getModItem("gregtech", "gt.comb", 1L, 136), diff --git a/src/main/java/gregtech/loaders/postload/recipes/FluidHeaterRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/FluidHeaterRecipes.java index 83a015be44..6b5259d10a 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/FluidHeaterRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/FluidHeaterRecipes.java @@ -6,6 +6,7 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; public class FluidHeaterRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addFluidHeaterRecipe( @@ -22,7 +23,11 @@ public class FluidHeaterRecipes implements Runnable { 30720); GT_Values.RA.addFluidHeaterRecipe( - GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(6L), Materials.Water.getGas(960L), 30, 30); + 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), diff --git a/src/main/java/gregtech/loaders/postload/recipes/FluidSolidifierRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/FluidSolidifierRecipes.java index 8e598c74d5..352b860724 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/FluidSolidifierRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/FluidSolidifierRecipes.java @@ -5,47 +5,39 @@ import static gregtech.api.enums.GT_Values.MOD_ID_RC; import static gregtech.api.util.GT_ModHandler.getModItem; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; public class FluidSolidifierRecipes implements Runnable { + @Override public void run() { - Materials[] materialArray = new Materials[] { - Materials.Iron, - Materials.WroughtIron, - Materials.Gold, - Materials.Bronze, - Materials.Copper, - Materials.AnnealedCopper, - Materials.Tin, - Materials.Lead, - Materials.Steel - }; + Materials[] materialArray = new Materials[] { Materials.Iron, Materials.WroughtIron, Materials.Gold, + Materials.Bronze, Materials.Copper, Materials.AnnealedCopper, Materials.Tin, Materials.Lead, + Materials.Steel }; - ItemStack[] materialCasing = new ItemStack[] { - ItemList.IC2_Item_Casing_Iron.get(1L), - ItemList.IC2_Item_Casing_Iron.get(1L), - ItemList.IC2_Item_Casing_Gold.get(1L), - ItemList.IC2_Item_Casing_Bronze.get(1L), - ItemList.IC2_Item_Casing_Copper.get(1L), - ItemList.IC2_Item_Casing_Copper.get(1L), - ItemList.IC2_Item_Casing_Tin.get(1L), - ItemList.IC2_Item_Casing_Lead.get(1L), - ItemList.IC2_Item_Casing_Steel.get(1L) - }; + ItemStack[] materialCasing = new ItemStack[] { ItemList.IC2_Item_Casing_Iron.get(1L), + ItemList.IC2_Item_Casing_Iron.get(1L), ItemList.IC2_Item_Casing_Gold.get(1L), + ItemList.IC2_Item_Casing_Bronze.get(1L), ItemList.IC2_Item_Casing_Copper.get(1L), + ItemList.IC2_Item_Casing_Copper.get(1L), ItemList.IC2_Item_Casing_Tin.get(1L), + ItemList.IC2_Item_Casing_Lead.get(1L), ItemList.IC2_Item_Casing_Steel.get(1L) }; for (int i = 0; i < materialArray.length; i++) { if (materialArray[i].mStandardMoltenFluid != null) { GT_Values.RA.addFluidSolidifierRecipe( - ItemList.Shape_Mold_Casing.get(0L), materialArray[i].getMolten(72L), materialCasing[i], 16, 8); + ItemList.Shape_Mold_Casing.get(0L), + materialArray[i].getMolten(72L), + materialCasing[i], + 16, + 8); } } diff --git a/src/main/java/gregtech/loaders/postload/recipes/ForgeHammerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ForgeHammerRecipes.java index 7bcca9ea5a..29d4b30203 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ForgeHammerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ForgeHammerRecipes.java @@ -4,36 +4,59 @@ import static gregtech.api.enums.GT_Values.MOD_ID_GTPP; import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isHardcoreEnderExpansionLoaded; -import gregtech.api.enums.*; -import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.*; +import gregtech.api.util.GT_OreDictUnificator; + public class ForgeHammerRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addForgeHammerRecipe( - new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 2), 10, 16); + 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); + 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); + 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); + 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); + 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); + 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); + 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), @@ -59,10 +82,10 @@ public class ForgeHammerRecipes implements Runnable { GT_Values.RA.addForgeHammerRecipe(ItemList.Casing_Firebricks.get(1), ItemList.Firebrick.get(3), 10, 16); GT_Values.RA.addForgeHammerRecipe( - new ItemStack[] {ItemList.Tesseract.get(1L), getModItem(MOD_ID_GTPP, "MU-metaitem.01", 1, 32105)}, - new FluidStack[] {Materials.SpaceTime.getMolten(2880L)}, + new ItemStack[] { ItemList.Tesseract.get(1L), getModItem(MOD_ID_GTPP, "MU-metaitem.01", 1, 32105) }, + new FluidStack[] { Materials.SpaceTime.getMolten(2880L) }, null, - new FluidStack[] {Materials.Space.getMolten(1440L), Materials.Time.getMolten(1440L)}, + new FluidStack[] { Materials.Space.getMolten(1440L), Materials.Time.getMolten(1440L) }, 10 * 20, (int) TierEU.RECIPE_UXV); diff --git a/src/main/java/gregtech/loaders/postload/recipes/FormingPressRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/FormingPressRecipes.java index 4d6361a656..ea0ebae0fe 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/FormingPressRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/FormingPressRecipes.java @@ -2,17 +2,19 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.util.GT_ModHandler.getModItem; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class FormingPressRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addFormingPressRecipe( diff --git a/src/main/java/gregtech/loaders/postload/recipes/FuelRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/FuelRecipes.java index 7cacfb1482..b0b3bf8840 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/FuelRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/FuelRecipes.java @@ -2,13 +2,15 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.util.GT_ModHandler.getModItem; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.util.GT_ModHandler; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class FuelRecipes implements Runnable { + @Override public void run() { if (!GregTech_API.mIC2Classic) { diff --git a/src/main/java/gregtech/loaders/postload/recipes/FusionReactorRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/FusionReactorRecipes.java index 41d4c5dc1d..5416e56119 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/FusionReactorRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/FusionReactorRecipes.java @@ -4,11 +4,12 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; public class FusionReactorRecipes implements Runnable { + @Override public void run() { // 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 + // 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) diff --git a/src/main/java/gregtech/loaders/postload/recipes/ImplosionCompressorRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ImplosionCompressorRecipes.java index 1e019d7d7d..30a9fe5b6c 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ImplosionCompressorRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ImplosionCompressorRecipes.java @@ -10,6 +10,7 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; public class ImplosionCompressorRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addImplosionRecipe( diff --git a/src/main/java/gregtech/loaders/postload/recipes/LaserEngraverRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/LaserEngraverRecipes.java index 7c4a970332..93267a1a7e 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/LaserEngraverRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/LaserEngraverRecipes.java @@ -1,45 +1,47 @@ package gregtech.loaders.postload.recipes; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; + public class LaserEngraverRecipes implements Runnable { + @Override public void run() { 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)}, + 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)}, + 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)}, + 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)}, + 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); diff --git a/src/main/java/gregtech/loaders/postload/recipes/LatheRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/LatheRecipes.java index 5314767a1c..ed71f464ee 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/LatheRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/LatheRecipes.java @@ -2,16 +2,18 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.util.GT_ModHandler.getModItem; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class LatheRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addLatheRecipe( diff --git a/src/main/java/gregtech/loaders/postload/recipes/MatterAmplifierRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/MatterAmplifierRecipes.java index 30a18d7620..dcf2549a44 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/MatterAmplifierRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/MatterAmplifierRecipes.java @@ -4,6 +4,7 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; public class MatterAmplifierRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addAmplifier(ItemList.IC2_Scrap.get(9L), 180, 1); diff --git a/src/main/java/gregtech/loaders/postload/recipes/MixerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/MixerRecipes.java index e32aad6e73..9531c1dfbc 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/MixerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/MixerRecipes.java @@ -6,18 +6,20 @@ import static gregtech.loaders.postload.GT_MachineRecipeLoader.isRailcraftLoaded import static gregtech.loaders.postload.GT_MachineRecipeLoader.isThaumcraftLoaded; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gregtech.loaders.postload.GT_MachineRecipeLoader; import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; + import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.loaders.postload.GT_MachineRecipeLoader; + public class MixerRecipes implements Runnable { @Override @@ -1122,70 +1124,51 @@ public class MixerRecipes implements Runnable { 100, 250); GT_Values.RA.addMixerRecipe( - new ItemStack[] { - Materials.NaquadahEnriched.getDust(8), - Materials.Holmium.getDust(2), - GT_Utility.getIntegratedCircuit(4) - }, + new ItemStack[] { Materials.NaquadahEnriched.getDust(8), Materials.Holmium.getDust(2), + GT_Utility.getIntegratedCircuit(4) }, null, - new ItemStack[] {Materials.EnrichedHolmium.getDust(10)}, + new ItemStack[] { Materials.EnrichedHolmium.getDust(10) }, null, 30 * 20, (int) GT_Values.VP[7]); // 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)}, + 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)}, + 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)}, + 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)}, + 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); @@ -1407,10 +1390,10 @@ public class MixerRecipes implements Runnable { 16); RA.addMixerRecipe( - new ItemStack[] {ItemList.IC2_Spray_WeedEx.get(1)}, - new FluidStack[] {MaterialsKevlar.NaphthenicAcid.getFluid(10)}, + new ItemStack[] { ItemList.IC2_Spray_WeedEx.get(1) }, + new FluidStack[] { MaterialsKevlar.NaphthenicAcid.getFluid(10) }, new ItemStack[] {}, - new FluidStack[] {Materials.WeedEX9000.getFluid(750)}, + new FluidStack[] { Materials.WeedEX9000.getFluid(750) }, 100, 100); diff --git a/src/main/java/gregtech/loaders/postload/recipes/NEIHiding.java b/src/main/java/gregtech/loaders/postload/recipes/NEIHiding.java index 1bde38976a..e5ee87bae9 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/NEIHiding.java +++ b/src/main/java/gregtech/loaders/postload/recipes/NEIHiding.java @@ -1,11 +1,13 @@ package gregtech.loaders.postload.recipes; +import net.minecraft.item.ItemStack; + import codechicken.nei.api.API; import gregtech.common.items.GT_MetaGenerated_Item_03; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.item.ItemStack; public class NEIHiding implements Runnable { + @Override public void run() { for (int g = 0; g < 16; g++) { diff --git a/src/main/java/gregtech/loaders/postload/recipes/OreDictUnification.java b/src/main/java/gregtech/loaders/postload/recipes/OreDictUnification.java index 2e7530804e..b5cfd7282b 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/OreDictUnification.java +++ b/src/main/java/gregtech/loaders/postload/recipes/OreDictUnification.java @@ -8,6 +8,7 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; public class OreDictUnification implements Runnable { + @Override public void run() { if (isHardcoreEnderExpansionLoaded) { diff --git a/src/main/java/gregtech/loaders/postload/recipes/PackagerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/PackagerRecipes.java index c4ad801745..e317b6986b 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/PackagerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/PackagerRecipes.java @@ -7,10 +7,15 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; public class PackagerRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addBoxingRecipe( - ItemList.IC2_Scrap.get(9L), ItemList.Schematic_3by3.get(0L), ItemList.IC2_Scrapbox.get(1L), 16, 1); + 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), diff --git a/src/main/java/gregtech/loaders/postload/recipes/PlasmaForgeRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/PlasmaForgeRecipes.java index 7b2bb878f0..a6db8ca9c5 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/PlasmaForgeRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/PlasmaForgeRecipes.java @@ -4,41 +4,35 @@ import static gregtech.api.enums.GT_Values.*; import static gregtech.api.util.GT_ModHandler.getModItem; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; -import gregtech.api.enums.*; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.*; + public class PlasmaForgeRecipes implements Runnable { + @Override public void run() { // Giga chad trophy. GT_Values.RA.addPlasmaForgeRecipe( - new ItemStack[] { - ItemList.Field_Generator_UEV.get(64), - ItemList.Field_Generator_UIV.get(64), - ItemList.Field_Generator_UMV.get(64) - }, - new FluidStack[] { - Materials.ExcitedDTEC.getFluid(100_000_000), Materials.SpaceTime.getMolten(64 * 2 * 9 * 144) - }, - new ItemStack[] {ItemList.GigaChad.get(1)}, - new FluidStack[] {GT_Values.NF}, + new ItemStack[] { ItemList.Field_Generator_UEV.get(64), ItemList.Field_Generator_UIV.get(64), + ItemList.Field_Generator_UMV.get(64) }, + new FluidStack[] { Materials.ExcitedDTEC.getFluid(100_000_000), + Materials.SpaceTime.getMolten(64 * 2 * 9 * 144) }, + new ItemStack[] { ItemList.GigaChad.get(1) }, + new FluidStack[] { GT_Values.NF }, 86400 * 20 * 2, 2_000_000_000, 13500); // Quantum anomaly recipe bypass for UXV. Avoids RNG. GT_Values.RA.addPlasmaForgeRecipe( - new ItemStack[] { - getModItem(MOD_ID_DC, "item.ChromaticLens", 1), getModItem("GoodGenerator", "huiCircuit", 1, 4) - }, - new FluidStack[] { - Materials.WhiteDwarfMatter.getMolten(144), - getFluidStack("molten.shirabon", 72), - Materials.BlackDwarfMatter.getMolten(144) - }, - new ItemStack[] {getModItem(MOD_ID_GTPP, "MU-metaitem.01", 1, 32105)}, - new FluidStack[] {NF}, + new ItemStack[] { getModItem(MOD_ID_DC, "item.ChromaticLens", 1), + getModItem("GoodGenerator", "huiCircuit", 1, 4) }, + new FluidStack[] { Materials.WhiteDwarfMatter.getMolten(144), getFluidStack("molten.shirabon", 72), + Materials.BlackDwarfMatter.getMolten(144) }, + new ItemStack[] { getModItem(MOD_ID_GTPP, "MU-metaitem.01", 1, 32105) }, + new FluidStack[] { NF }, 50 * 20, (int) TierEU.RECIPE_UXV, 13_500); diff --git a/src/main/java/gregtech/loaders/postload/recipes/PrinterRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/PrinterRecipes.java index 49f65ed8b2..e01bb1d1ce 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/PrinterRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/PrinterRecipes.java @@ -2,16 +2,18 @@ package gregtech.loaders.postload.recipes; import static net.minecraftforge.fluids.FluidRegistry.getFluidStack; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class PrinterRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addPrinterRecipe( diff --git a/src/main/java/gregtech/loaders/postload/recipes/Pulverizer.java b/src/main/java/gregtech/loaders/postload/recipes/Pulverizer.java index 6dea81595c..3d5d714742 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/Pulverizer.java +++ b/src/main/java/gregtech/loaders/postload/recipes/Pulverizer.java @@ -5,6 +5,10 @@ import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isHardcoreEnderExpansionLoaded; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isRailcraftLoaded; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -12,44 +16,38 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class Pulverizer implements Runnable { + @Override public void run() { // 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 19L) }, null, 300, 4); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 12L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 7L) }, null, 300, 4); GT_Values.RA.addPulveriserRecipe( ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(1L), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Steel, 2L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Steel, 2L) }, null, 10, 4); 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) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Steel, 1L) }, null, 10, 4); @@ -57,130 +55,108 @@ public class Pulverizer implements Runnable { // 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)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Marble, 1L) }, null, 160, 4); GT_Values.RA.addPulveriserRecipe( getModItem("Thaumcraft", "ItemResource", 1, 18), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gold, 1L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gold, 1L) }, null, 21, 4); GT_Values.RA.addPulveriserRecipe( new ItemStack(Items.reeds, 1), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L)}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L) }, null, 50, 2); 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) - }, + 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) - }, + 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) - }, + 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.TPV, 8), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nichrome, 1), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 5) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TPV, 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.TPV, 1), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 6) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TPV, 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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) - }, + 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); @@ -189,260 +165,220 @@ public class Pulverizer implements Runnable { // Iron GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.beta", 1L, 0), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L) }, + new int[] { 10000 }, 300, 2); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iron, 3L) }, + new int[] { 10000, 10000 }, 300, 2); // Steel GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.beta", 1L, 13), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L) }, + new int[] { 10000 }, 300, 2); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Steel, 3L) }, + new int[] { 10000 }, 300, 2); // Aluminium GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 2L) }, + new int[] { 10000 }, 450, 8); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Aluminium, 3L) }, + new int[] { 10000, 10000 }, 450, 8); // Stainless Steel GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 2L) }, + new int[] { 10000 }, 600, 16); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.StainlessSteel, 3L) }, + new int[] { 10000 }, 600, 16); // Titanium GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 2L) }, + new int[] { 10000 }, 600, 30); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Titanium, 3L) }, + new int[] { 10000 }, 600, 30); // Tungesten Steel GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 2L) }, + new int[] { 10000 }, 600, 30); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenSteel, 3L) }, + new int[] { 10000 }, 600, 30); // Palladium GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 2L) }, + new int[] { 10000 }, 750, 64); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NiobiumTitanium, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Chrome, 3L) }, + new int[] { 10000, 10000 }, 750, 64); // Iridium GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.eta", 1L, 0), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 2L) }, + new int[] { 10000 }, 900, 120); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Enderium, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iridium, 3L) }, + new int[] { 10000, 10000 }, 900, 120); // Osmium GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.eta", 1L, 3), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 2L) }, + new int[] { 10000 }, 1050, 256); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Osmium, 3L) }, + new int[] { 10000, 10000 }, 1050, 256); // Neutronium GT_Values.RA.addPulveriserRecipe( getModItem(MOD_ID_RC, "machine.eta", 1L, 6), - new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 2L)}, - new int[] {10000}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 2L) }, + new int[] { 10000 }, 1200, 480); GT_Values.RA.addPulveriserRecipe( 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}, + 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( 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}, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neutronium, 3L) }, + new int[] { 10000 }, 1200, 480); @@ -479,8 +415,8 @@ public class Pulverizer implements Runnable { 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(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), diff --git a/src/main/java/gregtech/loaders/postload/recipes/PyrolyseRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/PyrolyseRecipes.java index d99d55ef4b..24ecdfd91f 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/PyrolyseRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/PyrolyseRecipes.java @@ -4,6 +4,12 @@ import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isForestryLoaded; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isRailcraftLoaded; +import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; +import mods.railcraft.common.items.RailcraftToolItems; + +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -11,12 +17,9 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; -import mods.railcraft.common.items.RailcraftToolItems; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class PyrolyseRecipes implements Runnable { + @Override public void run() { if (isRailcraftLoaded) { @@ -54,15 +57,14 @@ public class PyrolyseRecipes implements Runnable { 96); } - 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 (!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 (isForestryLoaded) { GT_Values.RA.addPyrolyseRecipe( getModItem(GT_MachineRecipeLoader.aTextForestry, "fertilizerBio", 4L), diff --git a/src/main/java/gregtech/loaders/postload/recipes/RecipeRemover.java b/src/main/java/gregtech/loaders/postload/recipes/RecipeRemover.java index 8390eadc2c..0f0ad6077e 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/RecipeRemover.java +++ b/src/main/java/gregtech/loaders/postload/recipes/RecipeRemover.java @@ -2,6 +2,13 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.util.GT_ModHandler.getModItem; +import java.util.Iterator; +import java.util.Map; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -12,13 +19,9 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import ic2.api.recipe.ILiquidHeatExchangerManager; import ic2.api.recipe.Recipes; -import java.util.Iterator; -import java.util.Map; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class RecipeRemover implements Runnable { + @Override public void run() { GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Fertilizer.get(1L)); @@ -40,15 +43,22 @@ public class RecipeRemover implements Runnable { 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); + 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); + 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); + 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) { - } + 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), @@ -77,7 +87,9 @@ public class RecipeRemover implements Runnable { GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L)); GT_Utility.removeSimpleIC2MachineRecipe( - GT_Values.NI, GT_ModHandler.getMaceratorRecipeList(), getModItem("IC2", "itemBiochaff", 1L)); + GT_Values.NI, + GT_ModHandler.getMaceratorRecipeList(), + getModItem("IC2", "itemBiochaff", 1L)); GT_Utility.removeSimpleIC2MachineRecipe( new ItemStack(Blocks.cactus, 8, 0), @@ -89,18 +101,24 @@ public class RecipeRemover implements Runnable { getModItem("IC2", "itemFuelPlantBall", 1L)); GT_Utility.removeSimpleIC2MachineRecipe( - ItemList.Crop_Drop_BobsYerUncleRanks.get(1L), GT_ModHandler.getExtractorRecipeList(), null); + ItemList.Crop_Drop_BobsYerUncleRanks.get(1L), + GT_ModHandler.getExtractorRecipeList(), + null); GT_Utility.removeSimpleIC2MachineRecipe( - ItemList.Crop_Drop_Ferru.get(1L), GT_ModHandler.getExtractorRecipeList(), null); + ItemList.Crop_Drop_Ferru.get(1L), + GT_ModHandler.getExtractorRecipeList(), + null); GT_Utility.removeSimpleIC2MachineRecipe( - ItemList.Crop_Drop_Aurelia.get(1L), GT_ModHandler.getExtractorRecipeList(), null); + ItemList.Crop_Drop_Aurelia.get(1L), + GT_ModHandler.getExtractorRecipeList(), + null); 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")) { @@ -109,14 +127,14 @@ public class RecipeRemover implements Runnable { } } } catch (Throwable e) { - /*Do nothing*/ + /* 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")) { @@ -125,20 +143,20 @@ public class RecipeRemover implements Runnable { } } } catch (Throwable e) { - /*Do nothing*/ + /* Do nothing */ } } } public void removeSmelting() { GT_ModHandler.removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Graphite, 1L)); - GT_ModHandler.removeFurnaceSmelting( - GT_OreDictUnificator.get(OrePrefixes.oreBlackgranite, Materials.Graphite, 1L)); + GT_ModHandler + .removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.oreBlackgranite, Materials.Graphite, 1L)); GT_ModHandler.removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.oreEndstone, Materials.Graphite, 1L)); - GT_ModHandler.removeFurnaceSmelting( - GT_OreDictUnificator.get(OrePrefixes.oreNetherrack, Materials.Graphite, 1L)); - GT_ModHandler.removeFurnaceSmelting( - GT_OreDictUnificator.get(OrePrefixes.oreRedgranite, Materials.Graphite, 1L)); + GT_ModHandler + .removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.oreNetherrack, Materials.Graphite, 1L)); + GT_ModHandler + .removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.oreRedgranite, Materials.Graphite, 1L)); GT_ModHandler.removeFurnaceSmelting(ItemList.IC2_Resin.get(1L)); } } diff --git a/src/main/java/gregtech/loaders/postload/recipes/SifterRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/SifterRecipes.java index 342ee65c44..6ee7575a1b 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/SifterRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/SifterRecipes.java @@ -1,12 +1,13 @@ package gregtech.loaders.postload.recipes; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class SifterRecipes implements Runnable { @@ -14,28 +15,19 @@ public class SifterRecipes implements Runnable { public void run() { 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}, + 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}, + 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); } diff --git a/src/main/java/gregtech/loaders/postload/recipes/SlicerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/SlicerRecipes.java index da5fcbef0c..fa21dbaaec 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/SlicerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/SlicerRecipes.java @@ -4,6 +4,7 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; public class SlicerRecipes implements Runnable { + @Override public void run() { GT_Values.RA.addSlicerRecipe( diff --git a/src/main/java/gregtech/loaders/postload/recipes/SmelterRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/SmelterRecipes.java index b6ac82a496..db2f540821 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/SmelterRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/SmelterRecipes.java @@ -1,27 +1,30 @@ package gregtech.loaders.postload.recipes; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class SmelterRecipes implements Runnable { + @Override public void run() { 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)); + 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)); diff --git a/src/main/java/gregtech/loaders/postload/recipes/ThaumcraftRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ThaumcraftRecipes.java index 9354c076b5..9ccf72fc92 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ThaumcraftRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ThaumcraftRecipes.java @@ -5,6 +5,12 @@ import static gregtech.api.util.GT_ModHandler.getModItem; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isAE2Loaded; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isThaumcraftLoaded; +import java.util.Arrays; +import java.util.Collections; + +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -13,12 +19,9 @@ import gregtech.api.enums.TC_Aspects; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; import gregtech.loaders.postload.GT_MachineRecipeLoader; -import java.util.Arrays; -import java.util.Collections; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; public class ThaumcraftRecipes implements Runnable { + @Override public void run() { if (isThaumcraftLoaded) { @@ -43,7 +46,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Charcoal Transmutation", "Turning wood into charcoal", - new String[] {"ALUMENTUM"}, + new String[] { "ALUMENTUM" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 1L), 2, @@ -55,16 +58,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -85,29 +86,28 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -117,7 +117,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Zinc Transmutation", "Transformation of metals into zinc", - new String[] {"TRANSTIN"}, + new String[] { "TRANSTIN" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Zinc, 1L), 2, @@ -129,16 +129,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -148,7 +146,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Antimony Transmutation", "Transformation of metals into antimony", - new String[] {"GT_TRANSZINC", "TRANSLEAD"}, + new String[] { "GT_TRANSZINC", "TRANSLEAD" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Antimony, 1L), 2, @@ -160,16 +158,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -179,7 +175,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Nickel Transmutation", "Transformation of metals into nickel", - new String[] {"TRANSLEAD"}, + new String[] { "TRANSLEAD" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 1L), 2, @@ -191,16 +187,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -210,7 +204,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Cobalt Transmutation", "Transformation of metals into cobalt", - new String[] {"GT_TRANSNICKEL"}, + new String[] { "GT_TRANSNICKEL" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cobalt, 1L), 2, @@ -222,16 +216,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -241,7 +233,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Bismuth Transmutation", "Transformation of metals into bismuth", - new String[] {"GT_TRANSCOBALT"}, + new String[] { "GT_TRANSCOBALT" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bismuth, 1L), 2, @@ -253,16 +245,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -272,7 +262,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Steel Transmutation", "Transforming iron to steel", - new String[] {"TRANSIRON", "GT_WOOD_TO_CHARCOAL"}, + new String[] { "TRANSIRON", "GT_WOOD_TO_CHARCOAL" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 1L), 3, @@ -284,14 +274,13 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -301,7 +290,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Bronze Transmutation", "Transformation of metals into bronze", - new String[] {"TRANSTIN", "TRANSCOPPER"}, + new String[] { "TRANSTIN", "TRANSCOPPER" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bronze, 1L), 2, @@ -313,16 +302,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -332,7 +319,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Electrum Transmutation", "Transformation of metals into electrum", - new String[] {"GT_TRANSBRONZE", "TRANSGOLD", "TRANSSILVER"}, + new String[] { "GT_TRANSBRONZE", "TRANSGOLD", "TRANSSILVER" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Electrum, 1L), 2, @@ -344,16 +331,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -363,7 +348,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Brass Transmutation", "Transformation of metals into brass", - new String[] {"GT_TRANSBRONZE", "GT_TRANSZINC"}, + new String[] { "GT_TRANSBRONZE", "GT_TRANSZINC" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Brass, 1L), 2, @@ -375,16 +360,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -394,7 +377,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Invar Transmutation", "Transformation of metals into invar", - new String[] {"GT_TRANSBRONZE", "GT_TRANSNICKEL"}, + new String[] { "GT_TRANSBRONZE", "GT_TRANSNICKEL" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Invar, 1L), 2, @@ -406,16 +389,14 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -425,7 +406,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Cupronickel Transmutation", "Transformation of metals into cupronickel", - new String[] {"GT_TRANSBRONZE", "GT_TRANSNICKEL"}, + new String[] { "GT_TRANSBRONZE", "GT_TRANSNICKEL" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cupronickel, 1L), 2, @@ -438,17 +419,15 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -458,7 +437,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Battery Alloy Transmutation", "Transformation of metals into battery alloy", - new String[] {"GT_TRANSBRONZE", "GT_TRANSANTIMONY"}, + new String[] { "GT_TRANSBRONZE", "GT_TRANSANTIMONY" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.BatteryAlloy, 1L), 2, @@ -471,17 +450,15 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -491,7 +468,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Soldering Alloy Transmutation", "Transformation of metals into soldering alloy", - new String[] {"GT_TRANSBRONZE", "GT_TRANSANTIMONY"}, + new String[] { "GT_TRANSBRONZE", "GT_TRANSANTIMONY" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.SolderingAlloy, 1L), 2, @@ -504,17 +481,15 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -524,16 +499,9 @@ public class ThaumcraftRecipes implements Runnable { 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" - }, + 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, @@ -548,7 +516,7 @@ public class ThaumcraftRecipes implements Runnable { 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}); + new Object[] { GT_MachineRecipeLoader.aTextTCGTPage + tKey }); tKey = "GT_TRANSALUMINIUM"; GT_LanguageManager.addStringLocalization( @@ -558,7 +526,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Aluminium Transmutation", "Transformation of metals into aluminium", - new String[] {"GT_ADVANCEDMETALLURGY"}, + new String[] { "GT_ADVANCEDMETALLURGY" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 1L), 4, @@ -572,18 +540,16 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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 (isAE2Loaded) { tKey = "GT_TRANSSKYSTONE"; @@ -594,7 +560,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Skystone Transmutation", "Transformation of obsidian into skystone", - new String[] {"GT_ADVANCEDMETALLURGY"}, + new String[] { "GT_ADVANCEDMETALLURGY" }, "ALCHEMY", getModItem("appliedenergistics2", "tile.BlockSkyStone", 1), 4, @@ -608,19 +574,17 @@ public class ThaumcraftRecipes implements Runnable { 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), - 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))) - }); + new Object[] { GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + new ItemStack(Blocks.obsidian), + 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"; @@ -631,7 +595,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Basaltic Mineral Transmutation", "Transformation of mineral sands", - new String[] {"GT_ADVANCEDMETALLURGY"}, + new String[] { "GT_ADVANCEDMETALLURGY" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniticMineralSand, 1L), 4, @@ -645,27 +609,25 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -675,7 +637,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Shard Recrystallisation", "Fixing your precious crystals", - new String[] {"ALCHEMICALMANUFACTURE"}, + new String[] { "ALCHEMICALMANUFACTURE" }, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedOrder, 1L), 3, @@ -687,44 +649,48 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -734,7 +700,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Magic Energy Conversion", "Magic to Power", - new String[] {"ARCANEBORE"}, + new String[] { "ARCANEBORE" }, "ARTIFICE", ItemList.MagicEnergyConverter_LV.get(1L), 3, @@ -747,27 +713,23 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -777,7 +739,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Adept Magic Energy Conversion", "Magic to Power", - new String[] {"GT_MAGICENERGY"}, + new String[] { "GT_MAGICENERGY" }, "ARTIFICE", ItemList.MagicEnergyConverter_MV.get(1L), 1, @@ -790,27 +752,25 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -820,7 +780,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Master Magic Energy Conversion", "Magic to Power", - new String[] {"GT_MAGICENERGY2"}, + new String[] { "GT_MAGICENERGY2" }, "ARTIFICE", ItemList.MagicEnergyConverter_HV.get(1L), 1, @@ -833,27 +793,25 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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( @@ -863,7 +821,7 @@ public class ThaumcraftRecipes implements Runnable { tKey, "Magic Energy Absorption", "Harvesting Magic", - new String[] {"GT_MAGICENERGY"}, + new String[] { "GT_MAGICENERGY" }, "ARTIFICE", ItemList.MagicEnergyAbsorber_LV.get(1L), 3, @@ -876,36 +834,33 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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!"); + 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"}, + new String[] { "GT_MAGICABSORB" }, "ARTIFICE", ItemList.MagicEnergyAbsorber_EV.get(1L), 3, @@ -918,71 +873,64 @@ public class ThaumcraftRecipes implements Runnable { 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))) - }); + 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))) }); } } } diff --git a/src/main/java/gregtech/loaders/postload/recipes/ThermalCentrifugeRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ThermalCentrifugeRecipes.java index 3723ebd6d7..654e9a2004 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ThermalCentrifugeRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ThermalCentrifugeRecipes.java @@ -2,12 +2,13 @@ package gregtech.loaders.postload.recipes; import static gregtech.api.enums.GT_Values.RA; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class ThermalCentrifugeRecipes implements Runnable { diff --git a/src/main/java/gregtech/loaders/postload/recipes/VacuumFreezerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/VacuumFreezerRecipes.java index 3be8d32b50..2a0a530986 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/VacuumFreezerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/VacuumFreezerRecipes.java @@ -2,17 +2,19 @@ package gregtech.loaders.postload.recipes; import static gregtech.loaders.postload.GT_MachineRecipeLoader.isGTPPLoaded; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class VacuumFreezerRecipes implements Runnable { + @Override public void run() { // reactor parts vacuum @@ -69,27 +71,49 @@ public class VacuumFreezerRecipes implements Runnable { 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + ItemList.Reactor_Coolant_Sp_6.getWildcard(1L), + ItemList.Reactor_Coolant_Sp_6.get(1L), + 10800); // fluid vacuum GT_Values.RA.addVacuumFreezerRecipe( @@ -113,13 +137,21 @@ public class VacuumFreezerRecipes implements Runnable { 480); GT_Values.RA.addVacuumFreezerRecipe( - ItemList.Reactor_Coolant_Sp_1.getWildcard(1L), ItemList.Reactor_Coolant_Sp_1.get(1L), 1800); + 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); + 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); + 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); + ItemList.Reactor_Coolant_Sp_6.getWildcard(1L), + ItemList.Reactor_Coolant_Sp_6.get(1L), + 10800); // Freeze superconductors. GT_Values.RA.addVacuumFreezerRecipe( @@ -148,7 +180,9 @@ public class VacuumFreezerRecipes implements Runnable { Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 1L), GT_OreDictUnificator.get( - OrePrefixes.ingot, Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 1L), + OrePrefixes.ingot, + Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, + 1L), 400, 30720); GT_Values.RA.addVacuumFreezerRecipe( @@ -212,13 +246,11 @@ public class VacuumFreezerRecipes implements Runnable { if (isGTPPLoaded) { 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}, + 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); } diff --git a/src/main/java/gregtech/loaders/postload/recipes/WiremillRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/WiremillRecipes.java index b7e3fd037f..463f190c23 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/WiremillRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/WiremillRecipes.java @@ -1,5 +1,8 @@ package gregtech.loaders.postload.recipes; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -7,14 +10,13 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_RecipeRegistrator; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class WiremillRecipes implements Runnable { + @Override public void run() { - GT_RecipeRegistrator.registerWiremillRecipes( - Materials.Graphene, 400, 2, OrePrefixes.dust, OrePrefixes.stick, 1); + GT_RecipeRegistrator + .registerWiremillRecipes(Materials.Graphene, 400, 2, OrePrefixes.dust, OrePrefixes.stick, 1); GT_RecipeRegistrator.registerWiremillRecipes(Materials.SpaceTime, 400, 32_000); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_CircuitBehaviors.java b/src/main/java/gregtech/loaders/preload/GT_Loader_CircuitBehaviors.java index 4b1ef8098c..b68ac34c44 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_CircuitBehaviors.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_CircuitBehaviors.java @@ -4,6 +4,7 @@ import gregtech.api.util.GT_Log; import gregtech.common.redstonecircuits.*; public class GT_Loader_CircuitBehaviors implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Register Redstone Circuit behaviours."); 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 a8d29940b4..fc9f7d936d 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java @@ -2,6 +2,10 @@ package gregtech.loaders.preload; import static gregtech.api.enums.GT_Values.MOD_ID_DC; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -11,11 +15,9 @@ 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 net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class GT_Loader_ItemData implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Loading Item Data Tags"); @@ -57,7 +59,8 @@ public class GT_Loader_ItemData implements Runnable { 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)); + 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)); @@ -68,13 +71,13 @@ public class GT_Loader_ItemData implements Runnable { 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.glowstone, 1, 32767), new ItemData(Materials.Glowstone, 14515200L)); GT_OreDictUnificator.addItemData( new ItemStack(Blocks.redstone_lamp, 1, 32767), new ItemData( @@ -88,46 +91,49 @@ public class GT_Loader_ItemData implements Runnable { 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_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.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)); @@ -143,18 +149,21 @@ public class GT_Loader_ItemData implements Runnable { 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( - 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_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( - new ItemStack(Blocks.light_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Gold, 7257600L)); + 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)); + 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)); @@ -179,16 +188,17 @@ public class GT_Loader_ItemData implements Runnable { 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.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))); @@ -204,8 +214,8 @@ public class GT_Loader_ItemData implements Runnable { 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(Items.leather, 1, 32767), new ItemData(Materials.Leather, 3628800L)); GT_OreDictUnificator.addItemData( new ItemStack(Blocks.beacon, 1, 32767), new ItemData( @@ -230,84 +240,87 @@ public class GT_Loader_ItemData implements Runnable { 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(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( @@ -326,8 +339,8 @@ public class GT_Loader_ItemData implements Runnable { 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.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))); @@ -352,28 +365,19 @@ public class GT_Loader_ItemData implements Runnable { 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) - }) { + 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))); } } - 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), 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 37640192b1..59da1c074b 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 @@ -5,6 +5,16 @@ import static gregtech.api.enums.FluidState.LIQUID; import static gregtech.api.enums.FluidState.MOLTEN; import static gregtech.api.enums.FluidState.SLURRY; +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.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; + import codechicken.nei.api.API; import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.registry.GameRegistry; @@ -41,20 +51,12 @@ import gregtech.common.items.GT_MetaGenerated_Item_99; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.GT_NeutronReflector_Item; import gregtech.common.items.GT_VolumetricFlask; -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.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; 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."); @@ -128,93 +130,109 @@ 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" - }); + 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) + "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)); - ItemList.Reactor_Coolant_He_3.set( - GregTech_API.constructCoolantCellItem("180k_Helium_Coolantcell", "180k He Coolant Cell", 180000)); - ItemList.Reactor_Coolant_He_6.set( - GregTech_API.constructCoolantCellItem("360k_Helium_Coolantcell", "360k He Coolant Cell", 360000)); - ItemList.Reactor_Coolant_NaK_1.set( - GregTech_API.constructCoolantCellItem("60k_NaK_Coolantcell", "60k NaK Coolantcell", 60000)); - ItemList.Reactor_Coolant_NaK_3.set( - GregTech_API.constructCoolantCellItem("180k_NaK_Coolantcell", "180k NaK Coolantcell", 180000)); - ItemList.Reactor_Coolant_NaK_6.set( - GregTech_API.constructCoolantCellItem("360k_NaK_Coolantcell", "360k NaK Coolantcell", 360000)); - - 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.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)); + ItemList.Reactor_Coolant_He_3 + .set(GregTech_API.constructCoolantCellItem("180k_Helium_Coolantcell", "180k He Coolant Cell", 180000)); + ItemList.Reactor_Coolant_He_6 + .set(GregTech_API.constructCoolantCellItem("360k_Helium_Coolantcell", "360k He Coolant Cell", 360000)); + ItemList.Reactor_Coolant_NaK_1 + .set(GregTech_API.constructCoolantCellItem("60k_NaK_Coolantcell", "60k NaK Coolantcell", 60000)); + ItemList.Reactor_Coolant_NaK_3 + .set(GregTech_API.constructCoolantCellItem("180k_NaK_Coolantcell", "180k NaK Coolantcell", 180000)); + ItemList.Reactor_Coolant_NaK_6 + .set(GregTech_API.constructCoolantCellItem("360k_NaK_Coolantcell", "360k NaK Coolantcell", 360000)); + + 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.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), - 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), - 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), - false)); + 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), + 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), + 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), + false)); GT_ModHandler.addThermalCentrifugeRecipe( ItemList.Depleted_Thorium_1.get(1), @@ -235,42 +253,45 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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), - 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), - 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), - false)); + 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), + 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), + 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), + false)); GT_Values.RA.addCentrifugeRecipe( ItemList.Depleted_Naquadah_1.get(1), @@ -283,7 +304,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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}, + new int[] { 10_000, 5_000, 5_000, 2_500, 10_000, 10_000 }, 500, 2000); GT_Values.RA.addCentrifugeRecipe( @@ -297,7 +318,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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}, + new int[] { 10_000, 5_000, 5_000, 2_500, 10_000, 10_000 }, 1000, 2000); GT_Values.RA.addCentrifugeRecipe( @@ -311,44 +332,47 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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}, + 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), - 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), - 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), - 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), + 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), + 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), + true)); GT_Values.RA.addCentrifugeRecipe( ItemList.Depleted_MNq_1.get(1), @@ -361,7 +385,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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}, + new int[] { 10_000, 5_000, 5_000, 2_500, 10_000, 10_000 }, 500, 2000); GT_Values.RA.addCentrifugeRecipe( @@ -375,7 +399,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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}, + new int[] { 10_000, 5_000, 5_000, 2_500, 10_000, 10_000 }, 1000, 2000); GT_Values.RA.addCentrifugeRecipe( @@ -389,70 +413,76 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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}, + 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.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."); @@ -475,259 +505,108 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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 - }, + 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 - }, + 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 - }, + 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 - }, + 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 - }, + 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 - }, + 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 - }, + 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 - }, + 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 - }, + 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 - }, + 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 - }, + 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, - Materials.TranscendentMetal, - Materials.Oriharukon, - Materials.WhiteDwarfMatter, - Materials.BlackDwarfMatter - }, + new Materials[] { Materials.Cryolite, Materials.SiliconSG, MaterialsKevlar.NickelAluminide, + Materials.SpaceTime, Materials.TranscendentMetal, Materials.Oriharukon, + Materials.WhiteDwarfMatter, Materials.BlackDwarfMatter }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS12); @@ -744,10 +623,8 @@ 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"); @@ -758,147 +635,83 @@ 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_FluidFactory.builder("Air") - .withLocalizedName("Air") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() + GT_FluidFactory.builder("Air").withLocalizedName("Air").withStateAndTemperature(GAS, 295).buildAndRegister() .configureMaterials(Materials.Air) .registerContainers(ItemList.Cell_Air.get(1L), ItemList.Cell_Empty.get(1L), 2000); - GT_FluidFactory.builder("LiquidOxygen") - .withLocalizedName("Liquid Oxygen") - .withStateAndTemperature(GAS, 60) - .buildAndRegister() - .configureMaterials(Materials.LiquidOxygen) - .registerBContainers( + GT_FluidFactory.builder("LiquidOxygen").withLocalizedName("Liquid Oxygen").withStateAndTemperature(GAS, 60) + .buildAndRegister().configureMaterials(Materials.LiquidOxygen).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidOxygen, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("LiquidNitrogen") - .withLocalizedName("Liquid Nitrogen") - .withStateAndTemperature(GAS, 77) - .buildAndRegister() - .configureMaterials(Materials.LiquidNitrogen) - .registerBContainers( + GT_FluidFactory.builder("LiquidNitrogen").withLocalizedName("Liquid Nitrogen").withStateAndTemperature(GAS, 77) + .buildAndRegister().configureMaterials(Materials.LiquidNitrogen).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidNitrogen, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("LiquidAir") - .withLocalizedName("Liquid Air") - .withStateAndTemperature(LIQUID, 77) - .buildAndRegister() - .configureMaterials(Materials.LiquidAir) - .registerBContainers( + GT_FluidFactory.builder("LiquidAir").withLocalizedName("Liquid Air").withStateAndTemperature(LIQUID, 77) + .buildAndRegister().configureMaterials(Materials.LiquidAir).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidAir, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Oxygen") - .withLocalizedName("Oxygen") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Oxygen) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Hydrogen") - .withLocalizedName("Hydrogen") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Hydrogen) - .registerBContainers( + GT_FluidFactory.builder("Oxygen").withLocalizedName("Oxygen").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Oxygen).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("Hydrogen").withLocalizedName("Hydrogen").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Hydrogen).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Deuterium") - .withLocalizedName("Deuterium") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Deuterium) - .registerBContainers( + GT_FluidFactory.builder("Deuterium").withLocalizedName("Deuterium").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Deuterium).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Deuterium, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Tritium") - .withLocalizedName("Tritium") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Tritium) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Tritium, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Helium") - .withLocalizedName("Helium") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Helium) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Argon") - .withLocalizedName("Argon") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Argon) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Argon, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Radon") - .withLocalizedName("Radon") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Radon) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Radon, 1L), ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("Tritium").withLocalizedName("Tritium").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Tritium).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Tritium, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("Helium").withLocalizedName("Helium").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Helium).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("Argon").withLocalizedName("Argon").withStateAndTemperature(GAS, 295).buildAndRegister() + .configureMaterials(Materials.Argon).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Argon, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("Radon").withLocalizedName("Radon").withStateAndTemperature(GAS, 295).buildAndRegister() + .configureMaterials(Materials.Radon).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Radon, 1L), + ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Fluorine") - .withLocalizedName("Fluorine") - .withStateAndTemperature(GAS, 53) - .buildAndRegister() - .configureMaterials(Materials.Fluorine) - .registerBContainers( + GT_FluidFactory.builder("Fluorine").withLocalizedName("Fluorine").withStateAndTemperature(GAS, 53) + .buildAndRegister().configureMaterials(Materials.Fluorine).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fluorine, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Titaniumtetrachloride") - .withLocalizedName("Titaniumtetrachloride") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Titaniumtetrachloride) - .registerBContainers( + GT_FluidFactory.builder("Titaniumtetrachloride").withLocalizedName("Titaniumtetrachloride") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() + .configureMaterials(Materials.Titaniumtetrachloride).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Titaniumtetrachloride, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Helium-3") - .withLocalizedName("Helium-3") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Helium_3) - .registerBContainers( + GT_FluidFactory.builder("Helium-3").withLocalizedName("Helium-3").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Helium_3).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium_3, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Methane") - .withLocalizedName("Methane") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Methane) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Nitrogen") - .withLocalizedName("Nitrogen") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Nitrogen) - .registerBContainers( + GT_FluidFactory.builder("Methane").withLocalizedName("Methane").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Methane).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("Nitrogen").withLocalizedName("Nitrogen").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Nitrogen).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("NitrogenDioxide") - .withLocalizedName("Nitrogen Dioxide") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.NitrogenDioxide) + GT_FluidFactory.builder("NitrogenDioxide").withLocalizedName("Nitrogen Dioxide") + .withStateAndTemperature(GAS, 295).buildAndRegister().configureMaterials(Materials.NitrogenDioxide) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrogenDioxide, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Steam") - .withLocalizedName("Steam") - .withStateAndTemperature(GAS, 375) - .buildAndRegister() + GT_FluidFactory.builder("Steam").withLocalizedName("Steam").withStateAndTemperature(GAS, 375).buildAndRegister() .configureMaterials(Materials.Water) .registerBContainers(GT_ModHandler.getIC2Item("steamCell", 1), Materials.Empty.getCells(1)); GT_Values.RA.addFluidCannerRecipe( @@ -910,429 +723,277 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { Materials.Water.mGas.setTemperature(375).setGaseous(true); ItemList.sOilExtraHeavy = GT_FluidFactory.of("liquid_extra_heavy_oil", "Very Heavy Oil", LIQUID, 295); - ItemList.sEpichlorhydrin = GT_FluidFactory.builder("liquid_epichlorhydrin") - .withLocalizedName("Epichlorohydrin") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Epichlorohydrin) - .registerBContainers(Materials.Epichlorohydrin.getCells(1), Materials.Empty.getCells(1)) - .asFluid(); + ItemList.sEpichlorhydrin = GT_FluidFactory.builder("liquid_epichlorhydrin").withLocalizedName("Epichlorohydrin") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.Epichlorohydrin) + .registerBContainers(Materials.Epichlorohydrin.getCells(1), Materials.Empty.getCells(1)).asFluid(); ItemList.sDrillingFluid = GT_FluidFactory.of("liquid_drillingfluid", "Drilling Fluid", LIQUID, 295); - ItemList.sToluene = GT_FluidFactory.builder("liquid_toluene") - .withLocalizedName("Toluene") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Toluene) - .registerBContainers(Materials.Toluene.getCells(1), Materials.Empty.getCells(1)) - .asFluid(); + ItemList.sToluene = GT_FluidFactory.builder("liquid_toluene").withLocalizedName("Toluene") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.Toluene) + .registerBContainers(Materials.Toluene.getCells(1), Materials.Empty.getCells(1)).asFluid(); ItemList.sNitrationMixture = GT_FluidFactory.builder("liquid_nitrationmixture") - .withLocalizedName("Nitration Mixture") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + .withLocalizedName("Nitration Mixture").withStateAndTemperature(LIQUID, 295).buildAndRegister() .configureMaterials(Materials.NitrationMixture) - .registerBContainers(Materials.NitrationMixture.getCells(1), Materials.Empty.getCells(1)) - .asFluid(); + .registerBContainers(Materials.NitrationMixture.getCells(1), Materials.Empty.getCells(1)).asFluid(); - GT_FluidFactory.builder("liquid_heavy_oil") - .withLocalizedName("Heavy Oil") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.OilHeavy) - .registerBContainers( + GT_FluidFactory.builder("liquid_heavy_oil").withLocalizedName("Heavy Oil").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.OilHeavy).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilHeavy, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_medium_oil") - .withLocalizedName("Raw Oil") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.OilMedium) - .registerBContainers( + GT_FluidFactory.builder("liquid_medium_oil").withLocalizedName("Raw Oil").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.OilMedium).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilMedium, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_light_oil") - .withLocalizedName("Light Oil") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.OilLight) - .registerBContainers( + GT_FluidFactory.builder("liquid_light_oil").withLocalizedName("Light Oil").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.OilLight).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilLight, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("gas_natural_gas") - .withLocalizedName("Natural Gas") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.NatruralGas) - .registerBContainers( + GT_FluidFactory.builder("gas_natural_gas").withLocalizedName("Natural Gas").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.NatruralGas).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NatruralGas, 1L), ItemList.Cell_Empty.get(1L)); - ItemList.sHydricSulfur = GT_FluidFactory.builder("liquid_hydricsulfur") - .withLocalizedName("Hydrogen Sulfide") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.HydricSulfide) + ItemList.sHydricSulfur = GT_FluidFactory.builder("liquid_hydricsulfur").withLocalizedName("Hydrogen Sulfide") + .withStateAndTemperature(GAS, 295).buildAndRegister().configureMaterials(Materials.HydricSulfide) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), ItemList.Cell_Empty.get(1L)) .asFluid(); - GT_FluidFactory.builder("gas_sulfuricgas") - .withLocalizedName("Sulfuric Gas") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.SulfuricGas) - .registerBContainers( + GT_FluidFactory.builder("gas_sulfuricgas").withLocalizedName("Sulfuric Gas").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.SulfuricGas).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricGas, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("gas_gas") - .withLocalizedName("Refinery Gas") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Gas) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_sulfuricnaphtha") - .withLocalizedName("Sulfuric Naphtha") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.SulfuricNaphtha) + GT_FluidFactory.builder("gas_gas").withLocalizedName("Refinery Gas").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Gas).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("liquid_sulfuricnaphtha").withLocalizedName("Sulfuric Naphtha") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.SulfuricNaphtha) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricNaphtha, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_sufluriclight_fuel") - .withLocalizedName("Sulfuric Light Fuel") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.SulfuricLightFuel) + GT_FluidFactory.builder("liquid_sufluriclight_fuel").withLocalizedName("Sulfuric Light Fuel") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.SulfuricLightFuel) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricLightFuel, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_sulfuricheavy_fuel") - .withLocalizedName("Sulfuric Heavy Fuel") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.SulfuricHeavyFuel) + GT_FluidFactory.builder("liquid_sulfuricheavy_fuel").withLocalizedName("Sulfuric Heavy Fuel") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.SulfuricHeavyFuel) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricHeavyFuel, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_naphtha") - .withLocalizedName("Naphtha") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Naphtha) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_light_fuel") - .withLocalizedName("Light Fuel") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.LightFuel) + GT_FluidFactory.builder("liquid_naphtha").withLocalizedName("Naphtha").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Naphtha).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("liquid_light_fuel").withLocalizedName("Light Fuel") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.LightFuel) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_heavy_fuel") - .withLocalizedName("Heavy Fuel") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.HeavyFuel) + GT_FluidFactory.builder("liquid_heavy_fuel").withLocalizedName("Heavy Fuel") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.HeavyFuel) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("liquid_lpg") - .withLocalizedName("LPG") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.LPG) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LPG, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("charcoal_byproducts") - .withTextureName("molten.autogenerated") - .withLocalizedName("Charcoal Byproducts") - .withColorRGBA(Materials.CharcoalByproducts.mRGBa) - .withStateAndTemperature(GAS, 775) - .buildAndRegister() - .configureMaterials(Materials.CharcoalByproducts) + GT_FluidFactory.builder("liquid_lpg").withLocalizedName("LPG").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.LPG).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LPG, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("charcoal_byproducts").withTextureName("molten.autogenerated") + .withLocalizedName("Charcoal Byproducts").withColorRGBA(Materials.CharcoalByproducts.mRGBa) + .withStateAndTemperature(GAS, 775).buildAndRegister().configureMaterials(Materials.CharcoalByproducts) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CharcoalByproducts, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("molten.bisphenol_a") - .withTextureName("molten.autogenerated") - .withLocalizedName("Molten Bisphenol A") - .withColorRGBA(Materials.BisphenolA.mRGBa) - .withStateAndTemperature(LIQUID, 432) - .buildAndRegister() - .configureMaterials(Materials.BisphenolA) + GT_FluidFactory.builder("molten.bisphenol_a").withTextureName("molten.autogenerated") + .withLocalizedName("Molten Bisphenol A").withColorRGBA(Materials.BisphenolA.mRGBa) + .withStateAndTemperature(LIQUID, 432).buildAndRegister().configureMaterials(Materials.BisphenolA) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.BisphenolA, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("UUAmplifier") - .withLocalizedName("UU Amplifier") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.UUAmplifier) - .registerBContainers( + GT_FluidFactory.builder("UUAmplifier").withLocalizedName("UU Amplifier").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.UUAmplifier).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.UUAmplifier, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Chlorine") - .withLocalizedName("Chlorine") - .withStateAndTemperature(GAS, 295) - .buildAndRegister() - .configureMaterials(Materials.Chlorine) - .registerBContainers( + GT_FluidFactory.builder("Chlorine").withLocalizedName("Chlorine").withStateAndTemperature(GAS, 295) + .buildAndRegister().configureMaterials(Materials.Chlorine).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Mercury") - .withLocalizedName("Mercury") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Mercury) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Mercury, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("NitroFuel") - .withLocalizedName("Cetane-Boosted Diesel") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.NitroFuel) + GT_FluidFactory.builder("Mercury").withLocalizedName("Mercury").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Mercury).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Mercury, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("NitroFuel").withLocalizedName("Cetane-Boosted Diesel") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.NitroFuel) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitroFuel, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("SodiumPersulfate") - .withLocalizedName("Sodium Persulfate") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.SodiumPersulfate) + GT_FluidFactory.builder("SodiumPersulfate").withLocalizedName("Sodium Persulfate") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.SodiumPersulfate) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SodiumPersulfate, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("Glyceryl") - .withLocalizedName("Glyceryl Trinitrate") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Glyceryl) + GT_FluidFactory.builder("Glyceryl").withLocalizedName("Glyceryl Trinitrate") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().configureMaterials(Materials.Glyceryl) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glyceryl, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("lubricant") - .withLocalizedName("Lubricant") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Lubricant) - .registerBContainers( + GT_FluidFactory.builder("lubricant").withLocalizedName("Lubricant").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Lubricant).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("creosote") - .withLocalizedName("Creosote Oil") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Creosote) - .registerBContainers( + GT_FluidFactory.builder("creosote").withLocalizedName("Creosote Oil").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Creosote).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("seedoil") - .withLocalizedName("Seed Oil") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.SeedOil) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("fishoil") - .withLocalizedName("Fish Oil") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.FishOil) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("oil") - .withLocalizedName("Oil") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Oil) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("fuel") - .withLocalizedName("Diesel") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Fuel) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("for.honey") - .withLocalizedName("Honey") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Honey) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("biomass") - .withLocalizedName("Biomass") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Biomass) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("bioethanol") - .withLocalizedName("Bio Ethanol") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Ethanol) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("sulfuricacid") - .withLocalizedName("Sulfuric Acid") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.SulfuricAcid) - .registerBContainers( + GT_FluidFactory.builder("seedoil").withLocalizedName("Seed Oil").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.SeedOil).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("fishoil").withLocalizedName("Fish Oil").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.FishOil).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("oil").withLocalizedName("Oil").withStateAndTemperature(LIQUID, 295).buildAndRegister() + .configureMaterials(Materials.Oil).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("fuel").withLocalizedName("Diesel").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Fuel).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("for.honey").withLocalizedName("Honey").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Honey).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("biomass").withLocalizedName("Biomass").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Biomass).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("bioethanol").withLocalizedName("Bio Ethanol").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Ethanol).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("sulfuricacid").withLocalizedName("Sulfuric Acid").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.SulfuricAcid).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("milk") - .withLocalizedName("Milk") - .withStateAndTemperature(LIQUID, 290) - .buildAndRegister() - .configureMaterials(Materials.Milk) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("mcguffium") - .withLocalizedName("Mc Guffium 239") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.McGuffium239) - .registerBContainers( + GT_FluidFactory.builder("milk").withLocalizedName("Milk").withStateAndTemperature(LIQUID, 290) + .buildAndRegister().configureMaterials(Materials.Milk).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("mcguffium").withLocalizedName("Mc Guffium 239").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.McGuffium239).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("refinedGlue") - .withLocalizedName("Refined Glue") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Glue) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("hotfryingoil") - .withLocalizedName("Hot Frying Oil") - .withStateAndTemperature(LIQUID, 400) - .buildAndRegister() - .configureMaterials(Materials.FryingOilHot) - .registerBContainers( + GT_FluidFactory.builder("refinedGlue").withLocalizedName("Refined Glue").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Glue).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), + ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("hotfryingoil").withLocalizedName("Hot Frying Oil").withStateAndTemperature(LIQUID, 400) + .buildAndRegister().configureMaterials(Materials.FryingOilHot).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FryingOilHot, 1L), ItemList.Cell_Empty.get(1L)); GT_FluidFactory.builder("DimensionallyTranscendentResidue") - .withLocalizedName("Dimensionally Transcendent Residue") - .withStateAndTemperature(LIQUID, 2000000000) - .buildAndRegister() - .configureMaterials(Materials.DimensionallyTranscendentResidue) - .registerBContainers( + .withLocalizedName("Dimensionally Transcendent Residue").withStateAndTemperature(LIQUID, 2000000000) + .buildAndRegister().configureMaterials(Materials.DimensionallyTranscendentResidue).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.DimensionallyTranscendentResidue, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("ExcitedDTCC") - .withLocalizedName("Excited Dimensionally Transcendent Crude Catalyst") - .withStateAndTemperature(LIQUID, 500000000) - .buildAndRegister() - .configureMaterials(Materials.ExcitedDTCC) + GT_FluidFactory.builder("ExcitedDTCC").withLocalizedName("Excited Dimensionally Transcendent Crude Catalyst") + .withStateAndTemperature(LIQUID, 500000000).buildAndRegister().configureMaterials(Materials.ExcitedDTCC) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTCC, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("ExcitedDTPC") - .withLocalizedName("Excited Dimensionally Transcendent Prosaic Catalyst") - .withStateAndTemperature(LIQUID, 500000000) - .buildAndRegister() - .configureMaterials(Materials.ExcitedDTPC) + GT_FluidFactory.builder("ExcitedDTPC").withLocalizedName("Excited Dimensionally Transcendent Prosaic Catalyst") + .withStateAndTemperature(LIQUID, 500000000).buildAndRegister().configureMaterials(Materials.ExcitedDTPC) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTPC, 1L), ItemList.Cell_Empty.get(1L)); GT_FluidFactory.builder("ExcitedDTRC") .withLocalizedName("Excited Dimensionally Transcendent Resplendent Catalyst") - .withStateAndTemperature(LIQUID, 500000000) - .buildAndRegister() - .configureMaterials(Materials.ExcitedDTRC) + .withStateAndTemperature(LIQUID, 500000000).buildAndRegister().configureMaterials(Materials.ExcitedDTRC) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTRC, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("ExcitedDTEC") - .withLocalizedName("Excited Dimensionally Transcendent Exotic Catalyst") - .withStateAndTemperature(LIQUID, 500000000) - .buildAndRegister() - .configureMaterials(Materials.ExcitedDTEC) + GT_FluidFactory.builder("ExcitedDTEC").withLocalizedName("Excited Dimensionally Transcendent Exotic Catalyst") + .withStateAndTemperature(LIQUID, 500000000).buildAndRegister().configureMaterials(Materials.ExcitedDTEC) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTEC, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder(Materials.RawStarMatter.mName) - .withLocalizedName(Materials.RawStarMatter.mLocalizedName) - .withStateAndTemperature(LIQUID, 10_000_000) - .buildAndRegister() - .configureMaterials(Materials.RawStarMatter) - .registerBContainers( + GT_FluidFactory.builder(Materials.RawStarMatter.mName).withLocalizedName(Materials.RawStarMatter.mLocalizedName) + .withStateAndTemperature(LIQUID, 10_000_000).buildAndRegister() + .configureMaterials(Materials.RawStarMatter).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.RawStarMatter, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder(Materials.Space.mName) - .withLocalizedName(Materials.Space.mLocalizedName) - .withStateAndTemperature(MOLTEN, 0) - .buildAndRegister() - .configureMaterials(Materials.Space) + GT_FluidFactory.builder(Materials.Space.mName).withLocalizedName(Materials.Space.mLocalizedName) + .withStateAndTemperature(MOLTEN, 0).buildAndRegister().configureMaterials(Materials.Space) .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Space, 1L), ItemList.Cell_Empty.get(1L)); + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Space, 1L), + ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder(Materials.Time.mName) - .withLocalizedName(Materials.Time.mLocalizedName) - .withStateAndTemperature(MOLTEN, 0) - .buildAndRegister() - .configureMaterials(Materials.Time) + GT_FluidFactory.builder(Materials.Time.mName).withLocalizedName(Materials.Time.mLocalizedName) + .withStateAndTemperature(MOLTEN, 0).buildAndRegister().configureMaterials(Materials.Time) .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Time, 1L), ItemList.Cell_Empty.get(1L)); + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Time, 1L), + ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("fieryblood") - .withLocalizedName("Fiery Blood") - .withStateAndTemperature(LIQUID, 6400) - .buildAndRegister() - .configureMaterials(Materials.FierySteel) - .registerBContainers( + GT_FluidFactory.builder("fieryblood").withLocalizedName("Fiery Blood").withStateAndTemperature(LIQUID, 6400) + .buildAndRegister().configureMaterials(Materials.FierySteel).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FierySteel, 1L), ItemList.Cell_Empty.get(1L)); - GT_FluidFactory.builder("holywater") - .withLocalizedName("Holy Water") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.HolyWater) - .registerBContainers( + GT_FluidFactory.builder("holywater").withLocalizedName("Holy Water").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.HolyWater).registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HolyWater, 1L), ItemList.Cell_Empty.get(1L)); if (ItemList.TF_Vial_FieryBlood.get(1L) != null) { - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - Materials.FierySteel.getFluid(250L), - ItemList.TF_Vial_FieryBlood.get(1L), - ItemList.Bottle_Empty.get(1L))); - - GT_FluidFactory.builder("liquid_sodium") - .withLocalizedName("Liquid Sodium") - .withStateAndTemperature(LIQUID, 495) - .buildAndRegister() - .configureMaterials(Materials.Sodium) + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + Materials.FierySteel.getFluid(250L), + ItemList.TF_Vial_FieryBlood.get(1L), + ItemList.Bottle_Empty.get(1L))); + + GT_FluidFactory.builder("liquid_sodium").withLocalizedName("Liquid Sodium") + .withStateAndTemperature(LIQUID, 495).buildAndRegister().configureMaterials(Materials.Sodium) .registerBContainers( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Sodium, 1L), ItemList.Cell_Empty.get(1L)); } - 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), ItemList.Bottle_Empty.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - Materials.HolyWater.getFluid(250L), ItemList.Bottle_Holy_Water.get(1L), ItemList.Bottle_Empty.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - Materials.McGuffium239.getFluid(250L), ItemList.McGuffium_239.get(1L), ItemList.Bottle_Empty.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - Materials.Fuel.getFluid(100L), - ItemList.Tool_Lighter_Invar_Full.get(1L), - ItemList.Tool_Lighter_Invar_Empty.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - Materials.Fuel.getFluid(1000L), - ItemList.Tool_Lighter_Platinum_Full.get(1L), - ItemList.Tool_Lighter_Platinum_Empty.get(1L))); + 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), + ItemList.Bottle_Empty.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + Materials.HolyWater.getFluid(250L), + ItemList.Bottle_Holy_Water.get(1L), + ItemList.Bottle_Empty.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + Materials.McGuffium239.getFluid(250L), + ItemList.McGuffium_239.get(1L), + ItemList.Bottle_Empty.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + Materials.Fuel.getFluid(100L), + ItemList.Tool_Lighter_Invar_Full.get(1L), + ItemList.Tool_Lighter_Invar_Empty.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + Materials.Fuel.getFluid(1000L), + ItemList.Tool_Lighter_Platinum_Full.get(1L), + ItemList.Tool_Lighter_Platinum_Empty.get(1L))); Dyes.dyeBlack.addFluidDye((Fluid) GT_FluidFactory.of("squidink", "Squid Ink", LIQUID, 295)); Dyes.dyeBlue.addFluidDye((Fluid) GT_FluidFactory.of("indigo", "Indigo Dye", LIQUID, 295)); @@ -1341,71 +1002,46 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { Fluid tFluid; tDye.addFluidDye( GT_FluidFactory.builder("dye.watermixed." + tDye.name().toLowerCase(Locale.ENGLISH)) - .withTextureName("dyes") - .withLocalizedName("Water Mixed " + tDye.mName + " Dye") - .withColorRGBA(tDye.getRGBA()) - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + .withTextureName("dyes").withLocalizedName("Water Mixed " + tDye.mName + " Dye") + .withColorRGBA(tDye.getRGBA()).withStateAndTemperature(LIQUID, 295).buildAndRegister() .asFluid()); tDye.addFluidDye( GT_FluidFactory.builder("dye.chemical." + tDye.name().toLowerCase(Locale.ENGLISH)) - .withTextureName("dyes") - .withLocalizedName("Chemical " + tDye.mName + " Dye") - .withColorRGBA(tDye.getRGBA()) - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + .withTextureName("dyes").withLocalizedName("Chemical " + tDye.mName + " Dye") + .withColorRGBA(tDye.getRGBA()).withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerContainers(ItemList.SPRAY_CAN_DYES[i].get(1L), ItemList.Spray_Empty.get(1L), 2304) .asFluid()); } - GT_FluidFactory.builder("ice") - .withLocalizedName("Crushed Ice") - .withStateAndTemperature(SLURRY, 270) - .buildAndRegister() - .configureMaterials(Materials.Ice) - .registerBContainers( - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), ItemList.Cell_Empty.get(1L)); + GT_FluidFactory.builder("ice").withLocalizedName("Crushed Ice").withStateAndTemperature(SLURRY, 270) + .buildAndRegister().configureMaterials(Materials.Ice).registerBContainers( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), + ItemList.Cell_Empty.get(1L)); Materials.Water.mSolid = Materials.Ice.mSolid; - GT_FluidFactory.builder("molten.glass") - .withLocalizedName("Molten Glass") - .withStateAndTemperature(MOLTEN, 1500) - .buildAndRegister() - .configureMaterials(Materials.Glass) - .registerContainers( + GT_FluidFactory.builder("molten.glass").withLocalizedName("Molten Glass").withStateAndTemperature(MOLTEN, 1500) + .buildAndRegister().configureMaterials(Materials.Glass).registerContainers( GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Glass, 1L), ItemList.Cell_Empty.get(1L), 144); - GT_FluidFactory.builder("molten.redstone") - .withLocalizedName("Molten Redstone") - .withStateAndTemperature(MOLTEN, 500) - .buildAndRegister() - .configureMaterials(Materials.Redstone) + GT_FluidFactory.builder("molten.redstone").withLocalizedName("Molten Redstone") + .withStateAndTemperature(MOLTEN, 500).buildAndRegister().configureMaterials(Materials.Redstone) .registerContainers( GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Redstone, 1L), ItemList.Cell_Empty.get(1L), 144); - GT_FluidFactory.builder("molten.blaze") - .withLocalizedName("Molten Blaze") - .withStateAndTemperature(MOLTEN, 6400) - .buildAndRegister() - .configureMaterials(Materials.Blaze) - .registerContainers( + GT_FluidFactory.builder("molten.blaze").withLocalizedName("Molten Blaze").withStateAndTemperature(MOLTEN, 6400) + .buildAndRegister().configureMaterials(Materials.Blaze).registerContainers( GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Blaze, 1L), ItemList.Cell_Empty.get(1L), 144); - GT_FluidFactory.builder("wet.concrete") - .withLocalizedName("Wet Concrete") - .withStateAndTemperature(MOLTEN, 300) - .buildAndRegister() - .configureMaterials(Materials.Concrete) - .registerContainers( + GT_FluidFactory.builder("wet.concrete").withLocalizedName("Wet Concrete").withStateAndTemperature(MOLTEN, 300) + .buildAndRegister().configureMaterials(Materials.Concrete).registerContainers( GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Concrete, 1L), ItemList.Cell_Empty.get(1L), 144); for (Materials tMaterial : Materials.values()) { - if ((tMaterial.mStandardMoltenFluid == null) - && (tMaterial.contains(SubTag.SMELTING_TO_FLUID)) + 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)) { @@ -1427,640 +1063,450 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { } } - GT_FluidFactory.builder("potion.awkward") - .withLocalizedName("Awkward Brew") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.awkward").withLocalizedName("Awkward Brew").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.thick") - .withLocalizedName("Thick Brew") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.thick").withLocalizedName("Thick Brew").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 32), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.mundane") - .withLocalizedName("Mundane Brew") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.mundane").withLocalizedName("Mundane Brew").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 64), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.damage") - .withLocalizedName("Harming Brew") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.damage").withLocalizedName("Harming Brew").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8204), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.damage.strong") - .withLocalizedName("Strong Harming Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.damage.strong").withLocalizedName("Strong Harming Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8236), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.damage.splash") - .withLocalizedName("Splash Harming Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.damage.splash").withLocalizedName("Splash Harming Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16396), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.damage.strong.splash") - .withLocalizedName("Strong Splash Harming Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.damage.strong.splash").withLocalizedName("Strong Splash Harming Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16428), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.health") - .withLocalizedName("Healing Brew") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.health").withLocalizedName("Healing Brew").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8197), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.health.strong") - .withLocalizedName("Strong Healing Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.health.strong").withLocalizedName("Strong Healing Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8229), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.health.splash") - .withLocalizedName("Splash Healing Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.health.splash").withLocalizedName("Splash Healing Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16389), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.health.strong.splash") - .withLocalizedName("Strong Splash Healing Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.health.strong.splash").withLocalizedName("Strong Splash Healing Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16421), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.speed") - .withLocalizedName("Swiftness Brew") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.speed").withLocalizedName("Swiftness Brew").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8194), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.speed.strong") - .withLocalizedName("Strong Swiftness Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.speed.strong").withLocalizedName("Strong Swiftness Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8226), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.speed.long") - .withLocalizedName("Stretched Swiftness Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.speed.long").withLocalizedName("Stretched Swiftness Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8258), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.speed.splash") - .withLocalizedName("Splash Swiftness Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.speed.splash").withLocalizedName("Splash Swiftness Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16386), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.speed.strong.splash") - .withLocalizedName("Strong Splash Swiftness Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.speed.strong.splash").withLocalizedName("Strong Splash Swiftness Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16418), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.speed.long.splash") - .withLocalizedName("Stretched Splash Swiftness Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.speed.long.splash").withLocalizedName("Stretched Splash Swiftness Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16450), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.strength") - .withLocalizedName("Strength Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.strength").withLocalizedName("Strength Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8201), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.strength.strong") - .withLocalizedName("Strong Strength Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.strength.strong").withLocalizedName("Strong Strength Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8233), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.strength.long") - .withLocalizedName("Stretched Strength Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.strength.long").withLocalizedName("Stretched Strength Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8265), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.strength.splash") - .withLocalizedName("Splash Strength Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.strength.splash").withLocalizedName("Splash Strength Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16393), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.strength.strong.splash") - .withLocalizedName("Strong Splash Strength Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.strength.strong.splash").withLocalizedName("Strong Splash Strength Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16425), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.strength.long.splash") - .withLocalizedName("Stretched Splash Strength Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.strength.long.splash").withLocalizedName("Stretched Splash Strength Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16457), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.regen") - .withLocalizedName("Regenerating Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.regen").withLocalizedName("Regenerating Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8193), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.regen.strong") - .withLocalizedName("Strong Regenerating Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.regen.strong").withLocalizedName("Strong Regenerating Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8225), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.regen.long") - .withLocalizedName("Stretched Regenerating Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.regen.long").withLocalizedName("Stretched Regenerating Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8257), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.regen.splash") - .withLocalizedName("Splash Regenerating Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.regen.splash").withLocalizedName("Splash Regenerating Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16385), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.regen.strong.splash") - .withLocalizedName("Strong Splash Regenerating Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.regen.strong.splash").withLocalizedName("Strong Splash Regenerating Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16417), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.regen.long.splash") - .withLocalizedName("Stretched Splash Regenerating Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.regen.long.splash").withLocalizedName("Stretched Splash Regenerating Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16449), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.poison") - .withLocalizedName("Poisonous Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.poison").withLocalizedName("Poisonous Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8196), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.poison.strong") - .withLocalizedName("Strong Poisonous Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.poison.strong").withLocalizedName("Strong Poisonous Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8228), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.poison.long") - .withLocalizedName("Stretched Poisonous Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.poison.long").withLocalizedName("Stretched Poisonous Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8260), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.poison.splash") - .withLocalizedName("Splash Poisonous Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.poison.splash").withLocalizedName("Splash Poisonous Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16388), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.poison.strong.splash") - .withLocalizedName("Strong Splash Poisonous Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.poison.strong.splash").withLocalizedName("Strong Splash Poisonous Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16420), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.poison.long.splash") - .withLocalizedName("Stretched Splash Poisonous Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.poison.long.splash").withLocalizedName("Stretched Splash Poisonous Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16452), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.fireresistance") - .withLocalizedName("Fire Resistant Brew") - .withStateAndTemperature(LIQUID, 375) - .buildAndRegister() + GT_FluidFactory.builder("potion.fireresistance").withLocalizedName("Fire Resistant Brew") + .withStateAndTemperature(LIQUID, 375).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8195), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.fireresistance.long") - .withLocalizedName("Stretched Fire Resistant Brew") - .withStateAndTemperature(LIQUID, 375) - .buildAndRegister() + GT_FluidFactory.builder("potion.fireresistance.long").withLocalizedName("Stretched Fire Resistant Brew") + .withStateAndTemperature(LIQUID, 375).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8259), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.fireresistance.splash") - .withLocalizedName("Splash Fire Resistant Brew") - .withStateAndTemperature(LIQUID, 375) - .buildAndRegister() + GT_FluidFactory.builder("potion.fireresistance.splash").withLocalizedName("Splash Fire Resistant Brew") + .withStateAndTemperature(LIQUID, 375).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16387), ItemList.Bottle_Empty.get(1L)); GT_FluidFactory.builder("potion.fireresistance.long.splash") - .withLocalizedName("Stretched Splash Fire Resistant Brew") - .withStateAndTemperature(LIQUID, 375) + .withLocalizedName("Stretched Splash Fire Resistant Brew").withStateAndTemperature(LIQUID, 375) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16451), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.nightvision") - .withLocalizedName("Night Vision Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.nightvision").withLocalizedName("Night Vision Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8198), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.nightvision.long") - .withLocalizedName("Stretched Night Vision Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.nightvision.long").withLocalizedName("Stretched Night Vision Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8262), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.nightvision.splash") - .withLocalizedName("Splash Night Vision Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.nightvision.splash").withLocalizedName("Splash Night Vision Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16390), ItemList.Bottle_Empty.get(1L)); GT_FluidFactory.builder("potion.nightvision.long.splash") - .withLocalizedName("Stretched Splash Night Vision Brew") - .withStateAndTemperature(LIQUID, 295) + .withLocalizedName("Stretched Splash Night Vision Brew").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16454), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.weakness") - .withLocalizedName("Weakening Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.weakness").withLocalizedName("Weakening Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8200), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.weakness.long") - .withLocalizedName("Stretched Weakening Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.weakness.long").withLocalizedName("Stretched Weakening Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8264), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.weakness.splash") - .withLocalizedName("Splash Weakening Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.weakness.splash").withLocalizedName("Splash Weakening Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16392), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.weakness.long.splash") - .withLocalizedName("Stretched Splash Weakening Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.weakness.long.splash").withLocalizedName("Stretched Splash Weakening Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16456), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.slowness") - .withLocalizedName("Lame Brew") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.slowness").withLocalizedName("Lame Brew").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8202), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.slowness.long") - .withLocalizedName("Stretched Lame Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.slowness.long").withLocalizedName("Stretched Lame Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8266), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.slowness.splash") - .withLocalizedName("Splash Lame Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.slowness.splash").withLocalizedName("Splash Lame Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16394), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.slowness.long.splash") - .withLocalizedName("Stretched Splash Lame Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.slowness.long.splash").withLocalizedName("Stretched Splash Lame Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16458), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.waterbreathing") - .withLocalizedName("Fishy Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.waterbreathing").withLocalizedName("Fishy Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8205), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.waterbreathing.long") - .withLocalizedName("Stretched Fishy Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.waterbreathing.long").withLocalizedName("Stretched Fishy Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8269), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.waterbreathing.splash") - .withLocalizedName("Splash Fishy Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.waterbreathing.splash").withLocalizedName("Splash Fishy Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16397), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.waterbreathing.long.splash") - .withLocalizedName("Stretched Splash Fishy Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.waterbreathing.long.splash").withLocalizedName("Stretched Splash Fishy Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16461), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.invisibility") - .withLocalizedName("Invisible Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.invisibility").withLocalizedName("Invisible Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8206), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.invisibility.long") - .withLocalizedName("Stretched Invisible Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.invisibility.long").withLocalizedName("Stretched Invisible Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 8270), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.invisibility.splash") - .withLocalizedName("Splash Invisible Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.invisibility.splash").withLocalizedName("Splash Invisible Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16398), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.invisibility.long.splash") - .withLocalizedName("Stretched Splash Invisible Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.invisibility.long.splash").withLocalizedName("Stretched Splash Invisible Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(new ItemStack(Items.potionitem, 1, 16462), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.purpledrink") - .withLocalizedName("Purple Drink") - .withStateAndTemperature(LIQUID, 275) - .buildAndRegister() + GT_FluidFactory.builder("potion.purpledrink").withLocalizedName("Purple Drink") + .withStateAndTemperature(LIQUID, 275).buildAndRegister() .registerPContainers(ItemList.Bottle_Purple_Drink.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.grapejuice") - .withLocalizedName("Grape Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.grapejuice").withLocalizedName("Grape Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Grape_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.wine") - .withLocalizedName("Wine") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .registerPContainers(ItemList.Bottle_Wine.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.vinegar") - .withLocalizedName("Vinegar") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .configureMaterials(Materials.Vinegar) + GT_FluidFactory.builder("potion.wine").withLocalizedName("Wine").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().registerPContainers(ItemList.Bottle_Wine.get(1L), ItemList.Bottle_Empty.get(1L)); + GT_FluidFactory.builder("potion.vinegar").withLocalizedName("Vinegar").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().configureMaterials(Materials.Vinegar) .registerPContainers(ItemList.Bottle_Vinegar.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.potatojuice") - .withLocalizedName("Potato Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.potatojuice").withLocalizedName("Potato Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Potato_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.vodka") - .withLocalizedName("Vodka") - .withStateAndTemperature(LIQUID, 275) - .buildAndRegister() - .registerPContainers(ItemList.Bottle_Vodka.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.leninade") - .withLocalizedName("Leninade") - .withStateAndTemperature(LIQUID, 275) + GT_FluidFactory.builder("potion.vodka").withLocalizedName("Vodka").withStateAndTemperature(LIQUID, 275) + .buildAndRegister().registerPContainers(ItemList.Bottle_Vodka.get(1L), ItemList.Bottle_Empty.get(1L)); + GT_FluidFactory.builder("potion.leninade").withLocalizedName("Leninade").withStateAndTemperature(LIQUID, 275) .buildAndRegister() .registerPContainers(ItemList.Bottle_Leninade.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.mineralwater") - .withLocalizedName("Mineral Water") - .withStateAndTemperature(LIQUID, 275) - .buildAndRegister() + GT_FluidFactory.builder("potion.mineralwater").withLocalizedName("Mineral Water") + .withStateAndTemperature(LIQUID, 275).buildAndRegister() .registerPContainers(ItemList.Bottle_Mineral_Water.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.saltywater") - .withLocalizedName("Salty Water") - .withStateAndTemperature(LIQUID, 275) - .buildAndRegister() + GT_FluidFactory.builder("potion.saltywater").withLocalizedName("Salty Water") + .withStateAndTemperature(LIQUID, 275).buildAndRegister() .registerPContainers(ItemList.Bottle_Salty_Water.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.reedwater") - .withLocalizedName("Reed Water") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.reedwater").withLocalizedName("Reed Water").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(ItemList.Bottle_Reed_Water.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.rum") - .withLocalizedName("Rum") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .registerPContainers(ItemList.Bottle_Rum.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.piratebrew") - .withLocalizedName("Pirate Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.rum").withLocalizedName("Rum").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().registerPContainers(ItemList.Bottle_Rum.get(1L), ItemList.Bottle_Empty.get(1L)); + GT_FluidFactory.builder("potion.piratebrew").withLocalizedName("Pirate Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Pirate_Brew.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.hopsjuice") - .withLocalizedName("Hops Juice") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.hopsjuice").withLocalizedName("Hops Juice").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(ItemList.Bottle_Hops_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.darkbeer") - .withLocalizedName("Dark Beer") - .withStateAndTemperature(LIQUID, 275) + GT_FluidFactory.builder("potion.darkbeer").withLocalizedName("Dark Beer").withStateAndTemperature(LIQUID, 275) .buildAndRegister() .registerPContainers(ItemList.Bottle_Dark_Beer.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.dragonblood") - .withLocalizedName("Dragon Blood") - .withStateAndTemperature(LIQUID, 375) - .buildAndRegister() + GT_FluidFactory.builder("potion.dragonblood").withLocalizedName("Dragon Blood") + .withStateAndTemperature(LIQUID, 375).buildAndRegister() .registerPContainers(ItemList.Bottle_Dragon_Blood.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.wheatyjuice") - .withLocalizedName("Wheaty Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.wheatyjuice").withLocalizedName("Wheaty Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Wheaty_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.scotch") - .withLocalizedName("Scotch") - .withStateAndTemperature(LIQUID, 275) - .buildAndRegister() - .registerPContainers(ItemList.Bottle_Scotch.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.glenmckenner") - .withLocalizedName("Glen McKenner") - .withStateAndTemperature(LIQUID, 275) - .buildAndRegister() + GT_FluidFactory.builder("potion.scotch").withLocalizedName("Scotch").withStateAndTemperature(LIQUID, 275) + .buildAndRegister().registerPContainers(ItemList.Bottle_Scotch.get(1L), ItemList.Bottle_Empty.get(1L)); + GT_FluidFactory.builder("potion.glenmckenner").withLocalizedName("Glen McKenner") + .withStateAndTemperature(LIQUID, 275).buildAndRegister() .registerPContainers(ItemList.Bottle_Glen_McKenner.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.wheatyhopsjuice") - .withLocalizedName("Wheaty Hops Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.wheatyhopsjuice").withLocalizedName("Wheaty Hops Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Wheaty_Hops_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.beer") - .withLocalizedName("Beer") - .withStateAndTemperature(LIQUID, 275) - .buildAndRegister() - .registerPContainers(ItemList.Bottle_Beer.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.chillysauce") - .withLocalizedName("Chilly Sauce") - .withStateAndTemperature(LIQUID, 375) - .buildAndRegister() + GT_FluidFactory.builder("potion.beer").withLocalizedName("Beer").withStateAndTemperature(LIQUID, 275) + .buildAndRegister().registerPContainers(ItemList.Bottle_Beer.get(1L), ItemList.Bottle_Empty.get(1L)); + GT_FluidFactory.builder("potion.chillysauce").withLocalizedName("Chilly Sauce") + .withStateAndTemperature(LIQUID, 375).buildAndRegister() .registerPContainers(ItemList.Bottle_Chilly_Sauce.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.hotsauce") - .withLocalizedName("Hot Sauce") - .withStateAndTemperature(LIQUID, 380) + GT_FluidFactory.builder("potion.hotsauce").withLocalizedName("Hot Sauce").withStateAndTemperature(LIQUID, 380) .buildAndRegister() .registerPContainers(ItemList.Bottle_Hot_Sauce.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.diabolosauce") - .withLocalizedName("Diabolo Sauce") - .withStateAndTemperature(LIQUID, 385) - .buildAndRegister() + GT_FluidFactory.builder("potion.diabolosauce").withLocalizedName("Diabolo Sauce") + .withStateAndTemperature(LIQUID, 385).buildAndRegister() .registerPContainers(ItemList.Bottle_Diabolo_Sauce.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.diablosauce") - .withLocalizedName("Diablo Sauce") - .withStateAndTemperature(LIQUID, 390) - .buildAndRegister() + GT_FluidFactory.builder("potion.diablosauce").withLocalizedName("Diablo Sauce") + .withStateAndTemperature(LIQUID, 390).buildAndRegister() .registerPContainers(ItemList.Bottle_Diablo_Sauce.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.diablosauce.strong") - .withLocalizedName("Old Man Snitches glitched Diablo Sauce") - .withStateAndTemperature(LIQUID, 999) - .buildAndRegister() + GT_FluidFactory.builder("potion.diablosauce.strong").withLocalizedName("Old Man Snitches glitched Diablo Sauce") + .withStateAndTemperature(LIQUID, 999).buildAndRegister() .registerPContainers(ItemList.Bottle_Snitches_Glitch_Sauce.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.applejuice") - .withLocalizedName("Apple Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.applejuice").withLocalizedName("Apple Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Apple_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.cider") - .withLocalizedName("Cider") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .registerPContainers(ItemList.Bottle_Cider.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.goldenapplejuice") - .withLocalizedName("Golden Apple Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.cider").withLocalizedName("Cider").withStateAndTemperature(LIQUID, 295) + .buildAndRegister().registerPContainers(ItemList.Bottle_Cider.get(1L), ItemList.Bottle_Empty.get(1L)); + GT_FluidFactory.builder("potion.goldenapplejuice").withLocalizedName("Golden Apple Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Golden_Apple_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.goldencider") - .withLocalizedName("Golden Cider") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.goldencider").withLocalizedName("Golden Cider") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Golden_Cider.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.idunsapplejuice") - .withLocalizedName("Idun's Apple Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.idunsapplejuice").withLocalizedName("Idun's Apple Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Iduns_Apple_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.notchesbrew") - .withLocalizedName("Notches Brew") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.notchesbrew").withLocalizedName("Notches Brew") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Notches_Brew.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.lemonjuice") - .withLocalizedName("Lemon Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.lemonjuice").withLocalizedName("Lemon Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Lemon_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.limoncello") - .withLocalizedName("Limoncello") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.limoncello").withLocalizedName("Limoncello") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.Bottle_Limoncello.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.lemonade") - .withLocalizedName("Lemonade") - .withStateAndTemperature(LIQUID, 275) + GT_FluidFactory.builder("potion.lemonade").withLocalizedName("Lemonade").withStateAndTemperature(LIQUID, 275) .buildAndRegister() .registerPContainers(ItemList.Bottle_Lemonade.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.alcopops") - .withLocalizedName("Alcopops") - .withStateAndTemperature(LIQUID, 275) + GT_FluidFactory.builder("potion.alcopops").withLocalizedName("Alcopops").withStateAndTemperature(LIQUID, 275) .buildAndRegister() .registerPContainers(ItemList.Bottle_Alcopops.get(1L), ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.cavejohnsonsgrenadejuice") - .withLocalizedName("Cave Johnsons Grenade Juice") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .registerPContainers( - ItemList.Bottle_Cave_Johnsons_Grenade_Juice.get(1L), ItemList.Bottle_Empty.get(1L)); + GT_FluidFactory.builder("potion.cavejohnsonsgrenadejuice").withLocalizedName("Cave Johnsons Grenade Juice") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().registerPContainers( + ItemList.Bottle_Cave_Johnsons_Grenade_Juice.get(1L), + ItemList.Bottle_Empty.get(1L)); - GT_FluidFactory.builder("potion.darkcoffee") - .withLocalizedName("Dark Coffee") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.darkcoffee").withLocalizedName("Dark Coffee") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.ThermosCan_Dark_Coffee.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.darkcafeaulait") - .withLocalizedName("Dark Cafe au lait") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.darkcafeaulait").withLocalizedName("Dark Cafe au lait") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.ThermosCan_Dark_Cafe_au_lait.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.coffee") - .withLocalizedName("Coffee") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.coffee").withLocalizedName("Coffee").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(ItemList.ThermosCan_Coffee.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.cafeaulait") - .withLocalizedName("Cafe au lait") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.cafeaulait").withLocalizedName("Cafe au lait") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.ThermosCan_Cafe_au_lait.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.laitaucafe") - .withLocalizedName("Lait au cafe") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.laitaucafe").withLocalizedName("Lait au cafe") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.ThermosCan_Lait_au_cafe.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.darkchocolatemilk") - .withLocalizedName("Bitter Chocolate Milk") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .registerPContainers( - ItemList.ThermosCan_Dark_Chocolate_Milk.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.chocolatemilk") - .withLocalizedName("Chocolate Milk") - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() + GT_FluidFactory.builder("potion.darkchocolatemilk").withLocalizedName("Bitter Chocolate Milk") + .withStateAndTemperature(LIQUID, 295).buildAndRegister().registerPContainers( + ItemList.ThermosCan_Dark_Chocolate_Milk.get(1L), + ItemList.ThermosCan_Empty.get(1L)); + GT_FluidFactory.builder("potion.chocolatemilk").withLocalizedName("Chocolate Milk") + .withStateAndTemperature(LIQUID, 295).buildAndRegister() .registerPContainers(ItemList.ThermosCan_Chocolate_Milk.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.tea") - .withLocalizedName("Tea") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.tea").withLocalizedName("Tea").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(ItemList.ThermosCan_Tea.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.sweettea") - .withLocalizedName("Sweet Tea") - .withStateAndTemperature(LIQUID, 295) + GT_FluidFactory.builder("potion.sweettea").withLocalizedName("Sweet Tea").withStateAndTemperature(LIQUID, 295) .buildAndRegister() .registerPContainers(ItemList.ThermosCan_Sweet_Tea.get(1L), ItemList.ThermosCan_Empty.get(1L)); - GT_FluidFactory.builder("potion.icetea") - .withLocalizedName("Ice Tea") - .withStateAndTemperature(LIQUID, 255) + GT_FluidFactory.builder("potion.icetea").withLocalizedName("Ice Tea").withStateAndTemperature(LIQUID, 255) .buildAndRegister() .registerPContainers(ItemList.ThermosCan_Ice_Tea.get(1L), ItemList.ThermosCan_Empty.get(1L)); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison.strong", 750), - ItemList.IC2_Spray_WeedEx.get(1L), - ItemList.Spray_Empty.get(1L))); - - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison", 125), - ItemList.Arrow_Head_Glass_Poison.get(1L), - ItemList.Arrow_Head_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison.long", 125), - ItemList.Arrow_Head_Glass_Poison_Long.get(1L), - ItemList.Arrow_Head_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison.strong", 125), - ItemList.Arrow_Head_Glass_Poison_Strong.get(1L), - ItemList.Arrow_Head_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.slowness", 125), - ItemList.Arrow_Head_Glass_Slowness.get(1L), - ItemList.Arrow_Head_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.slowness.long", 125), - ItemList.Arrow_Head_Glass_Slowness_Long.get(1L), - ItemList.Arrow_Head_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.weakness", 125), - ItemList.Arrow_Head_Glass_Weakness.get(1L), - ItemList.Arrow_Head_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.weakness.long", 125), - ItemList.Arrow_Head_Glass_Weakness_Long.get(1L), - ItemList.Arrow_Head_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("holywater", 125), - ItemList.Arrow_Head_Glass_Holy_Water.get(1L), - ItemList.Arrow_Head_Glass_Emtpy.get(1L))); - - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison", 125), - ItemList.Arrow_Wooden_Glass_Poison.get(1L), - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison.long", 125), - ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L), - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison.strong", 125), - ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L), - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.slowness", 125), - ItemList.Arrow_Wooden_Glass_Slowness.get(1L), - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.slowness.long", 125), - ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L), - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.weakness", 125), - ItemList.Arrow_Wooden_Glass_Weakness.get(1L), - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.weakness.long", 125), - ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L), - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("holywater", 125), - ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L), - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); - - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison", 125), - ItemList.Arrow_Plastic_Glass_Poison.get(1L), - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison.long", 125), - ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L), - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.poison.strong", 125), - ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L), - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.slowness", 125), - ItemList.Arrow_Plastic_Glass_Slowness.get(1L), - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.slowness.long", 125), - ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L), - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.weakness", 125), - ItemList.Arrow_Plastic_Glass_Weakness.get(1L), - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("potion.weakness.long", 125), - ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L), - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( - FluidRegistry.getFluidStack("holywater", 125), - ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L), - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.strong", 750), + ItemList.IC2_Spray_WeedEx.get(1L), + ItemList.Spray_Empty.get(1L))); + + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison", 125), + ItemList.Arrow_Head_Glass_Poison.get(1L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.long", 125), + ItemList.Arrow_Head_Glass_Poison_Long.get(1L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.strong", 125), + ItemList.Arrow_Head_Glass_Poison_Strong.get(1L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness", 125), + ItemList.Arrow_Head_Glass_Slowness.get(1L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness.long", 125), + ItemList.Arrow_Head_Glass_Slowness_Long.get(1L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness", 125), + ItemList.Arrow_Head_Glass_Weakness.get(1L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness.long", 125), + ItemList.Arrow_Head_Glass_Weakness_Long.get(1L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("holywater", 125), + ItemList.Arrow_Head_Glass_Holy_Water.get(1L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L))); + + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison", 125), + ItemList.Arrow_Wooden_Glass_Poison.get(1L), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.long", 125), + ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.strong", 125), + ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness", 125), + ItemList.Arrow_Wooden_Glass_Slowness.get(1L), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness.long", 125), + ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness", 125), + ItemList.Arrow_Wooden_Glass_Weakness.get(1L), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness.long", 125), + ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("holywater", 125), + ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L))); + + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison", 125), + ItemList.Arrow_Plastic_Glass_Poison.get(1L), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.long", 125), + ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.strong", 125), + ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness", 125), + ItemList.Arrow_Plastic_Glass_Slowness.get(1L), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness.long", 125), + ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness", 125), + ItemList.Arrow_Plastic_Glass_Weakness.get(1L), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness.long", 125), + ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); + FluidContainerRegistry.registerFluidContainer( + new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("holywater", 125), + ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L))); if (!GT_Values.D1) { try { Class.forName("codechicken.nei.api.API"); @@ -2113,44 +1559,60 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { 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.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)); + OrePrefixes.gem, + Materials.InfusedFire, + GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 1)); GT_OreDictUnificator.set( - OrePrefixes.gem, Materials.InfusedOrder, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 4)); + OrePrefixes.gem, + Materials.InfusedWater, + GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 2)); GT_OreDictUnificator.set( - OrePrefixes.gem, Materials.InfusedEntropy, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 5)); + OrePrefixes.gem, + Materials.InfusedEarth, + GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 3)); GT_OreDictUnificator.set( - OrePrefixes.nugget, Materials.Mercury, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 5)); + OrePrefixes.gem, + Materials.InfusedOrder, + GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 4)); GT_OreDictUnificator.set( - OrePrefixes.nugget, Materials.Thaumium, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 6)); + OrePrefixes.gem, + Materials.InfusedEntropy, + GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 5)); 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)); - + OrePrefixes.nugget, + Materials.Mercury, + GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 5)); GT_OreDictUnificator.set( - OrePrefixes.nugget, Materials.Void, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 7)); + OrePrefixes.nugget, + Materials.Thaumium, + GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 6)); GT_OreDictUnificator.set( - OrePrefixes.ingot, Materials.Void, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 16)); + 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)); + 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, @@ -2160,10 +1622,12 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { false); } - if (GregTech_API.sUnification.get( - ConfigCategories.specialunificationtargets + "." + "railcraft", "plateSteel", true)) { + 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)); + OrePrefixes.plate, + Materials.Steel, + GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 1)); } else { GT_OreDictUnificator.set( OrePrefixes.plate, @@ -2173,10 +1637,12 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { false); } - if (GregTech_API.sUnification.get( - ConfigCategories.specialunificationtargets + "." + "railcraft", "plateTinAlloy", true)) { + 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)); + OrePrefixes.plate, + Materials.TinAlloy, + GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 2)); } else { GT_OreDictUnificator.set( OrePrefixes.plate, @@ -2186,10 +1652,12 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { false); } - if (GregTech_API.sUnification.get( - ConfigCategories.specialunificationtargets + "." + "railcraft", "plateCopper", true)) { + 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)); + OrePrefixes.plate, + Materials.Copper, + GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 3)); } else { GT_OreDictUnificator.set( OrePrefixes.plate, @@ -2200,11 +1668,13 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { } GT_OreDictUnificator.set( - OrePrefixes.dust, Materials.Cocoa, GT_ModHandler.getModItem("harvestcraft", "cocoapowderItem", 1L, 0)); + OrePrefixes.dust, + Materials.Cocoa, + GT_ModHandler.getModItem("harvestcraft", "cocoapowderItem", 1L, 0)); GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Coffee, ItemList.IC2_CoffeePowder.get(1L)); - GregTech_API.registerMachineBlock( - GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("reinforcedGlass", 0)), 0); + GregTech_API + .registerMachineBlock(GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("reinforcedGlass", 0)), 0); GregTech_API.sSolenoidCoilCasings = new GT_Cyclotron_Coils(); } 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 d04d214073..ae2bc1b5f1 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1,5 +1,10 @@ package gregtech.loaders.preload; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + import codechicken.nei.api.API; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; @@ -22,188 +27,185 @@ import gregtech.common.tileentities.storage.*; import gregtech.loaders.postload.GT_PCBFactoryMaterialLoader; import gregtech.loaders.postload.GT_ProcessingArrayRecipeLoader; import ic2.core.Ic2Items; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; // Free IDs left for machines in GT as of 29th of July 2022 - Colen. Please try use them up in order. -// 358 -// 359 -// 366 -// 367 -// 368 -// 369 -// 370 -// 376 -// 377 -// 378 -// 379 -// 386 -// 387 -// 388 -// 389 -// 390 -// 396 -// 397 -// 398 -// 399 -// 410 -// 419 -// 426 -// 427 -// 428 -// 429 -// 430 -// 436 -// 437 -// 438 -// 439 -// 446 -// 447 -// 448 -// 449 -// 450 -// 456 -// 457 -// 458 -// 459 -// 466 -// 467 -// 468 -// 469 -// 470 -// 476 -// 477 -// 478 -// 479 -// 486 -// 487 -// 488 -// 489 -// 496 -// 497 -// 498 -// 499 -// 506 -// 507 -// 508 -// 509 -// 518 -// 519 -// 526 -// 530 -// 537 -// 538 -// 539 -// 546 -// 547 -// 548 -// 549 -// 550 -// 556 -// 557 -// 558 -// 559 -// 566 -// 567 -// 576 -// 577 -// 578 -// 579 -// 586 -// 587 -// 588 -// 589 -// 590 -// 596 -// 597 -// 598 -// 599 -// 607 -// 608 -// 609 -// 610 -// 616 -// 617 -// 618 -// 619 -// 626 -// 627 -// 628 -// 629 -// 630 -// 636 -// 637 -// 639 -// 646 -// 647 -// 648 -// 649 -// 650 -// 656 -// 657 -// 658 -// 659 -// 666 -// 667 -// 668 -// 669 -// 670 -// 676 -// 677 -// 678 -// 682 -// 683 -// 684 -// 686 -// 687 -// 688 -// 689 -// 702 -// 703 -// 704 -// 705 -// 706 -// 707 -// 708 -// 709 -// 714 -// 715 -// 716 -// 717 -// 718 -// 719 -// 721 -// 722 -// 723 -// 724 -// 725 -// 726 -// 727 -// 728 -// 729 -// 730 -// 731 -// 732 -// 733 -// 734 -// 735 -// 736 -// 737 -// 738 -// 739 -// 741 -// 742 -// 743 -// 744 -// 745 -// 746 -// 747 -// 748 -// 749 +// 358 +// 359 +// 366 +// 367 +// 368 +// 369 +// 370 +// 376 +// 377 +// 378 +// 379 +// 386 +// 387 +// 388 +// 389 +// 390 +// 396 +// 397 +// 398 +// 399 +// 410 +// 419 +// 426 +// 427 +// 428 +// 429 +// 430 +// 436 +// 437 +// 438 +// 439 +// 446 +// 447 +// 448 +// 449 +// 450 +// 456 +// 457 +// 458 +// 459 +// 466 +// 467 +// 468 +// 469 +// 470 +// 476 +// 477 +// 478 +// 479 +// 486 +// 487 +// 488 +// 489 +// 496 +// 497 +// 498 +// 499 +// 506 +// 507 +// 508 +// 509 +// 518 +// 519 +// 526 +// 530 +// 537 +// 538 +// 539 +// 546 +// 547 +// 548 +// 549 +// 550 +// 556 +// 557 +// 558 +// 559 +// 566 +// 567 +// 576 +// 577 +// 578 +// 579 +// 586 +// 587 +// 588 +// 589 +// 590 +// 596 +// 597 +// 598 +// 599 +// 607 +// 608 +// 609 +// 610 +// 616 +// 617 +// 618 +// 619 +// 626 +// 627 +// 628 +// 629 +// 630 +// 636 +// 637 +// 639 +// 646 +// 647 +// 648 +// 649 +// 650 +// 656 +// 657 +// 658 +// 659 +// 666 +// 667 +// 668 +// 669 +// 670 +// 676 +// 677 +// 678 +// 682 +// 683 +// 684 +// 686 +// 687 +// 688 +// 689 +// 702 +// 703 +// 704 +// 705 +// 706 +// 707 +// 708 +// 709 +// 714 +// 715 +// 716 +// 717 +// 718 +// 719 +// 721 +// 722 +// 723 +// 724 +// 725 +// 726 +// 727 +// 728 +// 729 +// 730 +// 731 +// 732 +// 733 +// 734 +// 735 +// 736 +// 737 +// 738 +// 739 +// 741 +// 742 +// 743 +// 744 +// 745 +// 746 +// 747 +// 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"; @@ -218,593 +220,496 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 + + 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 + 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_Pipe_Polybenzimidazole.get(1L), bits, new Object[] { - "PIP", - "IFI", - "PIP", - 'P', - OrePrefixes.plate.get(Materials.Polybenzimidazole), - 'F', - OrePrefixes.frameGt.get(Materials.Polybenzimidazole), - 'I', - OrePrefixes.pipeMedium.get(Materials.Polybenzimidazole) - }); - 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.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_Pipe_Polybenzimidazole.get(1L), + bits, + new Object[] { "PIP", "IFI", "PIP", 'P', OrePrefixes.plate.get(Materials.Polybenzimidazole), 'F', + OrePrefixes.frameGt.get(Materials.Polybenzimidazole), 'I', + OrePrefixes.pipeMedium.get(Materials.Polybenzimidazole) }); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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}); + 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)); + 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)); + 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) - }); + 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)); @@ -821,379 +726,239 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + 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) - }); + new Object[] { aTextCableHull, 'M', ItemList.Casing_MAX, 'C', + OrePrefixes.wireGt04.get(Materials.SuperconductorUV) }); } - ItemList.Transformer_LV_ULV.set(new GT_MetaTileEntity_Transformer( + 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( + "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( + "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( + "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 - }); + "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)); @@ -1216,57 +981,25 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }); + 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)); @@ -1289,57 +1022,27 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }); + 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)); @@ -1361,30 +1064,62 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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_Input_Multi_2x2_UHV.set(new GT_MetaTileEntity_Hatch_MultiInput( - 714, 4, "hatch.multi.input.tier.06", "Quadruple Input Hatch (UHV)", 9) - .getStackForm(1L)); - ItemList.Hatch_Input_Multi_2x2_UEV.set(new GT_MetaTileEntity_Hatch_MultiInput( - 715, 4, "hatch.multi.input.tier.07", "Quadruple Input Hatch (UEV)", 10) - .getStackForm(1L)); - ItemList.Hatch_Input_Multi_2x2_UIV.set(new GT_MetaTileEntity_Hatch_MultiInput( - 716, 4, "hatch.multi.input.tier.08", "Quadruple Input Hatch (UIV)", 11) - .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_Input_Multi_2x2_UHV.set( + new GT_MetaTileEntity_Hatch_MultiInput( + 714, + 4, + "hatch.multi.input.tier.06", + "Quadruple Input Hatch (UHV)", + 9).getStackForm(1L)); + ItemList.Hatch_Input_Multi_2x2_UEV.set( + new GT_MetaTileEntity_Hatch_MultiInput( + 715, + 4, + "hatch.multi.input.tier.07", + "Quadruple Input Hatch (UEV)", + 10).getStackForm(1L)); + ItemList.Hatch_Input_Multi_2x2_UIV.set( + new GT_MetaTileEntity_Hatch_MultiInput( + 716, + 4, + "hatch.multi.input.tier.08", + "Quadruple Input Hatch (UIV)", + 11).getStackForm(1L)); ItemList.Hatch_Output_ULV.set( new GT_MetaTileEntity_Hatch_Output(60, "hatch.output.tier.00", "Output Hatch (ULV)", 0) @@ -1444,38 +1179,47 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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_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_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.AdvDebugStructureWriter.set(new GT_MetaTileEntity_AdvDebugStructureWriter( - 349, "advdebugstructurewriter", "Advanced Debug Structure Writer", 5) - .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.AdvDebugStructureWriter.set( + new GT_MetaTileEntity_AdvDebugStructureWriter( + 349, + "advdebugstructurewriter", + "Advanced Debug Structure Writer", + 5).getStackForm(1L)); if (GregTech_API.mAE2) { ItemList.Hatch_Output_Bus_ME.set( @@ -1558,47 +1302,37 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC .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_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)); @@ -1609,55 +1343,27 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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) - }); + 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) @@ -1687,105 +1393,62 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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)); + 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_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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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)); + GT_ModHandler.addCraftingRecipe( + ItemList.Machine_Bronze_Boiler.get(1L), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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( @@ -1822,1071 +1485,1002 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC new GT_MetaTileEntity_AlloySmelter_Steel(119, "hpmachine.alloysmelter", "High Pressure Alloy Smelter") .getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Furnace.get(1L), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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), bitsd, 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) - }); + GT_ModHandler.addCraftingRecipe( + ItemList.Machine_Bronze_Furnace.get(1L), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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), + bitsd, + 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_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_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( + 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( + 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( + 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( + 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( + 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( + 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( + 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( + 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( + 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( + 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)); + 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( + ItemList.Machine_LV_AlloySmelter.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 201, "basicmachine.alloysmelter.tier.01", "Basic Alloy Smelter", @@ -2904,21 +2498,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -2936,21 +2522,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -2968,21 +2546,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3000,21 +2570,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3032,22 +2594,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3065,23 +2619,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3099,23 +2644,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3133,23 +2669,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3167,23 +2694,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3201,24 +2719,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3236,23 +2745,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3270,23 +2770,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3304,23 +2795,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3338,23 +2820,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3372,24 +2845,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3407,23 +2871,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3441,23 +2896,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3475,23 +2921,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3509,23 +2946,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3543,24 +2971,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3578,21 +2997,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3610,21 +3021,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3642,21 +3045,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3674,21 +3069,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3706,22 +3093,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3739,27 +3118,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3777,27 +3144,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3815,27 +3170,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3853,27 +3196,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3891,28 +3222,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -3930,22 +3249,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Furnace") - .getStackForm(1L)); - ItemList.Machine_MV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Furnace").getStackForm(1L)); + ItemList.Machine_MV_E_Furnace.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 262, "basicmachine.e_furnace.tier.02", "Advanced Electric Furnace", @@ -3963,22 +3274,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Furnace") - .getStackForm(1L)); - ItemList.Machine_HV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Furnace").getStackForm(1L)); + ItemList.Machine_HV_E_Furnace.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 263, "basicmachine.e_furnace.tier.03", "Advanced Electric Furnace II", @@ -3996,22 +3299,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Furnace") - .getStackForm(1L)); - ItemList.Machine_EV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Furnace").getStackForm(1L)); + ItemList.Machine_EV_E_Furnace.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 264, "basicmachine.e_furnace.tier.04", "Advanced Electric Furnace III", @@ -4029,22 +3324,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Furnace") - .getStackForm(1L)); - ItemList.Machine_IV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Furnace").getStackForm(1L)); + ItemList.Machine_IV_E_Furnace.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 265, "basicmachine.e_furnace.tier.05", "Electron Exitement Processor", @@ -4062,23 +3349,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Furnace") - .getStackForm(1L)); - - ItemList.Machine_LV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Furnace").getStackForm(1L)); + + ItemList.Machine_LV_Extractor.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 271, "basicmachine.extractor.tier.01", "Basic Extractor", @@ -4096,25 +3375,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4132,25 +3401,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4168,25 +3427,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4204,25 +3453,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4240,26 +3479,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4277,23 +3506,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4311,23 +3530,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4345,23 +3554,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4379,23 +3578,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4413,24 +3602,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4448,25 +3627,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4484,25 +3653,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4520,25 +3679,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4556,25 +3705,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4592,26 +3731,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4629,25 +3758,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4665,25 +3783,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4701,25 +3808,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4737,25 +3833,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4773,26 +3858,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4810,25 +3884,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4846,25 +3909,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4882,25 +3934,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4918,25 +3959,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4954,26 +3984,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -4991,21 +4010,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5023,21 +4034,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5055,21 +4058,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5087,21 +4082,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5119,21 +4106,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5151,21 +4130,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5183,21 +4154,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5215,22 +4178,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5248,23 +4203,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5282,23 +4228,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5316,23 +4253,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5350,23 +4278,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5384,22 +4303,12 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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)); + 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) @@ -5417,83 +4326,39 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5511,21 +4376,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5543,21 +4400,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5575,21 +4424,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5607,21 +4448,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5639,22 +4472,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5672,21 +4497,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5704,21 +4521,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5736,21 +4545,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5768,21 +4569,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5800,22 +4593,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5833,25 +4618,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5869,25 +4643,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5905,25 +4668,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5941,25 +4693,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -5977,26 +4718,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6014,23 +4744,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6048,23 +4768,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6082,23 +4792,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6116,23 +4816,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6150,24 +4840,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6185,25 +4865,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6221,25 +4891,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6257,25 +4917,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6293,25 +4943,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6329,24 +4969,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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)); + 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) @@ -6373,144 +5002,57 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6528,25 +5070,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6564,25 +5096,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6600,25 +5122,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6636,25 +5148,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6672,25 +5174,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6708,25 +5200,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6744,25 +5226,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6780,26 +5252,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6817,25 +5279,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6853,25 +5305,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6889,25 +5331,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6925,25 +5357,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6961,26 +5383,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -6998,23 +5410,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7032,23 +5434,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7066,23 +5458,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7100,23 +5482,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7134,22 +5506,11 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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)); + 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) @@ -7157,111 +5518,60 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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_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) @@ -7269,158 +5579,130 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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) - }); + 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")) { - ItemList.Machine_IndustrialApiary.set(new GT_MetaTileEntity_IndustrialApiary( - 9399, "basicmachine.industrialapiary", "Industrial Apiary", 8) - .getStackForm(1L)); + ItemList.Machine_IndustrialApiary.set( + new GT_MetaTileEntity_IndustrialApiary( + 9399, + "basicmachine.industrialapiary", + "Industrial Apiary", + 8).getStackForm(1L)); /* Conversion recipes */ if (Loader.isModLoaded("gendustry")) { GT_ModHandler.addShapelessCraftingRecipe( ItemList.Machine_IndustrialApiary.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "IndustrialApiary", 1, 0)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "IndustrialApiary", 1, 0) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_Frame.get(1), - new Object[] {GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_PRODUCTION.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 0)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 0) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_PLAINS.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 17)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 17) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_LIGHT.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 11)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 11) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_FLOWERING.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 2)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 2) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_WINTER.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 20)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 20) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_DRYER.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 5)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 5) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_AUTOMATION.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 14)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 14) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_HUMIDIFIER.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 4)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 4) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_HELL.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 13)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 13) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_POLLEN.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 22)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 22) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_DESERT.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 16)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 16) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_COOLER.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 7)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 7) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_LIFESPAN.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 1)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 1) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_SEAL.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 10)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 10) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_STABILIZER.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 19)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 19) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_JUNGLE.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 18)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 18) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_TERRITORY.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 3)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 3) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_OCEAN.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 21)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 21) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_SKY.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 12)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 12) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_HEATER.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 6)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 6) }); GT_ModHandler.addShapelessCraftingRecipe( ItemList.IndustrialApiary_Upgrade_SIEVE.get(1L), - new Object[] {GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 15)}); + new Object[] { GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 15) }); } } @@ -7430,83 +5712,56 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7524,21 +5779,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7556,21 +5803,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7588,21 +5827,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7620,21 +5851,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7652,20 +5875,11 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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)); + 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) @@ -7683,81 +5897,39 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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) - }); + 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) @@ -7775,93 +5947,39 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7879,23 +5997,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7913,23 +6022,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7947,23 +6047,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -7981,23 +6072,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8015,24 +6097,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8050,25 +6123,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8086,25 +6148,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8122,25 +6173,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8158,25 +6198,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8194,26 +6223,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8231,25 +6249,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8267,25 +6275,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8303,25 +6301,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8339,25 +6327,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8375,26 +6353,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8412,25 +6380,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8448,25 +6406,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8484,25 +6432,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8520,25 +6458,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8556,26 +6484,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8593,25 +6511,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8629,25 +6537,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8665,25 +6563,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8701,25 +6589,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8737,26 +6615,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8774,21 +6642,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8806,21 +6666,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8838,21 +6690,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8870,21 +6714,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8902,22 +6738,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8935,25 +6763,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -8971,25 +6788,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9007,25 +6813,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9043,25 +6838,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9079,26 +6863,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9116,25 +6889,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9152,25 +6914,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9188,25 +6939,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9224,25 +6964,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9260,26 +6989,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9297,23 +7015,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9331,23 +7040,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9365,23 +7065,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9399,23 +7090,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9433,24 +7115,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9468,23 +7141,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9502,23 +7166,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9536,23 +7191,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9570,23 +7216,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9604,24 +7241,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9639,21 +7267,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9671,21 +7291,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9703,21 +7315,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9735,21 +7339,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9767,22 +7363,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9800,25 +7388,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9836,25 +7414,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9872,25 +7440,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9908,25 +7466,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9944,26 +7492,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -9981,25 +7519,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10017,25 +7545,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10053,25 +7571,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10089,25 +7597,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10125,26 +7623,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10162,23 +7650,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10196,23 +7675,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10230,23 +7700,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10264,23 +7725,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10298,24 +7750,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10333,23 +7776,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10367,23 +7800,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10401,23 +7824,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10435,23 +7848,13 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10469,24 +7872,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10504,23 +7897,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10538,23 +7922,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10572,23 +7947,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10606,23 +7972,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10640,24 +7997,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10675,25 +8023,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10711,25 +8049,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10747,25 +8075,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10783,25 +8101,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10819,26 +8127,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -10856,22 +8154,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Oven") - .getStackForm(1L)); - ItemList.Machine_MV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Oven").getStackForm(1L)); + ItemList.Machine_MV_Oven.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 672, "basicmachine.e_oven.tier.02", "Advanced Electric Oven", @@ -10889,22 +8179,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Oven") - .getStackForm(1L)); - ItemList.Machine_HV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Oven").getStackForm(1L)); + ItemList.Machine_HV_Oven.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 673, "basicmachine.e_oven.tier.03", "Advanced Electric Oven II", @@ -10922,22 +8204,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Oven") - .getStackForm(1L)); - ItemList.Machine_EV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Oven").getStackForm(1L)); + ItemList.Machine_EV_Oven.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 674, "basicmachine.e_oven.tier.04", "Advanced Electric Oven III", @@ -10955,22 +8229,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Oven") - .getStackForm(1L)); - ItemList.Machine_IV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 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 }) + .setProgressBarTextureName("E_Oven").getStackForm(1L)); + ItemList.Machine_IV_Oven.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 675, "basicmachine.e_oven.tier.05", "Advanced Electric Oven IV", @@ -10988,151 +8254,86 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }) - .setProgressBarTextureName("E_Oven") - .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)); + 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 }) + .setProgressBarTextureName("E_Oven").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 - }); + 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_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_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") @@ -11140,439 +8341,302 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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.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, 95) .getStackForm(1L)); - ItemList.Generator_Gas_Turbine_MV.set(new GT_MetaTileEntity_GasTurbine( - 1116, "basicgenerator.gasturbine.tier.02", "Advanced Gas Turbine", 2, 90) - .getStackForm(1L)); + ItemList.Generator_Gas_Turbine_MV.set( + new GT_MetaTileEntity_GasTurbine( + 1116, + "basicgenerator.gasturbine.tier.02", + "Advanced Gas Turbine", + 2, + 90).getStackForm(1L)); ItemList.Generator_Gas_Turbine_HV.set( new GT_MetaTileEntity_GasTurbine(1117, "basicgenerator.gasturbine.tier.03", "Turbo Gas Turbine", 3, 85) .getStackForm(1L)); - ItemList.Generator_Gas_Turbine_EV.set(new GT_MetaTileEntity_GasTurbine( - 1118, "basicgenerator.gasturbine.tier.04", "Turbo Gas Turbine II", 4, 60) - .getStackForm(1L)); - ItemList.Generator_Gas_Turbine_IV.set(new GT_MetaTileEntity_GasTurbine( - 1119, "basicgenerator.gasturbine.tier.05", "Turbo Gas Turbine III", 5, 50) - .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) - }); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Gas_Turbine_EV.get(1L), bitsd, new Object[] { - "CRC", - "RMR", - aTextMotorWire, - 'M', - ItemList.Hull_EV, - 'E', - ItemList.Electric_Motor_EV, - 'R', - OrePrefixes.rotor.get(Materials.Titanium), - 'C', - OrePrefixes.circuit.get(Materials.Data), - 'W', - OrePrefixes.cableGt01.get(Materials.Aluminium) - }); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Gas_Turbine_IV.get(1L), bitsd, new Object[] { - "CRC", - "RMR", - aTextMotorWire, - 'M', - ItemList.Hull_IV, - 'E', - ItemList.Electric_Motor_IV, - 'R', - OrePrefixes.rotor.get(Materials.TungstenSteel), - 'C', - OrePrefixes.circuit.get(Materials.Elite), - 'W', - OrePrefixes.cableGt01.get(Materials.Tungsten) - }); - - 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( + ItemList.Generator_Gas_Turbine_EV.set( + new GT_MetaTileEntity_GasTurbine( + 1118, + "basicgenerator.gasturbine.tier.04", + "Turbo Gas Turbine II", + 4, + 60).getStackForm(1L)); + ItemList.Generator_Gas_Turbine_IV.set( + new GT_MetaTileEntity_GasTurbine( + 1119, + "basicgenerator.gasturbine.tier.05", + "Turbo Gas Turbine III", + 5, + 50).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) }); + GT_ModHandler.addCraftingRecipe( + ItemList.Generator_Gas_Turbine_EV.get(1L), + bitsd, + new Object[] { "CRC", "RMR", aTextMotorWire, 'M', ItemList.Hull_EV, 'E', ItemList.Electric_Motor_EV, + 'R', OrePrefixes.rotor.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Data), + 'W', OrePrefixes.cableGt01.get(Materials.Aluminium) }); + GT_ModHandler.addCraftingRecipe( + ItemList.Generator_Gas_Turbine_IV.get(1L), + bitsd, + new Object[] { "CRC", "RMR", aTextMotorWire, 'M', ItemList.Hull_IV, 'E', ItemList.Electric_Motor_IV, + 'R', OrePrefixes.rotor.get(Materials.TungstenSteel), 'C', + OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten) }); + + 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"}, + new String[] { "Requires Enriched Naquadah Bolts" }, "Naquadah Reactor Mark I", - 4) - .getStackForm(1L)); - ItemList.Generator_Naquadah_Mark_II.set(new GT_MetaTileEntity_NaquadahReactor( + 4).getStackForm(1L)); + ItemList.Generator_Naquadah_Mark_II.set( + new GT_MetaTileEntity_NaquadahReactor( 1191, "basicgenerator.naquadah.tier.05", - new String[] {"Requires Enriched Naquadah Rods"}, + new String[] { "Requires Enriched Naquadah Rods" }, "Naquadah Reactor Mark II", - 5) - .getStackForm(1L)); - ItemList.Generator_Naquadah_Mark_III.set(new GT_MetaTileEntity_NaquadahReactor( + 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"}, + new String[] { "Requires Enriched Naquadah Long Rods" }, "Naquadah Reactor Mark III", - 6) - .getStackForm(1L)); - ItemList.Generator_Naquadah_Mark_IV.set(new GT_MetaTileEntity_NaquadahReactor( + 6).getStackForm(1L)); + ItemList.Generator_Naquadah_Mark_IV.set( + new GT_MetaTileEntity_NaquadahReactor( 1188, "basicgenerator.naquadah.tier.07", - new String[] {"Requires Naquadria Bolts"}, + new String[] { "Requires Naquadria Bolts" }, "Naquadah Reactor Mark IV", - 7) - .getStackForm(1L)); - ItemList.Generator_Naquadah_Mark_V.set(new GT_MetaTileEntity_NaquadahReactor( + 7).getStackForm(1L)); + ItemList.Generator_Naquadah_Mark_V.set( + new GT_MetaTileEntity_NaquadahReactor( 1189, "basicgenerator.naquadah.tier.08", - new String[] {"Requires Naquadria Rods"}, + 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)); + 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") @@ -11580,116 +8644,81 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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.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_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 - }); + 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") @@ -11701,58 +8730,44 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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.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( @@ -11762,312 +8777,241 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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 - }); + 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.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 - }); + 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)); + 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}); + 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}); + 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.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") @@ -12081,50 +9025,36 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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.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") @@ -12139,263 +9069,167 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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.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 - }); + 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 - }); + 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) - }); + 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) - }); + 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) }); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Hull_HV.get(1L), - ItemList.Component_Filter.get(2L), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 1L), - ItemList.Electric_Motor_HV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { ItemList.Hull_HV.get(1L), ItemList.Component_Filter.get(2L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 1L), + ItemList.Electric_Motor_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), + GT_Utility.getIntegratedCircuit(1) }, Materials.StainlessSteel.getMolten(864L), ItemList.Machine_Multi_Cleanroom.get(1L), 1200, @@ -12406,7 +9240,8 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC } } - ItemList.Machine_LV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + ItemList.Machine_LV_CircuitAssembler.set( + new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1180, "basicmachine.circuitassembler.tier.01", "Basic Circuit Assembler", @@ -12424,25 +9259,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -12460,25 +9285,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -12496,25 +9311,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -12532,25 +9337,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -12568,25 +9363,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -12604,25 +9389,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -12640,25 +9415,15 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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( + 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", @@ -12676,103 +9441,74 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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)); + 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 - }); + 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 - }); + 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.PCBFactory.set( - new GT_MetaTileEntity_PCBFactory(356, "multimachine.pcbfactory", "PCB Factory").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.PCBFactory + .set(new GT_MetaTileEntity_PCBFactory(356, "multimachine.pcbfactory", "PCB Factory").getStackForm(1)); GT_PCBFactoryMaterialLoader.load(); - ItemList.NanoForge.set( - new GT_MetaTileEntity_NanoForge(357, "multimachine.nanoforge", "Nano Forge").getStackForm(1)); + ItemList.NanoForge + .set(new GT_MetaTileEntity_NanoForge(357, "multimachine.nanoforge", "Nano Forge").getStackForm(1)); } private static void run4() { - long bits = GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.NOT_REMOVABLE + 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].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 - : "") + (GT_LanguageManager.i18nPlaceholder ? "%material" + : GregTech_API.sGeneratedMaterials[i] != null + ? GregTech_API.sGeneratedMaterials[i].mDefaultLocalName + : "") + " Frame Box", GregTech_API.sGeneratedMaterials[i]); } @@ -12789,7 +9525,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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); + Materials.Iron, + 1300, + bEC ? 3L : 4L, + bEC ? 6L : 8L, + 2L, + gregtech.api.enums.GT_Values.V[2], + true, + false); makeWires( Materials.Nickel, 1320, @@ -13145,50 +9888,54 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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)}); + 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)}); + 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)}); + 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)}); + 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)); + 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)); + 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)); + 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); @@ -13203,45 +9950,54 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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); + Materials.Polybenzimidazole, + Materials.Polybenzimidazole.mName, + "PBI", + 5280, + 600, + 1000, + true); generateFluidMultiPipes( - Materials.Polybenzimidazole, Materials.Polybenzimidazole.mName, "PBI", 5290, 600, 1000, true); + 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)); + 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)); + 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)); + 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( @@ -13263,36 +10019,37 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC generateFluidPipes(Materials.SpaceTime, Materials.SpaceTime.mName, 5300, 250000, 2147483647, true); generateFluidMultiPipes(Materials.SpaceTime, Materials.SpaceTime.mName, 5305, 250000, 2147483647, true); generateFluidPipes( - Materials.TranscendentMetal, Materials.TranscendentMetal.mName, 5310, 220000, 2147483647, true); + Materials.TranscendentMetal, + Materials.TranscendentMetal.mName, + 5310, + 220000, + 2147483647, + true); generateFluidMultiPipes( - Materials.TranscendentMetal, Materials.TranscendentMetal.mName, 5315, 220000, 2147483647, true); + Materials.TranscendentMetal, + Materials.TranscendentMetal.mName, + 5315, + 220000, + 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) - }, + 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) - }, + 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) - }, + 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, @@ -13307,157 +10064,111 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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_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_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_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) @@ -13486,164 +10197,80 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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_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)); @@ -13653,175 +10280,97 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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_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_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_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) @@ -13850,815 +10399,639 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC 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_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_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_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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + aStartID + 11, + aTextCable1 + aMaterial.mName.toLowerCase() + ".16", + "16x " + name + aTextCable2, + 0.875F, + aMaterial, + aLossInsulated, + 16L * aAmperage, + aVoltage, + true, + false).getStackForm(1L)); } } @@ -14680,85 +11053,79 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC baseInvSlots); } - private static void generateItemPipes( - Materials aMaterial, String name, String displayName, int startID, int 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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) { + private static void generateFluidPipes(Materials aMaterial, String name, int startID, int baseCapacity, + int heatCapacity, boolean gasProof) { generateFluidPipes( aMaterial, name, @@ -14769,115 +11136,96 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC gasProof); } - private static void generateFluidPipes( - Materials aMaterial, - String name, - String displayName, - int startID, - int baseCapacity, - int heatCapacity, - boolean 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)); + 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)); + 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)); + 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)); + 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)); + 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) { + 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)); + 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)); + 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 f7c6181d19..003d9b0310 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java @@ -2,37 +2,48 @@ package gregtech.loaders.preload; import static gregtech.GT_Mod.GT_FML_LOGGER; -import gregtech.api.multitileentity.MultiTileEntityBlock; -import gregtech.api.multitileentity.MultiTileEntityRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import gregtech.api.multitileentity.MultiTileEntityBlock; +import gregtech.api.multitileentity.MultiTileEntityRegistry; + 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); + "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(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(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 0ed2ed63d7..273dcf1427 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java @@ -2,6 +2,10 @@ package gregtech.loaders.preload; import static gregtech.api.enums.GT_Values.MOD_ID_DC; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -11,11 +15,9 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; public class GT_Loader_OreDictionary implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Register OreDict Entries of Non-GT-Items."); @@ -25,7 +27,9 @@ public class GT_Loader_OreDictionary implements Runnable { 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)); + 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)); @@ -40,10 +44,10 @@ public class GT_Loader_OreDictionary implements Runnable { 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)); @@ -95,31 +99,35 @@ 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( - 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)); + 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", "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)); + 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.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)); @@ -130,23 +138,26 @@ 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( - 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)); + "itemCertusQuartz", + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10)); GT_OreDictUnificator.registerOre( - "itemNetherQuartz", GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11)); + "itemNetherQuartz", + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11)); GT_OreDictUnificator.registerOre( OreDictNames.craftingQuartz, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1)); @@ -161,36 +172,46 @@ public class GT_Loader_OreDictionary implements Runnable { 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("reBattery", 1L)); + OrePrefixes.battery, + Materials.Basic, + GT_ModHandler.getIC2Item("chargedReBattery", 1L, 32767)); GT_OreDictUnificator.registerOre( - OrePrefixes.battery, Materials.Basic, GT_ModHandler.getIC2Item("chargedReBattery", 1L, 32767)); + OrePrefixes.battery, + Materials.Advanced, + GT_ModHandler.getIC2Item("advBattery", 1L, 32767)); GT_OreDictUnificator.registerOre( - OrePrefixes.battery, Materials.Advanced, GT_ModHandler.getIC2Item("advBattery", 1L, 32767)); + OrePrefixes.battery, + Materials.Elite, + GT_ModHandler.getIC2Item("energyCrystal", 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)); + 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.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))); + "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.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)); @@ -205,47 +226,49 @@ 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)); + 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)); + 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)); @@ -260,25 +283,39 @@ 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.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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + OrePrefixes.itemCasing, + Materials.Lead, + GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 6)); GT_OreDictUnificator.registerOre( OrePrefixes.itemCasing, @@ -319,44 +356,70 @@ public class GT_Loader_OreDictionary implements Runnable { // Fake Circuits GT_OreDictUnificator.registerOre( - OrePrefixes.circuit, Materials.Primitive, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitULV", 1L)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + OrePrefixes.block, + MaterialsBotania.Manasteel, + GT_ModHandler.getModItem("Botania", "storage", 1L)); GT_OreDictUnificator.registerOre( - OrePrefixes.block, MaterialsBotania.Terrasteel, GT_ModHandler.getModItem("Botania", "storage", 1L, 1)); + OrePrefixes.block, + MaterialsBotania.Terrasteel, + GT_ModHandler.getModItem("Botania", "storage", 1L, 1)); GT_OreDictUnificator.registerOre( OrePrefixes.ingot, MaterialsBotania.ElvenElementium, @@ -370,21 +433,29 @@ public class GT_Loader_OreDictionary implements Runnable { MaterialsBotania.ElvenElementium, GT_ModHandler.getModItem("Botania", "storage", 1L, 2)); GT_OreDictUnificator.registerOre( - OrePrefixes.block, MaterialsBotania.Livingrock, GT_ModHandler.getModItem("Botania", "livingrock", 1L)); + 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)); + OrePrefixes.block, + MaterialsBotania.Livingwood, + GT_ModHandler.getModItem("Botania", "livingwood", 1L)); GT_OreDictUnificator.registerOre( - OrePrefixes.block, MaterialsBotania.Dreamwood, GT_ModHandler.getModItem("Botania", "dreamwood", 1L)); + 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)); + OrePrefixes.block, + MaterialsBotania.ManaDiamond, + GT_ModHandler.getModItem("Botania", "storage", 1L, 3)); GT_OreDictUnificator.registerOre( OrePrefixes.gem, MaterialsBotania.BotaniaDragonstone, 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 e4351f16ab..4d7f4dabdd 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java @@ -4,6 +4,7 @@ import gregtech.api.util.GT_Log; import gregtech.loaders.oreprocessing.*; 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 4b9b5d1493..53c5fc833c 100644 --- a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java +++ b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java @@ -4,6 +4,24 @@ import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.GT_Values.MOD_ID_AE; import static gregtech.api.enums.GT_Values.MOD_ID_GTPP; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.List; +import java.util.Objects; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import net.minecraft.init.Blocks; +import net.minecraftforge.common.config.Configuration; + +import org.apache.commons.lang3.StringUtils; + import cpw.mods.fml.common.LoadController; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; @@ -21,29 +39,15 @@ 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 java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.PrintStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Calendar; -import java.util.List; -import java.util.Objects; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -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<>(); @@ -72,18 +76,16 @@ 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) + if (GT_LanguageManager.sEnglishFile.get("EnableLangFile", "UseThisFileAsLanguageFile", false) .getBoolean(false)) { - GT_LanguageManager.sLanguage = GT_LanguageManager.sEnglishFile - .get("EnableLangFile", "Language", "en_US") + 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) { @@ -94,25 +96,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; } @@ -130,26 +132,22 @@ 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("******************************************************************************"); @@ -159,21 +157,18 @@ public class GT_PreLoad { GT_Log.ore.println("* issue at https://github.com/Blood-Asp/GT5-Unofficial. *"); GT_Log.ore.println("******************************************************************************"); tList.forEach(GT_Log.ore::println); - } catch (Throwable ignored) { - } + } catch (Throwable ignored) {} } if (tMainConfig.get(GT_Mod.aTextGeneral, "LoggingExplosions", true).getBoolean(true)) { GT_Log.mExplosionLog = new File(parentFile, "logs/Explosion.log"); 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)) { @@ -181,13 +176,11 @@ 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) {} } } @@ -238,86 +231,22 @@ public class GT_PreLoad { int material = meta % 1000; String tag = ""; 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" - }; - 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" - }; - if (mIt == 3) - tags = new String[] { - "crateGtDust", - "crateGtIngot", - "crateGtGem", - "crateGtPlate", - "itemCasing", - "nanite" - }; + 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" }; + 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" }; + if (mIt == 3) tags = new String[] { "crateGtDust", "crateGtIngot", "crateGtGem", + "crateGtPlate", "itemCasing", "nanite" }; if (tags.length > prefix) tag = tags[prefix]; if (GregTech_API.sGeneratedMaterials[material] != null) { tag += GregTech_API.sGeneratedMaterials[material].mName; @@ -332,75 +261,16 @@ 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", - "nanite", - "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", "nanite", "cellMolten" }; List<String> mMTTags = new ArrayList<>(); oreTags.stream().filter(test -> StringUtils.startsWithAny(test, preS)).forEach(test -> { @@ -459,12 +329,12 @@ public class GT_PreLoad { try { Objects.requireNonNull(GT_Utility.getField("ic2.core.item.ItemScrapbox$Drop", "topChance", true, true)) .set(null, 0); - ((List<?>) Objects.requireNonNull(GT_Utility.getFieldContent( + ((List<?>) Objects.requireNonNull( + GT_Utility.getFieldContent( GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), "drops", true, - true))) - .clear(); + true))).clear(); } catch (Throwable e) { if (GT_Values.D1) { e.printStackTrace(GT_Log.err); @@ -477,186 +347,133 @@ 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.updateFluidDisplayItems = tMainConfig - .get(GT_Mod.aTextGeneral, "update fluid display items", true) + 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) + 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) + 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) + 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) + 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) + 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) + 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); + .get(GT_Mod.aTextGeneral, "TicksForLagAveragingWithScanner", 25).getInt(25); GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig - .get(GT_Mod.aTextGeneral, "MillisecondsPassedInGTTileEntityUntilLagWarning", 100) - .getInt(100); + .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) + 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.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) + 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) + .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); + .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); + .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) + .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.mAxeWhenAdventure = tMainConfig - .get(GT_Mod.aTextGeneral, "AdventureModeStartingAxe", true) + GT_Mod.gregtechproxy.mIncreaseDungeonLoot = tMainConfig.get(GT_Mod.aTextGeneral, "IncreaseDungeonLoot", 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) + 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) + 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) + 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) + GT_Mod.gregtechproxy.mNerfedWoodPlank = tMainConfig.get(GT_Mod.aTextGeneral, "WoodNeedsSawForCrafting", true) .getBoolean(true); GT_Mod.gregtechproxy.mNerfedVanillaTools = tMainConfig - .get(GT_Mod.aTextGeneral, "smallerVanillaToolDurability", true) + .get(GT_Mod.aTextGeneral, "smallerVanillaToolDurability", true).getBoolean(true); + GT_Mod.gregtechproxy.mSortToTheEnd = tMainConfig.get(GT_Mod.aTextGeneral, "EnsureToBeLoadedLast", true) .getBoolean(true); - GT_Mod.gregtechproxy.mSortToTheEnd = tMainConfig - .get(GT_Mod.aTextGeneral, "EnsureToBeLoadedLast", true) + GT_Mod.gregtechproxy.mDisableIC2Cables = tMainConfig.get(GT_Mod.aTextGeneral, "DisableIC2Cables", 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) + GT_Mod.gregtechproxy.mAchievements = tMainConfig.get(GT_Mod.aTextGeneral, "EnableAchievements", true) .getBoolean(true); - GT_Mod.gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig - .get(GT_Mod.aTextGeneral, "ArcSmeltIntoAnnealedWrought", 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.mEnableAllMaterials = - tMainConfig.get("general", "EnableAllMaterials", false).getBoolean(false); - GT_Mod.gregtechproxy.mEnableAllComponents = - tMainConfig.get("general", "EnableAllComponents", false).getBoolean(false); + 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 @@ -764,18 +581,16 @@ public class GT_PreLoad { "PollutionBaseDieselGenerator", GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond) .getInt(GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond); - double[] mPollutionDieselGeneratorReleasedByTier = tMainConfig - .get( - "Pollution", - "PollutionReleasedByTierDieselGenerator", - GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier) - .getDoubleList(); + double[] mPollutionDieselGeneratorReleasedByTier = tMainConfig.get( + "Pollution", + "PollutionReleasedByTierDieselGenerator", + GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier).getDoubleList(); if (mPollutionDieselGeneratorReleasedByTier.length == GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier.length) { GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier = mPollutionDieselGeneratorReleasedByTier; } else { - GT_FML_LOGGER.error( - "The Length of the Diesel Turbine Pollution Array Config must be the same as the Default"); + GT_FML_LOGGER + .error("The Length of the Diesel Turbine Pollution Array Config must be the same as the Default"); } GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond = tMainConfig .get( @@ -783,12 +598,10 @@ public class GT_PreLoad { "PollutionBaseGasTurbineGenerator", GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond) .getInt(GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond); - double[] mPollutionGasTurbineReleasedByTier = tMainConfig - .get( - "Pollution", - "PollutionReleasedByTierGasTurbineGenerator", - GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier) - .getDoubleList(); + double[] mPollutionGasTurbineReleasedByTier = tMainConfig.get( + "Pollution", + "PollutionReleasedByTierGasTurbineGenerator", + GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier).getDoubleList(); if (mPollutionGasTurbineReleasedByTier.length == GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier.length) { GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier = mPollutionGasTurbineReleasedByTier; @@ -797,25 +610,21 @@ public class GT_PreLoad { } GT_Mod.gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); - GT_Mod.gregtechproxy.mEnableCleanroom = - tMainConfig.get("general", "EnableCleanroom", 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); + .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) + 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); @@ -823,159 +632,135 @@ public class GT_PreLoad { 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) + 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.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.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); + .get("general", "CableConnectionRequiresSolderingMaterial", false).getBoolean(false); GT_LanguageManager.i18nPlaceholder = tMainConfig - .get("general", "EnablePlaceholderForMaterialNamesInLangFile", true) - .getBoolean(true); + .get("general", "EnablePlaceholderForMaterialNamesInLangFile", true).getBoolean(true); GT_MetaTileEntity_LongDistancePipelineBase.minimalDistancePoints = tMainConfig - .get("general", "LongDistancePipelineMinimalDistancePoints", 64) - .getInt(64); + .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.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)); + 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)); + .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.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", "MaxLogStackSize", 64).getInt()))); + } else + if (tPrefix.mIsUsedForBlocks) { + 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.mTitleTabStyle = GregTech_API.sClientDataFile.get("interface", "TitleTabStyle", 0); 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"); GT_Mod.gregtechproxy.mCircuitsOrder.clear(); diff --git a/src/main/java/gregtech/nei/FusionSpecialValueFormatter.java b/src/main/java/gregtech/nei/FusionSpecialValueFormatter.java index 2cbcb5bf1d..55cdc9b8be 100644 --- a/src/main/java/gregtech/nei/FusionSpecialValueFormatter.java +++ b/src/main/java/gregtech/nei/FusionSpecialValueFormatter.java @@ -1,10 +1,11 @@ package gregtech.nei; -import gregtech.api.enums.GT_Values; import java.util.Collections; import java.util.List; import java.util.function.Function; +import gregtech.api.enums.GT_Values; + public class FusionSpecialValueFormatter implements INEISpecialInfoFormatter { public static final FusionSpecialValueFormatter INSTANCE = new FusionSpecialValueFormatter(); diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index f6a06979e2..4bcaeddc0d 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -2,6 +2,32 @@ package gregtech.nei; import static codechicken.nei.recipe.RecipeInfo.getGuiOffset; +import java.awt.*; +import java.lang.ref.SoftReference; +import java.text.DecimalFormat; +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.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import org.apache.commons.lang3.Range; +import org.lwjgl.opengl.GL11; + import codechicken.lib.gui.GuiDraw; import codechicken.nei.NEIClientUtils; import codechicken.nei.PositionedStack; @@ -15,6 +41,7 @@ import codechicken.nei.recipe.ICraftingHandler; import codechicken.nei.recipe.IUsageHandler; import codechicken.nei.recipe.RecipeCatalysts; import codechicken.nei.recipe.TemplateRecipeHandler; + import com.gtnewhorizons.modularui.api.GlStateManager; import com.gtnewhorizons.modularui.api.UIInfos; import com.gtnewhorizons.modularui.api.drawable.IDrawable; @@ -23,6 +50,7 @@ import com.gtnewhorizons.modularui.api.math.Pos2d; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.widget.Widget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; + import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -40,36 +68,13 @@ import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Item_Machines; import gregtech.common.gui.modularui.UIHelper; import gregtech.common.power.Power; -import java.awt.*; -import java.lang.ref.SoftReference; -import java.text.DecimalFormat; -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.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import org.apache.commons.lang3.Range; -import org.lwjgl.opengl.GL11; public class GT_NEI_DefaultHandler extends RecipeMapHandler { public static final int sOffsetX = 5; public static final int sOffsetY = 11; - 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 String mRecipeName; // Name of the handler displayed on top @@ -77,8 +82,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { private static final int RECIPE_NAME_WIDTH = 140; /** - * Static version of {@link TemplateRecipeHandler#cycleticks}. - * Can be referenced from cached recipes. + * Static version of {@link TemplateRecipeHandler#cycleticks}. Can be referenced from cached recipes. */ public static int cycleTicksStatic = Math.abs((int) System.currentTimeMillis()); /** @@ -119,8 +123,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { modularWindow = builder.build(); UIInfos.initializeWindow(Minecraft.getMinecraft().thePlayer, modularWindow); } else { - itemInputsInventory = - itemOutputsInventory = specialSlotInventory = fluidInputsInventory = fluidOutputsInventory = null; + itemInputsInventory = itemOutputsInventory = specialSlotInventory = fluidInputsInventory = fluidOutputsInventory = null; modularWindow = null; } } @@ -142,10 +145,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { 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()); + .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, // 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 @@ -181,8 +181,7 @@ 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) + 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)); @@ -361,8 +360,8 @@ 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) { currentTip = mRecipeMap.handleNEIItemTooltip(aStack, currentTip, (CachedDefaultRecipe) tObject); @@ -436,6 +435,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } public static class GT_RectHandler implements IContainerInputHandler, IContainerTooltipHandler { + @Override public boolean mouseClicked(GuiContainer gui, int mouseX, int mouseY, int button) { if (canHandle(gui)) { @@ -495,8 +495,8 @@ public class GT_NEI_DefaultHandler 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; } @@ -527,6 +527,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } public static class FixedPositionedStack extends PositionedStack { + public static final DecimalFormat chanceFormat = new DecimalFormat("##0.##%"); public final int mChance; @@ -561,19 +562,14 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } public class CachedDefaultRecipe extends TemplateRecipeHandler.CachedRecipe { + public final GT_Recipe mRecipe; public final List<PositionedStack> mOutputs; public final List<PositionedStack> mInputs; // 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."); } @@ -592,12 +588,13 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { 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; @@ -671,88 +668,92 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { ? ((GT_Recipe.GT_Recipe_WithAlt) aRecipe).getAltRepresentativeInput(i) : aRecipe.getRepresentativeInput(i); if (input != null) { - mInputs.add(new FixedPositionedStack( - input, widget.getPos().x + 1, widget.getPos().y + 1, true)); + mInputs.add( + new FixedPositionedStack( + input, + widget.getPos().x + 1, + widget.getPos().y + 1, + true)); } } else if (widget.getMcSlot().getItemHandler() == itemOutputsInventory) { int i = widget.getMcSlot().getSlotIndex(); if (aRecipe.mOutputs.length > i && aRecipe.mOutputs[i] != null) { - mOutputs.add(new FixedPositionedStack( - aRecipe.mOutputs[i], - widget.getPos().x + 1, - widget.getPos().y + 1, - aRecipe.getOutputChance(i), - GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); + mOutputs.add( + new FixedPositionedStack( + aRecipe.mOutputs[i], + widget.getPos().x + 1, + widget.getPos().y + 1, + aRecipe.getOutputChance(i), + GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); } } else if (widget.getMcSlot().getItemHandler() == specialSlotInventory) { if (aRecipe.mSpecialItems != null) { - mInputs.add(new FixedPositionedStack( - aRecipe.mSpecialItems, widget.getPos().x + 1, widget.getPos().y + 1)); + mInputs.add( + new FixedPositionedStack( + aRecipe.mSpecialItems, + widget.getPos().x + 1, + widget.getPos().y + 1)); } } else if (widget.getMcSlot().getItemHandler() == fluidInputsInventory) { int i = widget.getMcSlot().getSlotIndex(); - if (aRecipe.mFluidInputs.length > i - && aRecipe.mFluidInputs[i] != null + if (aRecipe.mFluidInputs.length > i && aRecipe.mFluidInputs[i] != null && aRecipe.mFluidInputs[i].getFluid() != null) { - mInputs.add(new FixedPositionedStack( - GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[i], true), - widget.getPos().x + 1, - widget.getPos().y + 1)); + mInputs.add( + new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[i], true), + widget.getPos().x + 1, + widget.getPos().y + 1)); } } else if (widget.getMcSlot().getItemHandler() == fluidOutputsInventory) { int i = widget.getMcSlot().getSlotIndex(); - if (aRecipe.mFluidOutputs.length > i - && aRecipe.mFluidOutputs[i] != null + if (aRecipe.mFluidOutputs.length > i && aRecipe.mFluidOutputs[i] != null && aRecipe.mFluidOutputs[i].getFluid() != null) { - mOutputs.add(new FixedPositionedStack( - GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[i], true), - widget.getPos().x + 1, - widget.getPos().y + 1)); + mOutputs.add( + new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[i], true), + widget.getPos().x + 1, + widget.getPos().y + 1)); } } } } // items and fluids that exceed usual count - UIHelper.forEachSlots( - (i, backgrounds, pos) -> { - if (i >= GT_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount - && aRecipe.mInputs[i] != null) { - mInputs.add(new FixedPositionedStack(aRecipe.mInputs[i], pos.x + 1, pos.y + 1, true)); - } - }, - (i, backgrounds, pos) -> { - if (i >= GT_NEI_DefaultHandler.this.mRecipeMap.mUsualOutputCount - && aRecipe.mOutputs[i] != null) { - mOutputs.add(new FixedPositionedStack( + UIHelper.forEachSlots((i, backgrounds, pos) -> { + if (i >= GT_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount && aRecipe.mInputs[i] != null) { + mInputs.add(new FixedPositionedStack(aRecipe.mInputs[i], pos.x + 1, pos.y + 1, true)); + } + }, (i, backgrounds, pos) -> { + if (i >= GT_NEI_DefaultHandler.this.mRecipeMap.mUsualOutputCount && aRecipe.mOutputs[i] != null) { + mOutputs.add( + new FixedPositionedStack( aRecipe.mOutputs[i], pos.x + 1, pos.y + 1, aRecipe.getOutputChance(i), GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); - } - }, - (i, backgrounds, pos) -> {}, - (i, backgrounds, pos) -> { - if (i >= GT_NEI_DefaultHandler.this.mRecipeMap.getUsualFluidInputCount() - && aRecipe.mFluidInputs[i] != null - && aRecipe.mFluidInputs[i].getFluid() != null) { - mInputs.add(new FixedPositionedStack( + } + }, (i, backgrounds, pos) -> {}, (i, backgrounds, pos) -> { + if (i >= GT_NEI_DefaultHandler.this.mRecipeMap.getUsualFluidInputCount() + && aRecipe.mFluidInputs[i] != null + && aRecipe.mFluidInputs[i].getFluid() != null) { + mInputs.add( + new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[i], true), pos.x + 1, pos.y + 1)); - } - }, - (i, backgrounds, pos) -> { - if (i >= GT_NEI_DefaultHandler.this.mRecipeMap.getUsualFluidOutputCount() - && aRecipe.mFluidOutputs[i] != null - && aRecipe.mFluidOutputs[i].getFluid() != null) { - mOutputs.add(new FixedPositionedStack( + } + }, (i, backgrounds, pos) -> { + if (i >= GT_NEI_DefaultHandler.this.mRecipeMap.getUsualFluidOutputCount() + && aRecipe.mFluidOutputs[i] != null + && aRecipe.mFluidOutputs[i].getFluid() != null) { + mOutputs.add( + new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[i], true), pos.x + 1, pos.y + 1)); - } - }, + } + }, null, null, GT_NEI_DefaultHandler.this.mRecipeMap, @@ -816,52 +817,70 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { this.mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52)); } - if ((aRecipe.mFluidInputs.length > 0) - && (aRecipe.mFluidInputs[0] != null) + 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) + 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)); + 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)); + 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)); + this.mOutputs.add( + new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[1], true), + 138, + 5)); } - if (aRecipe.mFluidOutputs.length > 2 - && aRecipe.mFluidOutputs[2] != null + 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)); + this.mOutputs.add( + new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[2], true), + 102, + 23)); } - if (aRecipe.mFluidOutputs.length > 3 - && aRecipe.mFluidOutputs[3] != null + 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)); + this.mOutputs.add( + new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[3], true), + 120, + 23)); } - if (aRecipe.mFluidOutputs.length > 4 - && aRecipe.mFluidOutputs[4] != null + 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)); + this.mOutputs.add( + new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[4], true), + 138, + 23)); } - } else if ((aRecipe.mFluidOutputs.length > 0) - && (aRecipe.mFluidOutputs[0] != null) + } 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)); - } + this.mOutputs.add( + new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), + 102, + 52)); + } } } @@ -887,6 +906,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } private class SortedRecipeListCache { + private int mCachedRecipesVersion = -1; @Nullable @@ -923,8 +943,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { // 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(); + Iterator<CachedDefaultRecipe> iterator = Objects.requireNonNull(mCachedRecipes.get()).iterator(); int index = 0; int minIndex = 0; @@ -933,8 +952,8 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { byte lowestTier = 0; 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)); diff --git a/src/main/java/gregtech/nei/HeatingCoilSpecialValueFormatter.java b/src/main/java/gregtech/nei/HeatingCoilSpecialValueFormatter.java index c5a22d570d..f6f0a4099f 100644 --- a/src/main/java/gregtech/nei/HeatingCoilSpecialValueFormatter.java +++ b/src/main/java/gregtech/nei/HeatingCoilSpecialValueFormatter.java @@ -1,10 +1,11 @@ package gregtech.nei; -import gregtech.api.enums.HeatingCoilLevel; import java.util.ArrayList; import java.util.List; import java.util.function.Function; +import gregtech.api.enums.HeatingCoilLevel; + public class HeatingCoilSpecialValueFormatter implements INEISpecialInfoFormatter { public static final HeatingCoilSpecialValueFormatter INSTANCE = new HeatingCoilSpecialValueFormatter(); diff --git a/src/main/java/gregtech/nei/IMCForNEI.java b/src/main/java/gregtech/nei/IMCForNEI.java index b584a9f958..8ff9f0f6f5 100644 --- a/src/main/java/gregtech/nei/IMCForNEI.java +++ b/src/main/java/gregtech/nei/IMCForNEI.java @@ -1,10 +1,12 @@ package gregtech.nei; +import net.minecraft.nbt.NBTTagCompound; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.event.FMLInterModComms; -import net.minecraft.nbt.NBTTagCompound; public class IMCForNEI { + public static void IMCSender() { if (!Loader.isModLoaded("NotEnoughItems")) { return; diff --git a/src/main/java/gregtech/nei/INEISpecialInfoFormatter.java b/src/main/java/gregtech/nei/INEISpecialInfoFormatter.java index 8f15be7026..b75bba463c 100644 --- a/src/main/java/gregtech/nei/INEISpecialInfoFormatter.java +++ b/src/main/java/gregtech/nei/INEISpecialInfoFormatter.java @@ -10,8 +10,10 @@ import java.util.function.Function; public interface INEISpecialInfoFormatter { /** - * @param recipeInfo Recipe info to draw description. You can retrieve special value with {@code recipeInfo.recipe.mSpecialValue}. - * @param applyPrefixAndSuffix Function to apply {@link gregtech.api.util.GT_Recipe.GT_Recipe_Map#formatSpecialValue}. + * @param recipeInfo Recipe info to draw description. You can retrieve special value with + * {@code recipeInfo.recipe.mSpecialValue}. + * @param applyPrefixAndSuffix Function to apply + * {@link gregtech.api.util.GT_Recipe.GT_Recipe_Map#formatSpecialValue}. * @return List of strings containing info for special value etc. */ List<String> format(NEIRecipeInfo recipeInfo, Function<Integer, String> applyPrefixAndSuffix); diff --git a/src/main/java/gregtech/nei/NEIHandlerAbsoluteTooltip.java b/src/main/java/gregtech/nei/NEIHandlerAbsoluteTooltip.java index e136a67c99..26b221bab1 100644 --- a/src/main/java/gregtech/nei/NEIHandlerAbsoluteTooltip.java +++ b/src/main/java/gregtech/nei/NEIHandlerAbsoluteTooltip.java @@ -1,10 +1,12 @@ package gregtech.nei; -import codechicken.lib.gui.GuiDraw; import java.awt.*; import java.util.List; +import codechicken.lib.gui.GuiDraw; + public class NEIHandlerAbsoluteTooltip { + private final Rectangle area; private final String tooltip; private Dimension displaySize; diff --git a/src/main/java/gregtech/nei/NEIRecipeInfo.java b/src/main/java/gregtech/nei/NEIRecipeInfo.java index e19ff6f2ba..ee8c38d3da 100644 --- a/src/main/java/gregtech/nei/NEIRecipeInfo.java +++ b/src/main/java/gregtech/nei/NEIRecipeInfo.java @@ -24,9 +24,8 @@ public class NEIRecipeInfo { public final GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe; /** - * When user looks up usage for machine, NEI will show all the recipes that the machine can process, - * taking tier of the machine into consideration. - * This object can be used to show info around overclocked EU/t and duration. + * When user looks up usage for machine, NEI will show all the recipes that the machine can process, taking tier of + * the machine into consideration. This object can be used to show info around overclocked EU/t and duration. */ public final Power power; @@ -35,12 +34,8 @@ public class NEIRecipeInfo { */ public int yPos; - public NEIRecipeInfo( - GT_Recipe recipe, - GT_Recipe.GT_Recipe_Map recipeMap, - GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe, - Power power, - int descriptionYOffset) { + public NEIRecipeInfo(GT_Recipe recipe, GT_Recipe.GT_Recipe_Map recipeMap, + GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe, Power power, int descriptionYOffset) { this.recipe = recipe; this.recipeMap = recipeMap; this.neiCachedRecipe = neiCachedRecipe; diff --git a/src/main/java/gregtech/nei/NEI_GT_Config.java b/src/main/java/gregtech/nei/NEI_GT_Config.java index 2a85b788ab..67efff5d70 100644 --- a/src/main/java/gregtech/nei/NEI_GT_Config.java +++ b/src/main/java/gregtech/nei/NEI_GT_Config.java @@ -1,34 +1,37 @@ package gregtech.nei; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; + import codechicken.nei.api.IConfigureNEI; import codechicken.nei.recipe.GuiCraftingRecipe; import codechicken.nei.recipe.GuiUsageRecipe; import codechicken.nei.recipe.TemplateRecipeHandler; + import com.google.common.collect.ImmutableMap; + import cpw.mods.fml.common.FMLCommonHandler; 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; public class NEI_GT_Config implements IConfigureNEI { + /** * This map determines the order in which NEI handlers will be registered and displayed in tabs. * - * <p>Handlers will be displayed in ascending order of integer value. Any recipe map that is not - * present in this map will be assigned a value of 0. Negative values are fine. + * <p> + * Handlers will be displayed in ascending order of integer value. Any recipe map that is not present in this map + * will be assigned a value of 0. Negative values are fine. */ - private static final ImmutableMap<GT_Recipe.GT_Recipe_Map, Integer> RECIPE_MAP_ORDERING = - ImmutableMap.<GT_Recipe.GT_Recipe_Map, Integer>builder() - .put(GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes, 1) - .put(GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes, 2) - .build(); + private static final ImmutableMap<GT_Recipe.GT_Recipe_Map, Integer> RECIPE_MAP_ORDERING = ImmutableMap.<GT_Recipe.GT_Recipe_Map, Integer>builder() + .put(GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes, 1) + .put(GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes, 2).build(); - private static final Comparator<RecipeMapHandler> RECIPE_MAP_HANDLER_COMPARATOR = - Comparator.comparingInt(handler -> RECIPE_MAP_ORDERING.getOrDefault(handler.getRecipeMap(), 0)); + private static final Comparator<RecipeMapHandler> RECIPE_MAP_HANDLER_COMPARATOR = Comparator + .comparingInt(handler -> RECIPE_MAP_ORDERING.getOrDefault(handler.getRecipeMap(), 0)); public static boolean sIsAdded = true; diff --git a/src/main/java/gregtech/nei/NEI_TransferRectHost.java b/src/main/java/gregtech/nei/NEI_TransferRectHost.java index 8c649d8695..0a9269d300 100644 --- a/src/main/java/gregtech/nei/NEI_TransferRectHost.java +++ b/src/main/java/gregtech/nei/NEI_TransferRectHost.java @@ -3,6 +3,7 @@ package gregtech.nei; import java.awt.*; public interface NEI_TransferRectHost { + String getNeiTransferRectString(); String getNeiTransferRectTooltip(); diff --git a/src/main/java/gregtech/nei/RecipeMapHandler.java b/src/main/java/gregtech/nei/RecipeMapHandler.java index 81caaffee7..1019d13e28 100644 --- a/src/main/java/gregtech/nei/RecipeMapHandler.java +++ b/src/main/java/gregtech/nei/RecipeMapHandler.java @@ -1,16 +1,20 @@ package gregtech.nei; +import net.minecraft.client.Minecraft; + import codechicken.nei.recipe.TemplateRecipeHandler; + import com.gtnewhorizons.modularui.api.ModularUITextures; + import gregtech.api.gui.GT_GUIColorOverride; import gregtech.api.util.GT_Recipe; -import net.minecraft.client.Minecraft; /** - * This abstract class represents an NEI handler that is constructed from a - * {@link GT_Recipe.GT_Recipe_Map}, and allows us to sort NEI handlers by recipe map. + * This abstract class represents an NEI handler that is constructed from a {@link GT_Recipe.GT_Recipe_Map}, and allows + * us to sort NEI handlers by recipe map. */ abstract class RecipeMapHandler extends TemplateRecipeHandler { + protected final GT_Recipe.GT_Recipe_Map mRecipeMap; protected final GT_GUIColorOverride colorOverride; @@ -30,8 +34,7 @@ abstract class RecipeMapHandler extends TemplateRecipeHandler { } protected void drawText(int aX, int aY, String aString, int aColor) { - Minecraft.getMinecraft() - .fontRenderer + 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 a82a864f6e..b0768e15f9 100644 --- a/src/main/java/speiger/src/crops/api/ICropCardInfo.java +++ b/src/main/java/speiger/src/crops/api/ICropCardInfo.java @@ -1,16 +1,16 @@ package speiger.src.crops.api; import java.util.List; + import net.minecraft.item.ItemStack; /** * - * @author Speiger - * Class to add Informations from CropCards. - * This has Priorty over the ICropInfo + * @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(); diff --git a/src/test/java/gregtech/common/items/CombTypeTest.java b/src/test/java/gregtech/common/items/CombTypeTest.java index f140c81467..d9ae1a46ca 100644 --- a/src/test/java/gregtech/common/items/CombTypeTest.java +++ b/src/test/java/gregtech/common/items/CombTypeTest.java @@ -5,9 +5,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.HashSet; import java.util.Set; + import org.junit.jupiter.api.Test; class CombTypeTest { + @Test void noDuplicateID() { Set<Integer> seen = new HashSet<>(); diff --git a/src/test/java/gregtech/globalenergymap/IGlobalWirelessEnergy_UnitTest.java b/src/test/java/gregtech/globalenergymap/IGlobalWirelessEnergy_UnitTest.java index 81e0672f8e..e726b424de 100644 --- a/src/test/java/gregtech/globalenergymap/IGlobalWirelessEnergy_UnitTest.java +++ b/src/test/java/gregtech/globalenergymap/IGlobalWirelessEnergy_UnitTest.java @@ -3,10 +3,12 @@ package gregtech.globalenergymap; import static gregtech.common.misc.GlobalVariableStorage.*; import static org.junit.jupiter.api.Assertions.*; -import gregtech.api.interfaces.IGlobalWirelessEnergy; import java.math.BigInteger; + import org.junit.jupiter.api.Test; +import gregtech.api.interfaces.IGlobalWirelessEnergy; + class IGlobalWirelessEnergy_UnitTest implements IGlobalWirelessEnergy { static final String message = "Comparison failed"; diff --git a/src/test/java/gregtech/overclock/GT_OverclockCalculator_UnitTest.java b/src/test/java/gregtech/overclock/GT_OverclockCalculator_UnitTest.java index cc641f96e5..827bc48908 100644 --- a/src/test/java/gregtech/overclock/GT_OverclockCalculator_UnitTest.java +++ b/src/test/java/gregtech/overclock/GT_OverclockCalculator_UnitTest.java @@ -4,9 +4,10 @@ import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.GT_Values.VP; import static org.junit.jupiter.api.Assertions.assertEquals; -import gregtech.api.util.GT_OverclockCalculator; import org.junit.jupiter.api.Test; +import gregtech.api.util.GT_OverclockCalculator; + class GT_OverclockCalculator_UnitTest { private static final String messageDuration = "Duration Calculated Wrong"; @@ -16,14 +17,8 @@ class GT_OverclockCalculator_UnitTest { void fullPerfectOverclockEBF_Test() { int heatDiscounts = (1800 * 4) / 900; long correctConsumption = (long) Math.ceil(VP[5] * Math.pow(0.95, heatDiscounts)); - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[5]) - .setDuration(1024) - .enableHeatOC() - .enableHeatDiscount() - .setRecipeHeat(1800) - .setMultiHeat(1800 * 5) + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[5]) + .setDuration(1024).enableHeatOC().enableHeatDiscount().setRecipeHeat(1800).setMultiHeat(1800 * 5) .calculate(); assertEquals(1024 >> 8, calculator.getDuration(), messageDuration); assertEquals(correctConsumption, calculator.getConsumption(), messageEUt); @@ -33,14 +28,8 @@ class GT_OverclockCalculator_UnitTest { void imperfectOverclockEBFWithOneHeatDiscount_Test() { int heatDiscounts = 1; long correctConsumption = (long) Math.ceil(VP[5] * Math.pow(0.95, heatDiscounts)); - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[5]) - .setDuration(1024) - .enableHeatOC() - .enableHeatDiscount() - .setRecipeHeat(1800) - .setMultiHeat(2700) + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[5]) + .setDuration(1024).enableHeatOC().enableHeatDiscount().setRecipeHeat(1800).setMultiHeat(2700) .calculate(); assertEquals(1024 >> 4, calculator.getDuration(), messageDuration); assertEquals(correctConsumption, calculator.getConsumption(), messageEUt); @@ -48,14 +37,8 @@ class GT_OverclockCalculator_UnitTest { @Test void imperfectOverclockEBFWithoutHeatDiscounts_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[5]) - .setDuration(1024) - .enableHeatOC() - .enableHeatDiscount() - .setRecipeHeat(1800) - .setMultiHeat(1800) + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[5]) + .setDuration(1024).enableHeatOC().enableHeatDiscount().setRecipeHeat(1800).setMultiHeat(1800) .calculate(); assertEquals(1024 >> 4, calculator.getDuration(), messageDuration); assertEquals(VP[5], calculator.getConsumption(), messageEUt); @@ -65,14 +48,8 @@ class GT_OverclockCalculator_UnitTest { void perfectAndImperfectOverclockEBFWithTwoHeatDiscounts_Test() { int heatDiscounts = 2; long correctConsumption = (long) Math.ceil(VP[5] * Math.pow(0.95, heatDiscounts)); - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[5]) - .setDuration(1024) - .enableHeatOC() - .enableHeatDiscount() - .setRecipeHeat(1800) - .setMultiHeat(3600) + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[5]) + .setDuration(1024).enableHeatOC().enableHeatDiscount().setRecipeHeat(1800).setMultiHeat(3600) .calculate(); assertEquals(1024 >> 5, calculator.getDuration(), messageDuration); assertEquals(correctConsumption, calculator.getConsumption(), messageEUt); @@ -80,23 +57,16 @@ class GT_OverclockCalculator_UnitTest { @Test void generalImperfectOverclock_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setDuration(1024) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setDuration(1024).calculate(); assertEquals(1024 >> 5, calculator.getDuration(), messageDuration); assertEquals(VP[6], calculator.getConsumption(), messageEUt); } @Test void generalPerfectOverclock_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setDuration(2048) - .enablePerfectOC() - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setDuration(2048).enablePerfectOC().calculate(); assertEquals(2048 >> 10, calculator.getDuration(), messageDuration); assertEquals(VP[6], calculator.getConsumption(), messageEUt); } @@ -105,14 +75,8 @@ class GT_OverclockCalculator_UnitTest { void weirdHeatEBF_Test() { int heatDiscounts = 3; long correctConsumption = (long) Math.ceil(VP[6] * Math.pow(0.95, heatDiscounts)); - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setDuration(2048) - .enableHeatOC() - .enableHeatDiscount() - .setRecipeHeat(486) - .setMultiHeat(3900) + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setDuration(2048).enableHeatOC().enableHeatDiscount().setRecipeHeat(486).setMultiHeat(3900) .calculate(); assertEquals(2048 >> 6, calculator.getDuration(), messageDuration); assertEquals(correctConsumption, calculator.getConsumption(), messageEUt); @@ -120,122 +84,79 @@ class GT_OverclockCalculator_UnitTest { @Test void doubleEnergyHatchOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6] + V[6]) - .setAmperage(2) - .setDuration(1024) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6] + V[6]) + .setAmperage(2).setDuration(1024).calculate(); assertEquals(1024 >> 6, calculator.getDuration(), messageDuration); assertEquals(VP[7], calculator.getConsumption(), messageEUt); } @Test void multiAmpHatchOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setAmperage(256) - .setDuration(1024) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setAmperage(256).setDuration(1024).calculate(); assertEquals(1024 >> 9, calculator.getDuration(), messageDuration); assertEquals(VP[10], calculator.getConsumption(), messageEUt); } @Test void weirdAmpHatchOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setAmperage(320) - .setDuration(1024) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setAmperage(320).setDuration(1024).calculate(); assertEquals(1024 >> 9, calculator.getDuration(), messageDuration); assertEquals(VP[10], calculator.getConsumption(), messageEUt); } @Test void parallelImperfectOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[8]) - .setAmperage(4) - .setDuration(1024) - .setParallel(16) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[8]).setAmperage(4) + .setDuration(1024).setParallel(16).calculate(); assertEquals(1024 >> 6, calculator.getDuration(), messageDuration); assertEquals(VP[9], calculator.getConsumption(), messageEUt); } @Test void parallelPerfectOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[8]) - .setAmperage(4) - .setDuration(4096) - .setParallel(16) - .enablePerfectOC() - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[8]).setAmperage(4) + .setDuration(4096).setParallel(16).enablePerfectOC().calculate(); assertEquals(4096 >> 12, calculator.getDuration(), messageDuration); assertEquals(VP[9], calculator.getConsumption(), messageEUt); } @Test void parallelMultiAmpOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setAmperage(320) - .setDuration(1024) - .setParallel(16) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setAmperage(320).setDuration(1024).setParallel(16).calculate(); assertEquals(1024 >> 7, calculator.getDuration(), messageDuration); assertEquals(VP[10], calculator.getConsumption(), messageEUt); } @Test void weirdParallelOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[8]) - .setDuration(1024) - .setParallel(8) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[8]) + .setDuration(1024).setParallel(8).calculate(); assertEquals(1024 >> 5, calculator.getDuration(), messageDuration); assertEquals(VP[6] * 8, calculator.getConsumption(), messageEUt); } @Test void weirdParallelAndAmpsOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[8]) - .setAmperage(320) - .setDuration(1024) - .setParallel(8) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[8]) + .setAmperage(320).setDuration(1024).setParallel(8).calculate(); assertEquals(1024 >> 9, calculator.getDuration(), messageDuration); assertEquals(VP[6] * 8 * 256, calculator.getConsumption(), messageEUt); } @Test void weirdTimeOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setDuration(77) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setDuration(77).calculate(); assertEquals(77 >> 5, calculator.getDuration(), messageDuration); assertEquals(VP[6], calculator.getConsumption(), messageEUt); } @Test void stopsCorrectlyWhenOneTicking_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setDuration(1) + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]).setDuration(1) .calculate(); assertEquals(1, calculator.getDuration(), messageDuration); assertEquals(VP[1], calculator.getConsumption(), messageEUt); @@ -244,12 +165,8 @@ class GT_OverclockCalculator_UnitTest { @Test void imperfectOCWithEUtDiscount_Test() { long correctConsumption = (long) Math.ceil(VP[1] * 0.9f) << 10; - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setEUtDiscount(0.9f) - .setDuration(1024) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setEUtDiscount(0.9f).setDuration(1024).calculate(); assertEquals(1024 >> 5, calculator.getDuration(), messageDuration); assertEquals(correctConsumption, calculator.getConsumption(), messageEUt); } @@ -257,77 +174,48 @@ class GT_OverclockCalculator_UnitTest { @Test void perfectOCWithEUtDiscount_Test() { long correctConsumption = (long) Math.ceil(VP[1] * 0.9f) << 10; - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setEUtDiscount(0.9f) - .setDuration(1024) - .enablePerfectOC() - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setEUtDiscount(0.9f).setDuration(1024).enablePerfectOC().calculate(); assertEquals(1024 >> 10, calculator.getDuration(), messageDuration); assertEquals(correctConsumption, calculator.getConsumption(), messageEUt); } @Test void imperfectOCWithSpeedBoost_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setSpeedBoost(0.9f) - .setDuration(1024) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setSpeedBoost(0.9f).setDuration(1024).calculate(); assertEquals((int) (1024 * 0.9f) >> 5, calculator.getDuration(), messageDuration); assertEquals(VP[6], calculator.getConsumption(), messageEUt); } @Test void perfectOCWithSpeedBoost_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setSpeedBoost(0.9f) - .setDuration(2048) - .enablePerfectOC() - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setSpeedBoost(0.9f).setDuration(2048).enablePerfectOC().calculate(); assertEquals((int) (2048 * 0.9f) >> 10, calculator.getDuration(), messageDuration); assertEquals(VP[6], calculator.getConsumption(), messageEUt); } @Test void oneTickDiscountTurnsToOne_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setDuration(1) - .enableOneTickDiscount() - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]).setDuration(1) + .enableOneTickDiscount().calculate(); assertEquals(1, calculator.getDuration(), messageDuration); assertEquals(1, calculator.getConsumption(), messageEUt); } @Test void oneTickDiscountImperfectOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setSpeedBoost(1.1f) - .setDuration(4) - .enableOneTickDiscount() - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setSpeedBoost(1.1f).setDuration(4).enableOneTickDiscount().calculate(); assertEquals(1, calculator.getDuration(), messageDuration); assertEquals(480 >> 3, calculator.getConsumption(), messageEUt); } @Test void oneTickDiscountPerfectOC_Test() { - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[1]) - .setEUt(V[6]) - .setSpeedBoost(1.1f) - .setDuration(16) - .enablePerfectOC() - .enableOneTickDiscount() - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[1]).setEUt(V[6]) + .setSpeedBoost(1.1f).setDuration(16).enablePerfectOC().enableOneTickDiscount().calculate(); assertEquals(1, calculator.getDuration(), messageDuration); assertEquals(480 >> 6, calculator.getConsumption(), messageEUt); } @@ -335,12 +223,8 @@ class GT_OverclockCalculator_UnitTest { @Test void ulvRecipeWithDiscount_Test() { long correctConsumption = (long) Math.ceil((VP[0] << 10) * 0.9f); - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[0]) - .setEUt(V[6]) - .setEUtDiscount(0.9f) - .setDuration(1024) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[0]).setEUt(V[6]) + .setEUtDiscount(0.9f).setDuration(1024).calculate(); assertEquals(1024 >> 5, calculator.getDuration(), messageDuration); assertEquals(correctConsumption, calculator.getConsumption(), messageEUt); } @@ -348,13 +232,8 @@ class GT_OverclockCalculator_UnitTest { @Test void ulvRecipeWithDiscountWithParallel_Test() { long correctConsumption = (long) Math.ceil((VP[0] << 6) * 14 * 0.9f); - GT_OverclockCalculator calculator = new GT_OverclockCalculator() - .setRecipeEUt(VP[0]) - .setEUt(V[5]) - .setEUtDiscount(0.9f) - .setParallel(14) - .setDuration(1024) - .calculate(); + GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(VP[0]).setEUt(V[5]) + .setEUtDiscount(0.9f).setParallel(14).setDuration(1024).calculate(); assertEquals(1024 >> 3, calculator.getDuration(), messageDuration); assertEquals(correctConsumption, calculator.getConsumption(), messageEUt); } |