From b61a67f8364260389fb3403e4ef9b9ee4018ed98 Mon Sep 17 00:00:00 2001 From: Technus Date: Tue, 26 Dec 2017 15:51:30 +0100 Subject: Code cleanup --- .../com/github/technus/tectech/CommonValues.java | 2 + .../java/com/github/technus/tectech/TecTech.java | 62 +- src/main/java/com/github/technus/tectech/Util.java | 271 +++--- .../java/com/github/technus/tectech/Vec3pos.java | 8 +- src/main/java/com/github/technus/tectech/XSTR.java | 63 +- .../technus/tectech/auxiliary/Reference.java | 2 + .../dreamcraft/DreamCraftRecipeLoader.java | 182 ++-- .../thaumcraft/EssentiaCompatEnabled.java | 10 +- .../definitions/AspectDefinitionCompatEnabled.java | 4 +- .../definitions/dComplexAspectDefinition.java | 58 +- .../GT_MetaTileEntity_EM_essentiaDequantizer.java | 12 +- .../GT_MetaTileEntity_EM_essentiaQuantizer.java | 9 +- .../tectech/dataFramework/QuantumDataPacket.java | 4 +- .../elementalMatter/core/cElementalDecay.java | 12 +- .../core/cElementalDefinitionStackMap.java | 5 +- .../core/cElementalInstanceStackMap.java | 147 ++-- .../core/cElementalMutableDefinitionStackMap.java | 78 +- .../elementalMatter/core/cElementalStackMap.java | 34 +- .../elementalMatter/core/rElementalRecipe.java | 14 +- .../elementalMatter/core/rElementalRecipeMap.java | 20 +- .../core/stacks/cElementalDefinitionStack.java | 25 +- .../core/stacks/cElementalInstanceStack.java | 126 +-- .../core/templates/cElementalDefinition.java | 60 +- .../core/templates/cElementalPrimitive.java | 48 +- .../transformations/aItemQuantizationInfo.java | 20 +- .../core/transformations/bTransformationInfo.java | 12 +- .../definitions/complex/atom/dAtomDefinition.java | 472 +++++++---- .../definitions/complex/atom/iaeaNuclide.java | 83 +- .../complex/hadron/dHadronDefinition.java | 101 ++- .../primitive/cPrimitiveDefinition.java | 2 +- .../technus/tectech/entity/fx/BlockHint.java | 8 +- .../technus/tectech/loader/BloodyRecipeLoader.java | 170 ++-- .../technus/tectech/loader/EntityLoader.java | 3 +- .../github/technus/tectech/loader/MainLoader.java | 38 +- .../technus/tectech/loader/RecipeLoader.java | 18 +- .../technus/tectech/loader/ThingsLoader.java | 5 +- .../tectech/nei/TT_NEI_ResearchHandler.java | 10 +- .../technus/tectech/nei/TT_NEI_ScannerHandler.java | 10 +- .../github/technus/tectech/proxy/ClientProxy.java | 7 +- .../github/technus/tectech/recipe/TT_recipe.java | 40 +- .../technus/tectech/recipe/TT_recipeAdder.java | 94 ++- .../technus/tectech/thing/CustomItemList.java | 75 +- .../tectech/thing/block/QuantumGlassItem.java | 4 +- .../tectech/thing/block/QuantumGlassRender.java | 3 - .../tectech/thing/block/QuantumStuffRender.java | 6 +- .../tectech/thing/block/ReactorSimItem.java | 4 +- .../tectech/thing/casing/GT_Block_CasingsTT.java | 22 +- .../tectech/thing/casing/GT_Block_HintTT.java | 2 +- .../tectech/thing/casing/GT_Item_CasingsTT.java | 7 +- .../tectech/thing/casing/TT_Container_Casings.java | 4 +- .../thing/item/ConstructableTriggerItem.java | 12 +- .../item/DebugElementalInstanceContainer_EM.java | 10 +- .../item/ElementalDefinitionContainer_EM.java | 26 +- .../item/ElementalDefinitionScanStorage_EM.java | 26 +- .../tectech/thing/item/ParametrizerMemoryCard.java | 12 +- .../tectech/thing/item/gui/ScanDisplayScreen.java | 22 +- .../GT_MetaTileEntity_Hatch_DataConnector.java | 18 +- .../hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java | 2 +- ...GT_MetaTileEntity_Hatch_ElementalContainer.java | 63 +- .../hatch/GT_MetaTileEntity_Hatch_Holder.java | 4 +- .../hatch/GT_MetaTileEntity_Hatch_InputData.java | 7 +- .../hatch/GT_MetaTileEntity_Hatch_OutputData.java | 13 +- .../GT_MetaTileEntity_Hatch_OutputElemental.java | 20 +- .../GT_MetaTileEntity_Hatch_OverflowElemental.java | 11 +- .../hatch/GT_MetaTileEntity_Hatch_Param.java | 27 +- .../hatch/GT_MetaTileEntity_Hatch_Rack.java | 159 ++-- .../hatch/GT_MetaTileEntity_Hatch_Uncertainty.java | 32 +- .../hatch/gui/GT_Container_Holder.java | 24 +- .../hatch/gui/GT_Container_Param.java | 9 +- .../hatch/gui/GT_Container_ParamAdv.java | 114 ++- .../hatch/gui/GT_Container_Rack.java | 27 +- .../hatch/gui/GT_Container_Uncertainty.java | 15 +- .../hatch/gui/GT_GUIContainer_Holder.java | 3 +- .../hatch/gui/GT_GUIContainer_Rack.java | 6 +- .../hatch/gui/GT_GUIContainer_Uncertainty.java | 14 +- .../hatch/gui/GT_GUIContainer_UncertaintyAdv.java | 5 +- .../multi/GT_MetaTileEntity_EM_bhg.java | 7 +- .../multi/GT_MetaTileEntity_EM_collider.java | 22 +- .../multi/GT_MetaTileEntity_EM_computer.java | 158 ++-- .../multi/GT_MetaTileEntity_EM_decay.java | 10 +- .../multi/GT_MetaTileEntity_EM_dequantizer.java | 2 +- .../multi/GT_MetaTileEntity_EM_infuser.java | 28 +- .../multi/GT_MetaTileEntity_EM_junction.java | 31 +- .../multi/GT_MetaTileEntity_EM_quantizer.java | 26 +- .../multi/GT_MetaTileEntity_EM_research.java | 67 +- .../multi/GT_MetaTileEntity_EM_scanner.java | 104 ++- .../multi/GT_MetaTileEntity_EM_switch.java | 52 +- .../multi/GT_MetaTileEntity_TM_microwave.java | 56 +- .../multi/base/GT_Container_MultiMachineEM.java | 24 +- .../multi/base/GT_GUIContainer_MultiMachineEM.java | 55 +- .../base/GT_MetaTileEntity_MultiblockBase_EM.java | 931 +++++++++++++++------ .../multi/em_machine/Behaviour_Centrifuge.java | 2 +- .../multi/em_machine/Behaviour_Electrolyzer.java | 2 +- .../Behaviour_ElectromagneticSeparator.java | 2 +- .../multi/em_machine/Behaviour_Mixer.java | 2 +- .../multi/em_machine/Behaviour_PrecisionLaser.java | 2 +- .../multi/em_machine/Behaviour_Recycler.java | 2 +- .../em_machine/GT_MetaTileEntity_EM_machine.java | 141 +++- .../pipe/GT_MetaTileEntity_Pipe_Data.java | 78 +- .../pipe/GT_MetaTileEntity_Pipe_EM.java | 56 +- .../GT_MetaTileEntity_DebugPowerGenerator.java | 4 +- .../GT_MetaTileEntity_DebugStructureWriter.java | 12 +- .../gui/GT_Container_DebugPowerGenerator.java | 2 - .../gui/GT_Container_DebugStructureWriter.java | 15 +- .../gui/GT_GUIContainer_DebugStructureWriter.java | 4 +- .../thing/tileEntity/ReactorSimTileEntity.java | 16 +- 106 files changed, 3315 insertions(+), 1755 deletions(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/github/technus/tectech/CommonValues.java b/src/main/java/com/github/technus/tectech/CommonValues.java index 0c49f98655..81c7dc3450 100644 --- a/src/main/java/com/github/technus/tectech/CommonValues.java +++ b/src/main/java/com/github/technus/tectech/CommonValues.java @@ -28,4 +28,6 @@ public final class CommonValues { // - in case some hatches are not in multiblock structure public static final byte MULTI_CHECK_AT = 12;// multiblock checks it's state public static final byte DISPERSE_AT = 14;// overflow hatches perform disperse + + private CommonValues() {} } diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index e82ab21895..21c8d6dd39 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -48,8 +48,9 @@ public class TecTech { public static final byte tectechTexturePage1=8; public static void AddLoginError(String pMessage) { - if (Module_AdminErrorLogs != null) + if (Module_AdminErrorLogs != null) { Module_AdminErrorLogs.AddErrorLogOnAdminJoin(pMessage); + } } @Mod.EventHandler @@ -59,7 +60,9 @@ public class TecTech { ModConfig = new TecTechConfig(PreEvent.getModConfigurationDirectory(), Reference.COLLECTIONNAME, Reference.MODID); - if (!ModConfig.LoadConfig()) Logger.error(Reference.MODID + " could not load its config file. Things are going to be weird!"); + if (!ModConfig.LoadConfig()) { + Logger.error(Reference.MODID + " could not load its config file. Things are going to be weird!"); + } if (ModConfig.ModAdminErrorLogs_Enabled) { Logger.debug("Module_AdminErrorLogs is enabled"); @@ -86,7 +89,9 @@ public class TecTech { @Mod.EventHandler public void PostLoad(FMLPostInitializationEvent PostEvent) { GTCustomLoader.postLoad(); - if (ModConfig.NERF_FUSION) FixBrokenFusionRecipes(); + if (ModConfig.NERF_FUSION) { + FixBrokenFusionRecipes(); + } fixBlocks(); } @@ -100,31 +105,39 @@ public class TecTech { private void FixBrokenFusionRecipes() { HashMap binds = new HashMap<>(); - for (Materials m : Materials.values()) { - FluidStack p = m.getPlasma(1); + for (Materials material : Materials.values()) { + FluidStack p = material.getPlasma(1); if (p != null) { - if (DEBUG_MODE) - Logger.info("Found Plasma of " + m.mName); - if (m.mElement != null && - (m.mElement.mProtons >= Materials.Iron.mElement.mProtons || - -m.mElement.mProtons >= Materials.Iron.mElement.mProtons || - m.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons || - -m.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons)) { - if (DEBUG_MODE) - Logger.info("Attempting to bind " + m.mName); - if (m.getMolten(1) != null) binds.put(p.getFluid(), m.getMolten(1).getFluid()); - else if (m.getGas(1) != null) binds.put(p.getFluid(), m.getGas(1).getFluid()); - else if (m.getFluid(1) != null) binds.put(p.getFluid(), m.getFluid(1).getFluid()); - else binds.put(p.getFluid(), Materials.Iron.getMolten(1).getFluid()); + if (DEBUG_MODE) { + Logger.info("Found Plasma of " + material.mName); + } + if (material.mElement != null && + (material.mElement.mProtons >= Materials.Iron.mElement.mProtons || + -material.mElement.mProtons >= Materials.Iron.mElement.mProtons || + material.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons || + -material.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons)) { + if (DEBUG_MODE) { + Logger.info("Attempting to bind " + material.mName); + } + if (material.getMolten(1) != null) { + binds.put(p.getFluid(), material.getMolten(1).getFluid()); + } else if (material.getGas(1) != null) { + binds.put(p.getFluid(), material.getGas(1).getFluid()); + } else if (material.getFluid(1) != null) { + binds.put(p.getFluid(), material.getFluid(1).getFluid()); + } else { + binds.put(p.getFluid(), Materials.Iron.getMolten(1).getFluid()); + } } } } for (GT_Recipe r : GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList) { - Fluid f = binds.get(r.mFluidOutputs[0].getFluid()); - if (f != null) { - if (DEBUG_MODE) + Fluid fluid = binds.get(r.mFluidOutputs[0].getFluid()); + if (fluid != null) { + if (DEBUG_MODE) { Logger.info("Nerfing Recipe " + r.mFluidOutputs[0].getUnlocalizedName()); - r.mFluidOutputs[0] = new FluidStack(f, r.mFluidInputs[0].amount); + } + r.mFluidOutputs[0] = new FluidStack(fluid, r.mFluidInputs[0].amount); } } } @@ -166,9 +179,10 @@ public class TecTech { modId = GameRegistry.findUniqueIdentifierFor(block).modId; if (modIDs.contains(modId)) {//Full Whitelisted Mods continue; - } else if (modId.equals("OpenBlocks")) { - if (GameRegistry.findUniqueIdentifierFor(block).name.equals("grave")) + } else if ("OpenBlocks".equals(modId)) { + if ("grave".equals(GameRegistry.findUniqueIdentifierFor(block).name)) { continue; + } } block.setResistance(6); } diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index ff058d044d..ff9e7f6cb8 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -30,16 +30,19 @@ import static gregtech.api.enums.GT_Values.E; /** * Created by Tec on 21.03.2017. */ -public class Util { +public final class Util { + private Util() {} + public static String intBitsToString(int number) { - StringBuilder result = new StringBuilder(); + StringBuilder result = new StringBuilder(16); for (int i = 31; i >= 0; i--) { int mask = 1 << i; result.append((number & mask) != 0 ? "1" : "0"); - if (i % 8 == 0) - result.append(" "); + if (i % 8 == 0) { + result.append(' '); + } } result.replace(result.length() - 1, result.length(), ""); @@ -47,14 +50,15 @@ public class Util { } public static String intBitsToShortString(int number) { - StringBuilder result = new StringBuilder(); + StringBuilder result = new StringBuilder(16); for (int i = 31; i >= 0; i--) { int mask = 1 << i; result.append((number & mask) != 0 ? ":" : "."); - if (i % 8 == 0) - result.append("|"); + if (i % 8 == 0) { + result.append('|'); + } } result.replace(result.length() - 1, result.length(), ""); @@ -70,7 +74,9 @@ public class Util { IGregTechTileEntity aBaseMetaTileEntity, boolean forceCheck) { World world = aBaseMetaTileEntity.getWorld(); - if (world.isRemote) return false; + if (world.isRemote) { + return false; + } //TE Rotation byte facing = aBaseMetaTileEntity.getFrontFacing(); @@ -94,12 +100,14 @@ public class Util { b -= block; break; } if (block > '@')//characters allow to skip check a-1 skip, b-2 skips etc. + { a += block - '@'; - else if (block < '+')//used to mark THINGS + } else if (block < '+')//used to mark THINGS + { a++; - else if (block=='.') + } else if (block=='.') { a++; - else { + } else { //get x y z from rotation switch (facing) {//translation case 4: @@ -138,34 +146,42 @@ public class Util { } //that must be here since in some cases other axis (b,c) controls y - if (y < 0 || y >= 256) return false; + if (y < 0 || y >= 256) { + return false; + } //Check block if (world.blockExists(x, y, z)) {//this actually checks if the chunk is loaded at this pos switch (block) { case '-'://must be air - if (world.getBlock(x, y, z).getMaterial() != Material.air) + if (world.getBlock(x, y, z).getMaterial() != Material.air) { return false; + } break; case '+'://must not be air - if (world.getBlock(x, y, z).getMaterial() == Material.air) + if (world.getBlock(x, y, z).getMaterial() == Material.air) { return false; + } break; default: //check for block (countable) pointer = block - '0'; //countable air -> net.minecraft.block.BlockAir if (world.getBlock(x, y, z) != blockType[pointer]) { - if (DEBUG_MODE) - TecTech.Logger.info("Struct-block-error " + x + " " + y + " " + z + " / " + a + " " + b + " " + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + " " + blockType[pointer].getUnlocalizedName()); + if (DEBUG_MODE) { + TecTech.Logger.info("Struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName()); + } return false; } if (world.getBlockMetadata(x, y, z) != blockMeta[pointer]) { - if (DEBUG_MODE) - TecTech.Logger.info("Struct-meta-id-error " + x + " " + y + " " + z + " / " + a + " " + b + " " + c + " / " + world.getBlockMetadata(x, y, z) + " " + blockMeta[pointer]); + if (DEBUG_MODE) { + TecTech.Logger.info("Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMeta[pointer]); + } return false; } } - } else if (forceCheck) return false; + } else if (forceCheck) { + return false; + } a++;//block in horizontal layer } } @@ -191,7 +207,9 @@ public class Util { IGregTechTileEntity aBaseMetaTileEntity, boolean forceCheck) { World world = aBaseMetaTileEntity.getWorld(); - if (world.isRemote) return false; + if (world.isRemote) { + return false; + } //TE Rotation byte facing = aBaseMetaTileEntity.getFrontFacing(); @@ -218,12 +236,13 @@ public class Util { b -= block; break; } else if (block > '@') //characters allow to skip check a-1 skip, b-2 skips etc. + { a += block - '@'; - //else if (block < '+')//used to mark THINGS + }//else if (block < '+')//used to mark THINGS // a++; - else if (block=='.') + else if (block=='.') { a++; - else { + } else { //get x y z from rotation switch (facing) {//translation case 4: @@ -262,30 +281,36 @@ public class Util { } //that must be here since in some cases other axis (b,c) controls y - if (y < 0 || y >= 256) return false; + if (y < 0 || y >= 256) { + return false; + } //Check block if (world.blockExists(x, y, z)) {//this actually checks if the chunk is loaded at this pos switch (block) { case '-'://must be air - if (world.getBlock(x, y, z).getMaterial() != Material.air) + if (world.getBlock(x, y, z).getMaterial() != Material.air) { return false; + } break; case '+'://must not be air - if (world.getBlock(x, y, z).getMaterial() == Material.air) + if (world.getBlock(x, y, z).getMaterial() == Material.air) { return false; + } break; default://check for block (countable) if ((pointer = block - '0') >= 0) { //countable air -> net.minecraft.block.BlockAir if (world.getBlock(x, y, z) != blockType[pointer]) { - if (DEBUG_MODE) - TecTech.Logger.info("Struct-block-error " + x + " " + y + " " + z + " / " + a + " " + b + " " + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + " " + blockType[pointer].getUnlocalizedName()); + if (DEBUG_MODE) { + TecTech.Logger.info("Struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName()); + } return false; } if (world.getBlockMetadata(x, y, z) != blockMeta[pointer]) { - if (DEBUG_MODE) - TecTech.Logger.info("Struct-meta-id-error " + x + " " + y + " " + z + " / " + a + " " + b + " " + c + " / " + world.getBlockMetadata(x, y, z) + " " + blockMeta[pointer]); + if (DEBUG_MODE) { + TecTech.Logger.info("Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMeta[pointer]); + } return false; } } else if ((pointer = block - ' ') >= 0) { @@ -293,23 +318,29 @@ public class Util { try { if (igt == null || !(boolean) adder.invoke(imt, addingMethods[pointer], igt, casingTextures[pointer])) { if (world.getBlock(x, y, z) != blockTypeFallback[pointer]) { - if (DEBUG_MODE) - TecTech.Logger.info("Fallback-struct-block-error " + x + " " + y + " " + z + " / " + a + " " + b + " " + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + " " + blockTypeFallback[pointer].getUnlocalizedName()); + if (DEBUG_MODE) { + TecTech.Logger.info("Fallback-struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockTypeFallback[pointer].getUnlocalizedName()); + } return false; } if (world.getBlockMetadata(x, y, z) != blockMetaFallback[pointer]) { - if (DEBUG_MODE) - TecTech.Logger.info("Fallback-Struct-meta-id-error " + x + " " + y + " " + z + " / " + a + " " + b + " " + c + " / " + world.getBlockMetadata(x, y, z) + " " + blockMetaFallback[pointer]); + if (DEBUG_MODE) { + TecTech.Logger.info("Fallback-Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMetaFallback[pointer]); + } return false; } } } catch (InvocationTargetException | IllegalAccessException e) { - if (DEBUG_MODE) e.printStackTrace(); + if (DEBUG_MODE) { + e.printStackTrace(); + } return false; } } } - } else if (forceCheck) return false; + } else if (forceCheck) { + return false; + } a++;//block in horizontal layer } } @@ -337,9 +368,13 @@ public class Util { byte[] blockMeta,//use numbers 0-9 for casing types int horizontalOffset, int verticalOffset, int depthOffset, TileEntity tileEntity, int facing, boolean hintsOnly) { - if(!tileEntity.hasWorldObj()) return false; + if(!tileEntity.hasWorldObj()) { + return false; + } World world = tileEntity.getWorldObj(); - if (!world.isRemote && hintsOnly) return false; + if (!world.isRemote && hintsOnly) { + return false; + } //TE Rotation @@ -362,12 +397,14 @@ public class Util { b -= block; break; } if (block > '@')//characters allow to skip check a-1 skip, b-2 skips etc. + { a += block - '@'; - //else if (block < '+')//used to mark THINGS + }//else if (block < '+')//used to mark THINGS // a++; else if (block=='.')// this TE + { a++; - else { + } else { //get x y z from rotation switch (facing) {//translation case 4: @@ -406,7 +443,9 @@ public class Util { } //that must be here since in some cases other axis (b,c) controls y - if (y < 0 || y >= 256) return false; + if (y < 0 || y >= 256) { + return false; + } //Check block if (world.blockExists(x, y, z)) {//this actually checks if the chunk is loaded @@ -420,15 +459,18 @@ public class Util { break; default: //check for block if ((pointer = block - '0') >= 0) { - if(world.getBlock(x,y,z)!=blockType[pointer] || world.getBlockMetadata(x,y,z)!=blockMeta[pointer]) - TecTech.proxy.hint_particle(world,x, y, z, blockType[pointer], blockMeta[pointer]); + if(world.getBlock(x,y,z)!=blockType[pointer] || world.getBlockMetadata(x,y,z)!=blockMeta[pointer]) { + TecTech.proxy.hint_particle(world, x, y, z, blockType[pointer], blockMeta[pointer]); + } } else if ((pointer = block - ' ') >= 0) { - switch(pointer){ - case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: - TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, pointer); break; - default:TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 12); + if(pointer>=0 && pointer<12) { + TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, pointer); + } else { + TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, 12); } - } else TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 15); + } else { + TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, 15); + } } }else{ switch (block) { @@ -441,13 +483,15 @@ public class Util { default: //check for block if ((pointer = block - '0') >= 0) { world.setBlock(x, y, z, blockType[pointer], blockMeta[pointer], 2); - } else if ((pointer = block - ' ') >= 0) { + } else if (block - ' ' < 0) { + world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 15, 2); + } //else { //switch(pointer){ // case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: // world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, pointer, 2); break; // default:world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 12, 2); //} - } else world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 15,2); + //} } } } @@ -467,7 +511,9 @@ public class Util { //TE Rotation byte facing = aBaseMetaTileEntity.getFrontFacing(); World world = aBaseMetaTileEntity.getWorld(); - if (world.isRemote) return new String[]{"Not at Client m8"}; + if (world.isRemote) { + return new String[]{"Not at Client m8"}; + } ItemStack[] array = new ItemStack[10]; @@ -525,7 +571,9 @@ public class Util { } //that must be here since in some cases other axis (b,c) controls y - if (y < 0 || y >= 256) return new String[]{"Invalid position"}; + if (y < 0 || y >= 256) { + return new String[]{"Invalid position"}; + } //Check block Block block = world.getBlock(x, y, z); @@ -544,7 +592,9 @@ public class Util { break; } } - if (err) return new String[]{"Too much different blocks"}; + if (err) { + return new String[]{"Too much different blocks"}; + } } a++;//block in horizontal layer @@ -556,8 +606,8 @@ public class Util { List output = new ArrayList<>(); - output.add("Offsets: " + horizontalOffset + " " + verticalOffset + " " + depthOffset); - output.add("Sizes: " + horizontalSize + " " + verticalSize + " " + depthSize); + output.add("Offsets: " + horizontalOffset + ' ' + verticalOffset + ' ' + depthOffset); + output.add("Sizes: " + horizontalSize + ' ' + verticalSize + ' ' + depthSize); output.add(""); output.add("ID[]: Name[]"); @@ -572,7 +622,7 @@ public class Util { output.add(""); for (int i = 0; i < array.length; i++) { if (array[i] != null) { - output.add(i + ": " + array[i].getItem().getUnlocalizedName() + " " + array[i].getItemDamage()); + output.add(i + ": " + array[i].getItem().getUnlocalizedName() + ' ' + array[i].getItemDamage()); } } output.add(""); @@ -582,10 +632,10 @@ public class Util { c = -depthOffset; for (int cz = 0; cz < depthSize; cz++) {//front to back b = verticalOffset; - String addMe = "{"; + StringBuilder addMe = new StringBuilder().append('{'); for (int by = 0; by < verticalSize; by++) {//top to bottom a = -horizontalOffset; - String line = ""; + StringBuilder line = new StringBuilder(); for (int az = 0; az < horizontalSize; az++) {//left to right //get x y z from rotation switch (facing) {//translation @@ -629,11 +679,11 @@ public class Util { int meta = world.getBlockMetadata(x, y, z); if (a == 0 && b == 0 && c == 0) { - line += '.'; + line.append('.'); } else if (block.getMaterial() == Material.air) { - line += '-'; + line.append('-'); } else if (block.hasTileEntity(meta)) { - line += '*'; + line.append('*'); } else { ItemStack stack = new ItemStack(block, 1, meta); String str = "?";//OH YEAH NPEs @@ -643,73 +693,81 @@ public class Util { break; } } - line += str; + line.append(str); } a++;//block in horizontal layer } if (ignoreAir) { - String l = ""; + StringBuilder builder = new StringBuilder(); char temp = '@'; - for (char ch : line.toCharArray()) { + for (char ch : line.toString().toCharArray()){ if (ch == '-') { temp += 1; if (temp == '~') { - l += '~'; + builder.append('~'); temp = '@'; } } else { if (temp > '@') { - l += temp; + builder.append(temp); temp = '@'; } - l += ch; + builder.append(ch); } } - while (l.length() > 0 && l.toCharArray()[l.length() - 1] == '~') - l = l.substring(0, l.length() - 1); - if (l.length() == 0) - l = "E,"; - else { - l = "\"" + l + "\","; + while (builder.length()>0 && builder.charAt(builder.length() - 1) == '~') { + builder.deleteCharAt(builder.length() - 1); + } + if (builder.length()==0) { + builder.append("E,"); + } else { + builder.insert(0,'"'); + builder.append('"').append(','); } - addMe += l; + addMe.append(builder); } else { - if (line.length() == 0) - line = "E,"; - else { - line = "\"" + line + "\","; + if (line.length()==0) { + line.append("E,"); + } else { + line.insert(0,'"'); + line.append('"').append(','); } - addMe += line; + addMe.append(line); } b--;//horizontal layer } //region less verbose - addMe=(addMe + "},").replaceAll("(E,)+(?=})",E/*Remove Empty strings at end*/); - Matcher m = matchE_.matcher(addMe); - while (m.find()) { - byte lenEE = (byte)(m.group(1).length()>>1); - addMe=addMe.replaceFirst("E,(E,)+","\"\\\\u00"+String.format("%02X", lenEE-1)+"\","); - //addMe=addMe.replaceFirst("E,(E,)+\"","\"\\\\u00"+String.format("%02X", lenEE)); + addMe.append('}').append(','); + String builtStr=addMe.toString().replaceAll("(E,)+(?=})",E/*Remove Empty strings at end*/); + Matcher matcher = matchE_.matcher(builtStr); + while (matcher.find()) { + byte lenEE = (byte)(matcher.group(1).length()>>1); + builtStr=builtStr.replaceFirst("E,(E,)+","\"\\\\u00"+String.format("%02X", lenEE-1)+"\","); + //builtStr=builtStr.replaceFirst("E,(E,)+\"","\"\\\\u00"+String.format("%02X", lenEE)); } //endregion - output.add(addMe); + output.add(builtStr); c++;//depth } output.add("}"); - return output.toArray(new String[0]); + return output.toArray(new String[output.size()]); } private static final Pattern matchE_ = Pattern.compile("(E,(E,)+)"); public static boolean isInputEqual(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, FluidStack[] requiredFluidInputs, ItemStack[] requiredInputs, FluidStack[] givenFluidInputs, ItemStack... givenInputs) { - if (!GregTech_API.sPostloadFinished) return false; - if (requiredFluidInputs.length > 0 && givenFluidInputs == null) return false; + if (!GregTech_API.sPostloadFinished) { + return false; + } + if (requiredFluidInputs.length > 0 && givenFluidInputs == null) { + return false; + } int amt; - for (FluidStack tFluid : requiredFluidInputs) + for (FluidStack tFluid : requiredFluidInputs) { if (tFluid != null) { boolean temp = true; amt = tFluid.amount; - for (FluidStack aFluid : givenFluidInputs) + for (FluidStack aFluid : givenFluidInputs) { if (aFluid != null && aFluid.isFluidEqual(tFluid)) { if (aDontCheckStackSizes) { temp = false; @@ -721,10 +779,16 @@ public class Util { break; } } - if (temp) return false; + } + if (temp) { + return false; + } } + } - if (requiredInputs.length > 0 && givenInputs == null) return false; + if (requiredInputs.length > 0 && givenInputs == null) { + return false; + } for (ItemStack tStack : requiredInputs) { if (tStack != null) { amt = tStack.stackSize; @@ -742,7 +806,9 @@ public class Util { } } } - if (temp) return false; + if (temp) { + return false; + } } } @@ -798,7 +864,7 @@ public class Util { } public static String getUniqueIdentifier(ItemStack is) { - return GameRegistry.findUniqueIdentifierFor(is.getItem()).modId + ":" + is.getUnlocalizedName(); + return GameRegistry.findUniqueIdentifierFor(is.getItem()).modId + ':' + is.getUnlocalizedName(); } @@ -806,16 +872,16 @@ public class Util { public static final long[] V = new long[]{8L, 32L, 128L, 512L, 2048L, 8192L, 32768L, 131072L, 524288L, 2097152L, 8388608L, 33554432L, 134217728L, 536870912L, 1073741824L, Integer.MAX_VALUE-7}; public static byte getTier(long l) { - byte i = -1; + byte b = -1; do { - ++i; - if (i >= V.length) { - return i; + ++b; + if (b >= V.length) { + return b; } - } while(l > V[i]); + } while(l > V[b]); - return i; + return b; } public static String[] splitButDifferent(String string,String delimiter){ @@ -832,8 +898,9 @@ public class Util { public static String[] infoFromNBT(NBTTagCompound nbt) { String[] strings = new String[nbt.getInteger("i")]; - for (int i = 0; i < strings.length; i++) + for (int i = 0; i < strings.length; i++) { strings[i] = nbt.getString(Integer.toString(i)); + } return strings; } diff --git a/src/main/java/com/github/technus/tectech/Vec3pos.java b/src/main/java/com/github/technus/tectech/Vec3pos.java index 30509d3f02..eb694813da 100644 --- a/src/main/java/com/github/technus/tectech/Vec3pos.java +++ b/src/main/java/com/github/technus/tectech/Vec3pos.java @@ -24,9 +24,13 @@ public class Vec3pos implements Comparable { @Override public int compareTo(Vec3pos o) { int tmp=y-o.y; - if (tmp!=0) return tmp; + if (tmp!=0) { + return tmp; + } tmp=x-o.x; - if (tmp!=0) return tmp; + if (tmp!=0) { + return tmp; + } return z-o.z; } diff --git a/src/main/java/com/github/technus/tectech/XSTR.java b/src/main/java/com/github/technus/tectech/XSTR.java index af048bb19b..f5ff457fe1 100644 --- a/src/main/java/com/github/technus/tectech/XSTR.java +++ b/src/main/java/com/github/technus/tectech/XSTR.java @@ -1,23 +1,23 @@ package com.github.technus.tectech; -/** - * 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 - *

- * 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(); - *

- * 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 +/* + 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 +

+ 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(); +

+ 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 *

* This code is released under the GNU Lesser General Public License Version 3 @@ -46,8 +46,9 @@ public class XSTR extends Random { public static final XSTR XSTR_INSTANCE=new XSTR(){ @Override public synchronized void setSeed(long seed) { - if(!Thread.currentThread().getStackTrace()[2].getClassName().equals(Random.class.getName())) + if(!Thread.currentThread().getStackTrace()[2].getClassName().equals(Random.class.getName())) { throw new NoSuchMethodError("This is meant to be shared!, leave seed state alone!"); + } } }; @@ -68,7 +69,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 (; ; ) { + while (true) { long current = seedUniquifier.get(); long next = current * 181783497276652981L; if (seedUniquifier.compareAndSet(current, next)) { @@ -131,8 +132,8 @@ public class XSTR extends Random { * 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 + * @param nbits will shift nbits bits + * @return next seed */ @Override public int next(int nbits) { @@ -155,13 +156,13 @@ public class XSTR extends Random { haveNextNextGaussian = false; return nextNextGaussian; } else { - double v1, v2, s; + double v1, v2, vs; do { v1 = 2 * nextDouble() - 1; // between -1 and 1 v2 = 2 * nextDouble() - 1; // between -1 and 1 - s = v1 * v1 + v2 * v2; - } while (s >= 1 || s == 0); - double multiplier = StrictMath.sqrt(-2 * StrictMath.log(s) / s); + vs = v1 * v1 + v2 * v2; + } while (vs >= 1 || vs == 0); + double multiplier = StrictMath.sqrt(-2 * StrictMath.log(vs) / vs); nextNextGaussian = v2 * multiplier; haveNextNextGaussian = true; return v1 * multiplier; @@ -268,10 +269,10 @@ 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) + 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; + } + } } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/auxiliary/Reference.java b/src/main/java/com/github/technus/tectech/auxiliary/Reference.java index cc5202636a..828974af05 100644 --- a/src/main/java/com/github/technus/tectech/auxiliary/Reference.java +++ b/src/main/java/com/github/technus/tectech/auxiliary/Reference.java @@ -9,4 +9,6 @@ public final class Reference { public static final String SERVERSIDE = "com.github.technus.tectech.proxy.CommonProxy"; public static final String COFHCORE = "CoFHCore"; public static final String THAUMCRAFT = "Thaumcraft"; + + private Reference() {} } diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 78eb0746c3..8360d9edf7 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -18,11 +18,9 @@ import net.minecraftforge.fluids.FluidStack; public class DreamCraftRecipeLoader implements Runnable { @Override public void run() { - Object[] o = new Object[0]; - //Quantum Glass GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_Containment.get(1, o), + CustomItemList.eM_Containment.get(1), GT_ModHandler.getIC2Item("reinforcedGlass", 1L) }, Materials.Trinium.getMolten(576), new ItemStack(QuantumGlassBlock.INSTANCE, 1), 200, 500000); @@ -35,9 +33,9 @@ public class DreamCraftRecipeLoader implements Runnable { //Data GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Circuit_Parts_GlassFiber.get(8, o), + ItemList.Circuit_Parts_GlassFiber.get(8), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silver, 8) - }, Materials.Polytetrafluoroethylene.getMolten(144), CustomItemList.DATApipe.get(1, o), 200, 30720, true); + }, Materials.Polytetrafluoroethylene.getMolten(144), CustomItemList.DATApipe.get(1), 200, 30720, true); //endregion @@ -52,42 +50,42 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Cobalt, 16), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 16), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.NiobiumTitanium, 2) - }, Materials.TungstenSteel.getMolten(576), CustomItemList.eM_Power.get(1, o), 100, 30720); + }, Materials.TungstenSteel.getMolten(576), CustomItemList.eM_Power.get(1), 100, 30720); //Computer Casing GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_Power.get(1, o), + CustomItemList.eM_Power.get(1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 8), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Ultimate, 1), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.NiobiumTitanium, 2) - }, Materials.Aluminium.getMolten(1296), CustomItemList.eM_Computer_Casing.get(1, o), 200, 122880); + }, Materials.Aluminium.getMolten(1296), CustomItemList.eM_Computer_Casing.get(1), 200, 122880); //Computer Vent Casing GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1), - ItemList.Electric_Motor_IV.get(2, o), + ItemList.Electric_Motor_IV.get(2), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 2), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 16), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Copper, 16), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 1) - }, Materials.SolderingAlloy.getMolten(1296), CustomItemList.eM_Computer_Vent.get(1, o), 100, 1920); + }, Materials.SolderingAlloy.getMolten(1296), CustomItemList.eM_Computer_Vent.get(1), 100, 1920); //Advanced Computer Casing GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_Computer_Casing.get(1, o), + CustomItemList.eM_Computer_Casing.get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Ultimate, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Cobalt, 64), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 64), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 4) - }, Materials.Iridium.getMolten(1296), CustomItemList.eM_Computer_Bus.get(1, o), 200, 122880, true); + }, Materials.Iridium.getMolten(1296), CustomItemList.eM_Computer_Bus.get(1), 200, 122880, true); //Molecular Casing GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_Power.get(1, o), + CustomItemList.eM_Power.get(1), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Osmiridium, 6), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 12), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 24), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.TungstenSteel, 24), - ItemList.Field_Generator_IV.get(1, o) - }, Materials.Osmium.getMolten(1296), CustomItemList.eM_Containment.get(1, o), 800, 500000); + ItemList.Field_Generator_IV.get(1) + }, Materials.Osmium.getMolten(1296), CustomItemList.eM_Containment.get(1), 800, 500000); //Hollow Casing TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.eM_Containment.get(1), @@ -126,73 +124,73 @@ public class DreamCraftRecipeLoader implements Runnable { //region hatches //Dynamo Hatches UV-UIV - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hatch_Dynamo_UV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2)}, Materials.Silver.getMolten(1000), CustomItemList.eM_dynamomulti4_UV.get(1, o), 100, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Transformer_MAX_UV.get(1, o), CustomItemList.eM_dynamomulti4_UV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 4)}, Materials.Electrum.getMolten(1000), CustomItemList.eM_dynamomulti16_UV.get(1, o), 200, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UHV_UV.get(1, o), CustomItemList.eM_dynamomulti16_UV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NaquadahAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 6)}, Materials.Tungsten.getMolten(1000), CustomItemList.eM_dynamomulti64_UV.get(1, o), 400, 122880); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hatch_Dynamo_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2)}, Materials.Silver.getMolten(1000), CustomItemList.eM_dynamomulti4_UV.get(1), 100, 122880); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Transformer_MAX_UV.get(1), CustomItemList.eM_dynamomulti4_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 4)}, Materials.Electrum.getMolten(1000), CustomItemList.eM_dynamomulti16_UV.get(1), 200, 122880); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UHV_UV.get(1), CustomItemList.eM_dynamomulti16_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NaquadahAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 6)}, Materials.Tungsten.getMolten(1000), CustomItemList.eM_dynamomulti64_UV.get(1), 400, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hatch_Dynamo_MAX.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2)}, Materials.Silver.getMolten(2000), CustomItemList.eM_dynamomulti4_UHV.get(1, o), 100, 500000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UEV_UHV.get(1, o), CustomItemList.eM_dynamomulti4_UHV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4)}, Materials.Electrum.getMolten(2000), CustomItemList.eM_dynamomulti16_UHV.get(1, o), 200, 500000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UEV_UHV.get(1, o), CustomItemList.eM_dynamomulti16_UHV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6)}, Materials.Tungsten.getMolten(2000), CustomItemList.eM_dynamomulti64_UHV.get(1, o), 400, 500000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hatch_Dynamo_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2)}, Materials.Silver.getMolten(2000), CustomItemList.eM_dynamomulti4_UHV.get(1), 100, 500000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UEV_UHV.get(1), CustomItemList.eM_dynamomulti4_UHV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4)}, Materials.Electrum.getMolten(2000), CustomItemList.eM_dynamomulti16_UHV.get(1), 200, 500000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UEV_UHV.get(1), CustomItemList.eM_dynamomulti16_UHV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6)}, Materials.Tungsten.getMolten(2000), CustomItemList.eM_dynamomulti64_UHV.get(1), 400, 500000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Hatch_Dynamo_UEV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bedrockium, 2)}, Materials.Silver.getMolten(4000), CustomItemList.eM_dynamomulti4_UEV.get(1, o), 100, 2000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UIV_UEV.get(1, o), CustomItemList.eM_dynamomulti4_UEV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bedrockium, 4)}, Materials.Electrum.getMolten(4000), CustomItemList.eM_dynamomulti16_UEV.get(1, o), 200, 2000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UIV_UEV.get(1, o), CustomItemList.eM_dynamomulti16_UEV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bedrockium, 6)}, Materials.Tungsten.getMolten(4000), CustomItemList.eM_dynamomulti64_UEV.get(1, o), 400, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Hatch_Dynamo_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bedrockium, 2)}, Materials.Silver.getMolten(4000), CustomItemList.eM_dynamomulti4_UEV.get(1), 100, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UIV_UEV.get(1), CustomItemList.eM_dynamomulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bedrockium, 4)}, Materials.Electrum.getMolten(4000), CustomItemList.eM_dynamomulti16_UEV.get(1), 200, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UIV_UEV.get(1), CustomItemList.eM_dynamomulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bedrockium, 6)}, Materials.Tungsten.getMolten(4000), CustomItemList.eM_dynamomulti64_UEV.get(1), 400, 2000000); - //GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Hatch_Dynamo_UIV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_dynamomulti4_UIV.get(1, o), 100, 8000000); - //GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UMV_UIV.get(1, o), CustomItemList.eM_dynamomulti4_UIV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_dynamomulti16_UIV.get(1, o), 200, 8000000); - //GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UMV_UIV.get(1, o), CustomItemList.eM_dynamomulti16_UIV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 6)}, Materials.Tungsten.getMolten(8000), CustomItemList.eM_dynamomulti64_UIV.get(1, o), 400, 8000000); + //GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Hatch_Dynamo_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_dynamomulti4_UIV.get(1), 100, 8000000); + //GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UMV_UIV.get(1), CustomItemList.eM_dynamomulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_dynamomulti16_UIV.get(1), 200, 8000000); + //GT_Values.RA.addAssemblerRecipe(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UMV_UIV.get(1), CustomItemList.eM_dynamomulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 6)}, Materials.Tungsten.getMolten(8000), CustomItemList.eM_dynamomulti64_UIV.get(1), 400, 8000000); //Energy Hatches UV-UIV - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hatch_Energy_UV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2)}, Materials.Silver.getMolten(1000), CustomItemList.eM_energymulti4_UV.get(1, o), 100, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Transformer_MAX_UV.get(1, o), CustomItemList.eM_energymulti4_UV.get(1, o), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 4)}, Materials.Electrum.getMolten(1000), CustomItemList.eM_energymulti16_UV.get(1, o), 200, 122880); - GT_Values.RA.addAssemblerRecipe(new